/* ─────────────────────────────────────────────────────────────────────────────
   DURAPANEL SPAN CALCULATOR — styles.css
   Color palette from brand image: Navy #1B2B5E, Orange #F5A623, White #FFFFFF
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --navy:      #1B2B5E;
  --navy-dk:   #122048;
  --navy-md:   #2A3F7E;
  --navy-lt:   #3B5199;
  --navy-pale: #EEF2FF;
  --orange:    #F5A623;
  --orange-dk: #D4891A;
  --orange-lt: #FFD280;
  --orange-pale: #FFF8EC;
  --white:     #FFFFFF;
  --grey-100:  #F4F5F8;
  --grey-200:  #E8EAF0;
  --grey-400:  #B0B7CC;
  --grey-600:  #6B7494;
  --grey-800:  #2E3650;
  --pass-bg:   #E8F5E9;
  --pass-fg:   #2E7D32;
  --pass-bd:   #A5D6A7;
  --fail-bg:   #FFEBEE;
  --fail-fg:   #C62828;
  --fail-bd:   #EF9A9A;
  --na-bg:     #F5F5F5;
  --na-fg:     #9E9E9E;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 2px 12px rgba(27,43,94,0.10);
  --shadow-md: 0 4px 24px rgba(27,43,94,0.14);
}

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

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

body {
  font-family: 'Inter', 'Barlow', sans-serif;
  background: #F0F2F8;
  color: var(--grey-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ──────────────────────────────────────────────────────────────────*/
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.logo-sub {
  font-size: 0.68rem;
  color: var(--orange-lt);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.badge-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--orange);
  letter-spacing: 0.06em;
}
.badge-valid {
  font-size: 0.66rem;
  color: var(--grey-400);
  letter-spacing: 0.04em;
}

/* ── HERO BAND ───────────────────────────────────────────────────────────────*/
.hero-band {
  background: linear-gradient(130deg, var(--navy-dk) 0%, var(--navy-md) 60%, var(--navy-lt) 100%);
  position: relative;
  overflow: hidden;
  padding: 36px 24px 48px;
}
.hero-band::before {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(245,166,35,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.hero-text h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero-text h1 em {
  font-style: normal;
  color: var(--orange);
}
.hero-text p {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  max-width: 480px;
  line-height: 1.5;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 4px 11px;
  border-radius: 20px;
}
.hero-diagonal {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: #F0F2F8;
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* ── MAIN LAYOUT ─────────────────────────────────────────────────────────────*/
.calc-layout {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 40px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
  flex: 1;
}

/* ── INPUTS PANEL ────────────────────────────────────────────────────────────*/
.inputs-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--grey-200);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  background: var(--navy);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-letter {
  width: 28px; height: 28px;
  background: var(--orange);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem; font-weight: 800;
  color: var(--navy);
  flex-shrink: 0;
}
.card-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Fields */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field-hint {
  font-size: 0.72rem;
  color: var(--grey-400);
  margin-top: 2px;
}

/* Select */
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--orange);
  font-size: 1rem;
  pointer-events: none;
}
select {
  width: 100%;
  appearance: none;
  background: var(--grey-100);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 10px 36px 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.18);
}

/* Toggle */
.toggle-group {
  display: flex;
  gap: 8px;
}
.toggle-btn {
  flex: 1;
  padding: 9px 0;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--grey-100);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--grey-600);
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.toggle-btn:not(.active):hover {
  border-color: var(--navy-lt);
  color: var(--navy);
}

/* Number input */
.input-unit-wrap {
  display: flex;
  align-items: center;
  background: var(--grey-100);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-unit-wrap:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.18);
}
.input-unit-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}
.input-unit-wrap input:focus { outline: none; }
.unit {
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-left: 1px solid var(--grey-200);
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(245,166,35,0.06);
}

/* Dimension summary pills */
.dim-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dim-pill {
  flex: 1;
  min-width: 80px;
  background: var(--navy-pale);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dim-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}
.dim-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eave-pill.ok { background: var(--pass-bg); border-color: var(--pass-bd); }
.eave-pill.ok .dim-val { color: var(--pass-fg); }
.eave-pill.fail { background: var(--fail-bg); border-color: var(--fail-bd); }
.eave-pill.fail .dim-val { color: var(--fail-fg); }

/* Config key */
.config-key-display {
  background: var(--orange-pale);
  border: 1.5px solid var(--orange-lt);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.ckey-label {
  font-weight: 700;
  color: var(--orange-dk);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 3px;
}
.ckey-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}

/* Calc button */
.calc-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--orange);
  border: none;
  border-radius: var(--radius);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(245,166,35,0.4);
}
.calc-btn:hover {
  background: var(--orange-dk);
  box-shadow: 0 6px 20px rgba(245,166,35,0.5);
  transform: translateY(-1px);
}
.calc-btn:active { transform: translateY(0); }

/* ── RESULTS PANEL ───────────────────────────────────────────────────────────*/
.results-panel {
  min-height: 400px;
}

.results-empty {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 2px dashed var(--grey-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 24px;
  text-align: center;
  color: var(--grey-600);
  font-size: 0.95rem;
  line-height: 1.6;
}
.empty-icon { opacity: 0.5; }
.results-empty strong { color: var(--orange); }

.hidden { display: none !important; }

.results-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeSlideIn 0.35s ease-out;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Summary bar */
.summary-bar {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.summary-item {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}
.summary-item:first-child { padding-left: 0; }
.summary-item:last-child { padding-right: 0; }
.summary-divider {
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.summary-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}
.summary-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.summary-val.accent { color: var(--orange); }
.verdict-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 1rem !important;
}
.verdict-badge.pass { background: var(--pass-bg); color: var(--pass-fg) !important; }
.verdict-badge.fail { background: var(--fail-bg); color: var(--fail-fg) !important; }

/* Result sections */
.result-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-200);
  overflow: hidden;
}
.result-section-header {
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-letter {
  width: 26px; height: 26px;
  background: var(--orange);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem; font-weight: 800;
  color: var(--navy);
  flex-shrink: 0;
}
.result-section-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Matrix */
.matrix-legend {
  padding: 10px 20px 0;
  font-size: 0.78rem;
  color: var(--grey-600);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.leg { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.leg.pass { color: var(--pass-fg); }
.leg.fail { color: var(--fail-fg); }
.leg.na   { color: var(--na-fg); }

.matrix-scroll {
  padding: 14px 20px 20px;
  overflow-x: auto;
}
.span-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  min-width: 680px;
}
.span-matrix th {
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--navy-md);
  white-space: nowrap;
}
.span-matrix th:first-child {
  text-align: left;
  min-width: 160px;
  border-radius: 8px 0 0 0;
}
.span-matrix th:last-child { border-radius: 0 8px 0 0; }
.span-matrix th.pres-header {
  background: var(--navy-md);
  font-size: 0.75rem;
}
.span-matrix td {
  padding: 8px 10px;
  border: 1px solid var(--grey-200);
  text-align: center;
  font-weight: 600;
  transition: opacity 0.15s;
  font-size: 0.83rem;
}
.span-matrix td.load-label {
  text-align: left;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  background: var(--grey-100);
  padding-left: 14px;
  letter-spacing: 0.02em;
}
.span-matrix tr:last-child td:first-child { border-radius: 0 0 0 8px; }
.span-matrix tr:last-child td:last-child  { border-radius: 0 0 8px 0; }

.cell-pass { background: var(--pass-bg); color: var(--pass-fg); }
.cell-fail { background: var(--fail-bg); color: var(--fail-fg); }
.cell-na   { background: var(--na-bg);   color: var(--na-fg);   font-weight: 400; font-size: 0.75rem; }

.cell-pass::after { content: ' ✓'; font-size: 0.7em; }
.cell-fail::after { content: ' ✗'; font-size: 0.7em; }

/* Governing grid */
.governing-grid {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.gov-card {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.gov-card-header {
  background: var(--navy);
  padding: 8px 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--orange);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.gov-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gov-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--grey-200);
}
.gov-row:last-child { border-bottom: none; }
.gov-load { color: var(--grey-600); font-weight: 500; }
.gov-span { font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 800; color: var(--navy); }
.gov-span.gov-governing { color: var(--orange-dk); }
.gov-span.gov-governing::before { content: '★ '; font-size: 0.7em; }
.gov-row.governing-row { background: var(--orange-pale); margin: 0 -14px; padding: 5px 14px; }

/* Notes */
.notes-section .result-section-header { background: var(--grey-100); }
.notes-list {
  padding: 16px 20px 20px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notes-list li {
  font-size: 0.82rem;
  color: var(--grey-800);
  line-height: 1.55;
  padding: 8px 12px 8px 32px;
  position: relative;
  background: var(--grey-100);
  border-radius: 6px;
  border-left: 3px solid var(--orange);
  counter-increment: note-counter;
}
.notes-list {
  counter-reset: note-counter;
}
.notes-list li::before {
  content: counter(note-counter);
  position: absolute;
  left: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--orange);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────────*/
.site-footer {
  background: var(--navy-dk);
  border-top: 2px solid var(--orange);
  margin-top: auto;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}
.footer-inner a { color: var(--orange-lt); text-decoration: none; }
.footer-inner a:hover { color: var(--orange); }
.footer-right { text-align: right; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────*/
@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .inputs-panel {
    position: static;
  }
  .hero-text h1 { font-size: 2rem; }
  .summary-bar { padding: 16px 18px; }
  .summary-item { min-width: 100px; padding: 0 10px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  .hero-band { padding: 24px 16px 40px; }
  .calc-layout { padding: 20px 16px 32px; }
  .summary-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .summary-divider { width: 100%; height: 1px; }
  .summary-item { padding: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STRUCTURAL ENGINEERING SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Structural section wrapper ─────────────────────────────────────────────── */
.structural-section {
  background: #f8f9fc;
  border-top: 3px solid var(--navy);
  padding: 0;
}
.structural-hero {
  background: linear-gradient(135deg, #1B2B5E 0%, #2d4080 100%);
  color: #fff;
  padding: 40px 48px 36px;
}
.structural-hero h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: #fff;
}
.structural-hero p {
  font-size: 0.92rem;
  opacity: 0.82;
  margin: 0;
  max-width: 640px;
}
.structural-hero .hero-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.structural-hero .chip {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.72rem;
}

/* ── Two-column layout ──────────────────────────────────────────────────────── */
.struct-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .struct-layout { grid-template-columns: 1fr; padding: 20px 16px 32px; }
}

/* ── Input cards ────────────────────────────────────────────────────────────── */
.struct-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.struct-card-input {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  border: 1px solid #e3e7f0;
}
.struct-card-input .card-header {
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.struct-card-input .card-header h3 {
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
}
.struct-card-input .card-header .card-letter {
  background: var(--orange);
  color: #fff;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.struct-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Field groups ───────────────────────────────────────────────────────────── */
.s-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.s-field label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  opacity: 0.8;
}
.s-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #d0d7e8;
  border-radius: 7px;
  font-size: 0.87rem;
  color: var(--navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231B2B5E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.18s;
}
.s-field select:focus {
  outline: none;
  border-color: var(--orange);
}

/* ── Trib slider ────────────────────────────────────────────────────────────── */
.trib-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trib-slider-row input[type=range] {
  flex: 1;
  accent-color: var(--orange);
  cursor: pointer;
}
.trib-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--orange);
  min-width: 48px;
  text-align: right;
}
.trib-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #888;
  margin-top: -6px;
}

/* ── Foundation tabs ────────────────────────────────────────────────────────── */
.ftab-group {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #d0d7e8;
}
.ftab-btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: #f4f6fb;
  color: #666;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ftab-btn + .ftab-btn { border-left: 1.5px solid #d0d7e8; }
.ftab-btn.active {
  background: var(--navy);
  color: #fff;
}

/* ── Results panel ──────────────────────────────────────────────────────────── */
.struct-results-panel {
  padding-left: 28px;
}
@media (max-width: 900px) {
  .struct-results-panel { padding-left: 0; padding-top: 16px; }
}

#struct-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Result header badges ───────────────────────────────────────────────────── */
.struct-result-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.struct-badge {
  background: #e8edf7;
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}
.struct-badge.wind { background: #fff3e0; color: #c45e00; }
.struct-badge.trib { background: #e8f5e9; color: #2e7d32; }

/* ── Result cards grid ──────────────────────────────────────────────────────── */
.struct-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .struct-cards { grid-template-columns: 1fr 1fr; }
}
.struct-card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e3e7f0;
  padding: 16px 14px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.18s;
}
.struct-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); }
.struct-card.primary {
  border-color: var(--orange);
  background: linear-gradient(135deg, #fff8f0, #fff);
}
.struct-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 2px;
}
.struct-card-body { flex: 1; }
.struct-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 3px;
}
.struct-card-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.struct-card.primary .struct-card-value { color: var(--orange-dk); }
.struct-card-sub {
  font-size: 0.72rem;
  color: #888;
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Footing table ──────────────────────────────────────────────────────────── */
.footing-section {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e3e7f0;
  overflow: hidden;
}
.footing-header {
  background: linear-gradient(90deg, var(--navy) 0%, #2d4080 100%);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.footing-header h4 {
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.footing-header .footing-icon { font-size: 1.1rem; }
.footing-sub {
  font-size: 0.72rem;
  opacity: 0.7;
  font-weight: 400;
  margin-left: 6px;
}
.footing-note-bar {
  background: #fff8f0;
  border-bottom: 1px solid #f0e0cc;
  padding: 8px 18px;
  font-size: 0.76rem;
  color: #7a4a00;
}
.footing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.footing-table th {
  background: #f4f6fb;
  padding: 8px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  border-bottom: 1.5px solid #dde3f0;
}
.footing-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #eef0f7;
  vertical-align: middle;
}
.footing-table tr:last-child td { border-bottom: none; }
.footing-table tr:hover td { background: #f9fafd; }
.ftg-dims { font-family: 'Barlow Condensed', sans-serif; font-size: 0.97rem; }
.ftg-dims strong { color: var(--navy); }
.ftg-label { font-weight: 600; color: var(--navy); }
.ftg-note { color: #777; font-size: 0.78rem; }

/* ── Info boxes ─────────────────────────────────────────────────────────────── */
.struct-info-box {
  background: #e8f4ff;
  border-left: 4px solid #1976d2;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 0.83rem;
  color: #1a3a5e;
  line-height: 1.6;
}
.anchor-box {
  background: #f0fff4;
  border-left-color: #2e7d32;
  color: #1a4d2e;
}
.slab-note {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 0.83rem;
  color: #5d4037;
  line-height: 1.6;
}
.slab-anchor-note {
  background: #f3e5f5;
  border-left: 4px solid #7b1fa2;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 0.83rem;
  color: #4a148c;
  line-height: 1.6;
}

/* ── Engineering notes box ──────────────────────────────────────────────────── */
.struct-notes-box {
  background: #f8f9fc;
  border: 1.5px solid #dde3f0;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.82rem;
  color: #444;
  line-height: 1.7;
}
.struct-notes-box strong { color: var(--navy); }
.struct-notes-box ul {
  margin: 8px 0 0 0;
  padding-left: 18px;
}
.struct-notes-box li { margin-bottom: 4px; }

/* ── No data state ──────────────────────────────────────────────────────────── */
.struct-no-data {
  background: #fff3f3;
  border: 1.5px solid #ffcdd2;
  border-radius: 10px;
  padding: 20px 22px;
  color: #c62828;
  font-size: 0.85rem;
  line-height: 1.6;
}
.struct-no-data small { color: #888; display: block; margin-top: 6px; }

/* ── Divider band between sections ─────────────────────────────────────────── */
.section-divider {
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--navy) 100%);
}

/* ── Slab hidden row ────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   NEW STYLES — v2.0 Corrections
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── New input field helpers ────────────────────────────────────────────────── */
.s-input-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.s-input-unit input[type=number] {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #d0d7e8;
  border-radius: 7px;
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--navy);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.s-input-unit input[type=number]:focus { border-color: var(--orange); }
.s-unit {
  font-size: 0.83rem;
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}
.s-field-hint {
  margin: 4px 0 0 0;
  font-size: 0.75rem;
  color: #7a8aaa;
  line-height: 1.4;
}
.s-field-formula {
  font-size: 0.72rem;
  color: #7a8aaa;
  font-weight: 400;
  font-style: italic;
}
.s-toggle { margin-top: 2px; }

/* ── Reference note ─────────────────────────────────────────────────────────── */
.struct-ref-note {
  font-size: 0.72rem;
  color: #888;
  padding: 6px 2px;
  line-height: 1.6;
  border-top: 1px dashed #dde3f0;
  margin-top: 8px;
}

/* ── Sheet reference badge ──────────────────────────────────────────────────── */
.struct-badge.sheet {
  background: #e8f0fe;
  color: #1a56db;
  font-weight: 700;
}

/* ── Rain-on-snow and reduction flags ───────────────────────────────────────── */
.struct-flag {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 10px;
  border-left: 4px solid;
}
.rain-on-snow {
  background: #fff8e1;
  border-color: #f59f00;
  color: #5d4037;
}
.reduction-flag.flag-warn {
  background: #e3f2fd;
  border-color: #1976d2;
  color: #0d47a1;
}
.reduction-flag.flag-fail {
  background: #ffebee;
  border-color: #c62828;
  color: #b71c1c;
}

/* ── Panel span card ─────────────────────────────────────────────────────────── */
.panel-span-card {
  background: #f0f7f0;
  border: 1.5px solid #81c784;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.panel-span-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-span-icon { font-size: 1.3rem; line-height: 1; margin-top: 2px; }
.panel-span-title { font-size: 0.92rem; font-weight: 700; color: #1b5e20; }
.panel-span-sub { font-size: 0.74rem; color: #4a7c59; margin-top: 2px; }
.panel-span-vals {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.pspan-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pspan-label { font-size: 0.73rem; color: #5a7a5a; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.pspan-val { font-size: 1.2rem; font-weight: 800; color: #2e7d32; }
.pspan-val.accent { color: var(--orange-dk); }

/* ── Output grid (slope, seismic, etc.) ─────────────────────────────────────── */
.struct-output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
@media (max-width: 500px) { .struct-output-grid { grid-template-columns: 1fr; } }
.struct-out-item {
  background: #f8f9fc;
  border: 1px solid #e0e6f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.out-label {
  font-size: 0.72rem;
  color: #7a8aaa;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.out-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── Disabled row ───────────────────────────────────────────────────────────── */
.disabled-row {
  opacity: 0.45;
  pointer-events: none;
}
.disabled-row label { color: #aaa; }

/* ── Footing table additions ────────────────────────────────────────────────── */
.ftg-label { font-size: 0.82rem; color: #555; }
.ftg-dims  { font-size: 0.88rem; }
.ftg-note  { font-size: 0.76rem; color: #888; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOP INPUT BAR — v3.0 Layout Overhaul
   Inputs horizontal across top; results full-width below
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Top Inputs Bar ─────────────────────────────────────────────────────── */
.top-inputs-bar {
  background: var(--white);
  border-bottom: 2px solid var(--grey-200);
  box-shadow: 0 2px 14px rgba(27,43,94,0.10);
  position: sticky;
  top: 62px;
  z-index: 90;
}

.tib-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Input Rows ─────────────────────────────────────────────────────────── */
.tib-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: flex-start;
}

/* Row 1 (A-D) and Row 2 (E-G) get a bottom border separator */
.tib-row-1 { padding-bottom: 12px; border-bottom: 1px solid var(--grey-200); }
.tib-row-2 { padding-bottom: 12px; border-bottom: 1px solid var(--grey-200); }

/* Keep old class names working */
.tib-primary   { padding-bottom: 12px; border-bottom: 1px solid var(--grey-200); }
.tib-secondary { padding-bottom: 12px; border-bottom: 1px solid var(--grey-200); }
.tib-advanced  { }

/* ── Individual Input Groups — NOT full-width, compact natural width ──── */
.ig {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;   /* never grow to fill width */
  width: auto;
}

/* Specific size variants */
.ig.ig-sel-wide { width: 240px; }   /* Panel type, Live load, Exposure */
.ig.ig-sel      { width: 150px; }   /* Wind speed */
.ig.ig-num      { width: 130px; }   /* Projection, Overhang, Width */
.ig.ig-wide     { width: 220px; }
.ig.ig-narrow   { width: 110px; }

.ig > label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ig-sub {
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey-400);
  font-size: 0.68rem;
}

/* Letter badges A B C … */
.ig-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--orange);
  color: var(--navy);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Trib auto-computed display ─────────────────────────────────────────── */
.trib-auto-cell { min-width: 160px; }
.trib-computed {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-pale);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-height: 40px;
}
.trib-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

/* ── Dim summary pills (inline) ─────────────────────────────────────────── */
.dim-summary-cell { min-width: 200px; }
.dim-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dim-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 5px 10px;
  min-width: 56px;
}
.dim-val { font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 800; color: var(--navy); }
.dim-lbl { font-size: 0.62rem; color: var(--grey-400); text-transform: uppercase; letter-spacing: 0.04em; }
.eave-pill.ok   { background: var(--pass-bg); border-color: var(--pass-bd); }
.eave-pill.ok .dim-val { color: var(--pass-fg); }
.eave-pill.fail { background: var(--fail-bg); border-color: var(--fail-bd); }
.eave-pill.fail .dim-val { color: var(--fail-fg); }

/* ── Config key display ─────────────────────────────────────────────────── */
.config-key-cell { min-width: 220px; }
.config-key-display {
  background: var(--orange-pale);
  border: 1.5px solid var(--orange-lt);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.ckey-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

/* ── Results Area ───────────────────────────────────────────────────────── */
.results-area {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Result Blocks ──────────────────────────────────────────────────────── */
.results-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.results-block-hdr {
  background: var(--navy);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.rblock-letter {
  width: 34px; height: 34px;
  background: var(--orange);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem; font-weight: 800;
  color: var(--navy);
  flex-shrink: 0;
}
.rblock-title-wrap { flex: 1; min-width: 200px; }
.rblock-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.rblock-sub {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.rblock-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Inner padding for results blocks */
.results-block > #resultsPanel,
.results-block > #struct-results {
  padding: 20px 24px 24px;
}
.structural-block > #struct-results {
  padding: 20px 24px 28px;
}

/* ── Remove old layout classes that conflict ────────────────────────────── */
.calc-layout,
.inputs-panel,
.structural-section,
.struct-layout,
.struct-inputs,
.struct-results-panel {
  display: contents; /* neutralize without removing */
}

/* ── Override resultsPanel so it doesn't have its own padding ──────────── */
#resultsPanel { padding: 0; }


/* ── Fix: results blocks padding (direct children) ─────────────────────── */
#resultsPanel {
  padding: 20px 24px 24px !important;
}
#struct-results {
  padding: 20px 24px 28px !important;
}

/* ── Remove sticky behavior from old inputs panel ───────────────────────── */
.inputs-panel { position: static !important; }

/* ── Structural block extra bottom padding ──────────────────────────────── */
.structural-block {
  margin-bottom: 16px;
}
.structural-block #struct-results {
  padding-bottom: 32px !important;
}

/* ── Footing table full-width fix ───────────────────────────────────────── */
.footing-section {
  margin-left: 0;
  margin-right: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MARGIN FIXES — v3.1
   .card, .struct-card-input, .config-key-display, .struct-ref-note
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── .card — result cards in panel results ──────────────────────────────── */
.card {
  margin: 0 0 12px 0;
}

/* ── .struct-card-input — generated result input panels ─────────────────── */
.struct-card-input {
  margin: 8px 0;
}

/* ── .config-key-display — ER-505 config key box in advanced row ────────── */
.config-key-display {
  margin: 0;
  padding: 8px 14px;
}

/* ── .struct-ref-note — reference note at bottom of structural results ───── */
.struct-ref-note {
  margin: 12px 0 0 0;
  padding: 10px 14px;
  font-size: 0.72rem;
  color: #888;
  line-height: 1.6;
  border-top: 1px dashed #dde3f0;
}

/* ── Ensure struct-cards and footing-section have consistent outer margin ── */
.struct-cards {
  margin: 0 0 16px 0;
}

.footing-section {
  margin: 0 0 16px 0;
  border-radius: 10px;
  overflow: hidden;
}

.panel-span-card {
  margin: 0 0 16px 0;
}

.struct-info-box {
  margin: 0 0 14px 0;
}

.struct-output-grid {
  margin: 0 0 16px 0;
}

.struct-notes-box {
  margin: 0;
}

/* ── struct-flag (rain-on-snow warnings) ─────────────────────────────────── */
.struct-flag {
  margin: 0 0 12px 0;
}

/* ── Results blocks — ensure inner content never bleeds to edge ─────────── */
.results-block > #resultsPanel {
  padding: 20px 24px 24px;
}
.results-block > #struct-results {
  padding: 20px 24px 32px;
}

/* ── Trib / dim summary width fixes (in advanced row) ───────────────────── */
.trib-auto-cell  { width: 190px; }
.dim-summary-cell { width: 210px; }
.config-key-cell  { width: 280px; }


/* ═══════════════════════════════════════════════════════════════════════════
   FIXES — v3.2  (no sticky scroll separation, cutoff fields, overlay)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Remove sticky — inputs flow naturally, results scroll below ─────────── */
.top-inputs-bar {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: 0 1px 0 var(--grey-200);
}

/* 2. Wider number inputs so value + unit (FT / IN) never clips ──────────── */
.ig.ig-num { width: 158px; }

/* 3. Wider selects for long option text (Live Load, Exposure) ───────────── */
.ig.ig-sel-wide { width: 290px; }
.ig.ig-sel      { width: 160px; }

/* 4. Fix trib-width label bleeding into Quick Summary ───────────────────── */
.trib-auto-cell {
  width: 190px;
  flex-shrink: 0;
}
.trib-auto-cell > label {
  white-space: normal;       /* let "= Proj ÷ 2 + Overhang" wrap */
  line-height: 1.35;
}

/* 5. Give Quick Summary its own fixed space, no overlap ─────────────────── */
.dim-summary-cell {
  width: 230px;
  flex-shrink: 0;
}

/* 6. Config key cell ────────────────────────────────────────────────────── */
.config-key-cell {
  width: 300px;
  flex-shrink: 0;
}

/* 7. Allow advanced row to wrap cleanly without overlap ─────────────────── */
.tib-advanced {
  flex-wrap: wrap;
  row-gap: 10px;
}
/* ── TAB BAR ─────────────────────────────────────────────────────────────── */
.calc-tabs {
  background: var(--navy-dk);
  border-bottom: 3px solid var(--orange);
  position: sticky;
  top: 62px;          /* sit just below the sticky site-header */
  z-index: 90;
}

.calc-tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}

.calc-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  height: 52px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;   /* overlap the container's border-bottom */
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  position: relative;
  flex-shrink: 0;
}

.calc-tab:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
}

.calc-tab.active {
  color: var(--white);
  border-bottom-color: var(--orange);
  background: rgba(245,166,35,0.08);
}

.calc-tab.active .tab-icon {
  color: var(--orange);
}

.tab-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: color 0.18s;
}

.tab-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tab-sub {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  margin-left: -4px;
  letter-spacing: 0.02em;
}

.calc-tab.active .tab-sub {
  color: rgba(245,166,35,0.7);
}

/* ── Tab pane visibility ─────────────────────────────────────────────────── */
.tab-pane {
  display: none;
}

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

/* ── Mobile tab bar ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .calc-tabs-inner {
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .calc-tabs-inner::-webkit-scrollbar { display: none; }

  .calc-tab {
    padding: 0 16px;
    height: 46px;
    gap: 7px;
  }

  .tab-sub {
    display: none;
  }

  .tab-label {
    font-size: 0.85rem;
  }

  .tab-icon {
    width: 16px;
    height: 16px;
  }
}