/* ── Variables ────────────────────────────────── */
:root {
  --navy: #003262;
  --gold: #FDB515;
  --gold-light: #FFD97D;
  --cream: #FAF8F3;
  --warm-gray: #F2EFE8;
  --mid-gray: #D4CEC2;
  --text: #1A1814;
  --text-muted: #6B6558;
  --green: #2D7D46;
  --red:   #C62828;
  --border: #DDD8CE;
  --shadow: 0 2px 12px rgba(0, 50, 98, 0.10);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Header ───────────────────────────────────── */
header {
  background: var(--navy);
}

header::after {
  content: '';
  display: block;
  height: 5px;
  background: var(--gold);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 32px 24px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.uc-seal {
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}

header h1 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: white;
  line-height: 1.2;
}

header h1 span {
  color: var(--gold);
  display: block;
  font-size: 18px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

/* ── Tab bar ──────────────────────────────────── */
.tab-bar {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}

.tab-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
}

.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 22px 11px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.90);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Tab panels ───────────────────────────────── */
.tab-panel {
  display: none;
}

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

/* ── Card ─────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.card-header {
  background: var(--navy);
  color: white;
  padding: 13px 20px;
  border-radius: 9px 9px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 500;
}

.step-badge {
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#override-pct {
  text-align: center;
  text-align-last: center;
}

#override-pct option {
  text-align: center;
}

/* ── Form fields ──────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

select,
input[type="number"] {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 50, 98, 0.10);
}

input[type="number"]:disabled {
  background: var(--warm-gray);
  color: var(--text-muted);
  cursor: not-allowed;
}

.hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  font-style: italic;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── UC Contribution display ──────────────────── */
.contrib-display {
  background: var(--navy);
  border-radius: 8px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.contrib-label {
  grid-column: 1;
  color: rgba(255, 255, 255, 0.70);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contrib-value {
  grid-column: 2;
  font-family: 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  min-width: 0;
  text-align: center;
}

.contrib-value.na {
  color: var(--mid-gray);
  font-size: 18px;
}

/* ── Override row ─────────────────────────────── */
.override-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.override-row .field {
  flex: 1;
}

.override-badge {
  background: var(--gold-light);
  color: var(--navy);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
  margin-top: 4px;
}

/* ── Tab 1: Estimator layout ──────────────────── */
#tab-estimator .tab-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.left-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.results-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Narrow the UC Contribution card in the results column */
.results-panel .contrib-card {
  width: 50%;
}

/* ── Results table ────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 0 0 9px 9px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--warm-gray);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

thead th:first-child {
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--warm-gray);
  transition: background 0.1s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--warm-gray);
}

tbody tr.na-row {
  opacity: 0.38;
}

td,
tbody th {
  padding: 9px 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Row-header cells (<th scope="row">) and first column cells left-align. */
tbody th[scope="row"] {
  font-weight: 400;
  text-align: left;
}

tbody tr > :first-child {
  text-align: left;
}

/* --- Estimator table: hard right-align value columns --- */
/* Apply only to Tab 1 results table, not comparison tables */
#tab-estimator .results-panel table tbody td:nth-child(2),
#tab-estimator .results-panel table tbody td:nth-child(3),
#tab-estimator .results-panel table tbody td:nth-child(4),
#tab-estimator .results-panel table tbody td:nth-child(5),
#tab-estimator .results-panel table thead th:nth-child(2),
#tab-estimator .results-panel table thead th:nth-child(3),
#tab-estimator .results-panel table thead th:nth-child(4),
#tab-estimator .results-panel table thead th:nth-child(5) {
  text-align: right !important;
}

/* Force YOU PAY cells to right-align number + icon together */
#tab-estimator .results-panel table tbody td.amount.retiree-pays {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px;
  white-space: nowrap;
  width: 100%;
}

/* Keep first column left-aligned */
#tab-estimator .results-panel table thead th:first-child,
#tab-estimator .results-panel table tbody th[scope="row"],
#tab-estimator .results-panel table tbody td:first-child {
  text-align: left !important;
}

/* Ensure the wrapper structure doesn't break alignment rules */
.amount {
  color: var(--text);
  white-space: nowrap;
}

.amount.uc-pays { color: var(--navy); font-weight: 600; }
.amount.retiree-pays { color: var(--red); font-weight: 600; }
.amount.partb { color: var(--green); font-weight: 600; }
.na-cell { color: var(--mid-gray); font-size: 12px; }

/* Keep the number and its value-icon from breaking onto separate lines. */
.amount.retiree-pays,
.amount.partb,
.comp-tbl td.net,
.comp-tbl td.pbv {
  white-space: nowrap;
}

.value-icon {
  white-space: nowrap;
}

/* Notes card on the Medical, Dental Premiums tab */
#tab-estimator .notes-card .disclaimer-text li {
  font-size: 12px;
  line-height: 1.4;
}

/* Increase indentation for Notes on the Medical, Dental Premiums tab */
#tab-estimator .notes-card .disclaimer-text ul {
  padding-left: 16px;
}

/* ── Disclaimer body text ─────────────────────── */
.disclaimer-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.disclaimer-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.disclaimer-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Notes cards */
#tab-estimator .notes-card .disclaimer-text li,
#tab-comparison .notes-card .disclaimer-text li {
  font-size: 12px;
  line-height: 1.4;
}

/* Preserve comparison Notes list indentation */
#tab-comparison .notes-card .disclaimer-text ul {
  padding-left: 18px;
}

/* Medical Plan Comparison: non-zero NET PREMIUM values in red */
.comp-tbl td.net { font-weight: 600; color: var(--navy); }
.comp-tbl td.net.zero { color: var(--navy); }
.comp-tbl td.net.nonzero { color: var(--red); }

#tab-estimator .results-panel table {
  table-layout: fixed;
}

#tab-estimator .results-panel table tbody td:nth-child(5),
#tab-estimator .results-panel table thead th:nth-child(5) {
  text-align: right !important;
}

/* ── Coverage level tooltip ───────────────────── */
.cov-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cov-tip-wrap {
  position: relative;
  display: inline-block;
}

.cov-tip-wrap .cov-tooltip {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  background: var(--navy);
  color: white;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.cov-tip-wrap .cov-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--navy);
}

.cov-tip-wrap:hover .cov-tooltip,
.cov-tip-wrap:focus-within .cov-tooltip {
  display: block;
}

.cov-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: var(--mid-gray);
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  transition: background 0.15s;
  line-height: 1;
}

tr:not(.na-row) .cov-info-btn {
  background: var(--navy);
}

.cov-tip-wrap:hover .cov-info-btn {
  background: var(--gold);
  color: var(--navy);
}

/* ── Legend ───────────────────────────────────── */
.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.legend-item {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.legend-item strong {
  color: var(--navy);
  font-weight: 600;
}

/* ── Value-sign icon (inline after red/green pricing) ─── */
.value-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: right;
  margin-left: 6px;
  vertical-align: middle;
  color: inherit;
  cursor: help;
  outline: none;
}

.value-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
}

.value-icon .value-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.01em;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.value-icon .value-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--navy);
}

.value-icon:hover .value-tip,
.value-icon:focus .value-tip,
.value-icon:focus-visible .value-tip {
  opacity: 1;
  visibility: visible;
}

/* default: numeric values right-aligned */
#tab-estimator .results-panel table td.amount.partb {
  text-align: right !important;
}

/* dash-only cells centered */
#tab-estimator .results-panel table td.amount.partb.partb-dash {
  text-align: center !important;
}

/* ── Disclaimer ───────────────────────────────── */
.disclaimer {
  background: var(--warm-gray);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.disclaimer a {
  color: var(--navy);
}

/* Match the Medical Plan Comparison table width */
#tab-comparison .comparison-disclaimer {
  width: 100%;
  align-self: stretch;
}

/* ── Placeholder ──────────────────────────────── */
.placeholder-msg {
  padding: 44px 24px;
  text-align: center;
  color: var(--text-muted);
}

.placeholder-msg .icon {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.placeholder-msg p {
  font-size: 14px;
}

/* ── Tab 2: Plan Comparison ───────────────────── */
#tab-comparison .tab-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comp-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.comp-meta h2 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
}

.contrib-pill {
  background: var(--navy);
  color: var(--gold);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 18px;
  font-weight: 800;
}

.contrib-pill span {
  color: var(--gold);
  font-weight: 400;
}

.comp-tbl td.net,
.comp-tbl td.net.zero,
.comp-tbl td.net.nonzero,
.comp-tbl td.pbv {
  font-size: 12px;
}

 /* ── Vision, Legal Premiums tab ────────────────── */
 #tab-vl .tab-inner {
   width: 75vw;
   max-width: 1100px;
   margin: 0 auto;
   padding: 32px 0 64px;
   display: flex;
   flex-direction: row;
   align-items: flex-start;
   gap: 20px;
 }

 #tab-vl .card {
   flex: 1 1 calc(50% - 10px);
   min-width: 0;
   margin: 0;
 }

/* Vision Service Plan note */
.vl-note {
  margin: 12px;
  padding: 11px 13px;
  background: var(--warm-gray);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.vl-note strong {
  color: var(--navy);
  font-weight: 700;
}

.comp-wrap {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.comp-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: white;
}

/* Original comparison table header styling */
.comp-tbl thead tr:first-child th {
  background: var(--navy);
  color: white;
  padding: 11px 10px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-right: 2px solid var(--border);
  line-height: 1.3;
  vertical-align: bottom;
}

.comp-tbl thead tr:first-child th:first-child {
  text-align: left;
  min-width: 72px;
  border-right: 2px solid var(--border);
}

.comp-tbl thead tr:nth-child(2) th {
  background: var(--warm-gray);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 8px;
  text-align: center;
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.comp-tbl thead tr:nth-child(2) th:first-child {
  text-align: center;
  border-right: 2px solid var(--border);
}

.comp-tbl tbody tr {
  border-bottom: 1px solid var(--warm-gray);
  transition: background 0.1s;
}

.comp-tbl tbody tr:hover {
  background: #f7f4ec;
}

.comp-tbl tbody tr.na-row {
  opacity: 0.35;
}

.comp-tbl td,
.comp-tbl tbody th {
  padding: 8px 9px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-right: 2px solid var(--warm-gray);
  font-size: 12px;
}

.comp-tbl tbody th[scope="row"] {
  font-weight: 400;
  text-align: left;
  border-right: 2px solid var(--border);
}

.comp-tbl tbody tr > :first-child {
  text-align: left;
  border-right: 2px solid var(--border);
}

.comp-tbl td.grp-sep { border-right: 2px solid var(--border); }
.comp-tbl td.net { font-weight: 600; color: var(--navy); }
.comp-tbl td.net.zero { color: var(--navy); }
.comp-tbl td.pbv { color: var(--green); font-weight: 600; font-size: 11px; }
.comp-tbl td.nav { color: var(--mid-gray); font-size: 11px; }

.plan-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.80);
}
.comp-tbl .plan-badge {
  display: block;
  width: 140px;
  max-width: 100%;
  margin: 5px auto 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
}

/* ── Tab 3: Group 3 Table ─────────────────────── */
#tab-g3 .tab-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.g3-intro {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
}

.g3-intro h3 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}

.g3-intro p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.g3-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.g3-ctrl label {
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text-muted);
}

.g3-ctrl input {
  width: 80px;
  padding: 6px 10px;
  font-size: 13px;
}

.g3-btn {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.g3-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: white;
}

.g3-tbl {
  border-collapse: collapse;
  font-size: 12.5px;
}

.g3-tbl th {
  background: var(--navy);
  color: white;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.g3-tbl th.rh {
  text-align: left;
  min-width: 110px;
}

.g3-tbl th.ah {
  min-width: 44px;
}

.g3-tbl tbody tr {
  border-bottom: 1px solid var(--warm-gray);
}

.g3-tbl tbody tr:hover {
  background: var(--warm-gray);
}

.g3-tbl td {
  padding: 8px 10px;
  text-align: center;
  border-right: 1px solid var(--warm-gray);
  font-variant-numeric: tabular-nums;
}

.g3-tbl td:first-child {
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  background: var(--warm-gray);
  border-right: 2px solid var(--border);
}

.g3-tbl td.zp { color: var(--mid-gray); }
.g3-tbl td.pp { color: var(--navy); }
.g3-tbl td.fp { color: var(--green); font-weight: 700; }

.g3-hl {
  background: var(--navy) !important;
  color: var(--gold) !important;
  font-weight: 700 !important;
  border-radius: 3px;
}

.g3-note {
  background: var(--warm-gray);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   PRINT — Medical Plan Comparison (landscape letter)
   ══════════════════════════════════════════════════ */
@media print {
  @page {
    size: letter landscape;
    margin: 0.3in 0.25in;
  }

  /* Hide navigation and print only the currently selected tab. */
  header,
  .tab-bar {
    display: none !important;
  }

  body {
    background: white;
    font-size: 11pt;
  }

  .tab-panel {
    display: none !important;
  }

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

  /* Preserve the existing comparison-table print appearance. */
  #tab-comparison.active .hint,
  #tab-comparison.active .notes-card,
  #tab-comparison.active .comparison-disclaimer {
    display: none !important;
  }

  #tab-comparison .tab-inner {
    max-width: none;
    width: 100%;
    padding: 0;
    gap: 10px;
  }

  .comp-meta {
    gap: 10px;
    margin-bottom: 6px;
  }

  .comp-meta h2 {
    font-size: 13pt;
  }

  .contrib-pill {
    font-size: 12pt;
    padding: 2px 12px;
    background: var(--navy) !important;
    color: var(--gold) !important;
  }

  .comp-wrap {
    overflow: visible !important;
    border: 1px solid var(--border);
    box-shadow: none;
    border-radius: 0;
    width: 100%;
  }

  .comp-tbl {
    width: 100% !important;
    table-layout: fixed;
    font-size: 8.5pt;
    page-break-inside: avoid;
  }

  /* Print-only heading shrinking — no screen effect */
  #tab-comparison .comp-tbl thead tr:first-child th {
    background: var(--navy);
    color: white;
    font-size: 6.5pt;
    padding: 6px 2px;
    line-height: 1.15;
    letter-spacing: 0;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    vertical-align: bottom;
    border-right: 2px solid var(--border);
  }

  #tab-comparison .comp-tbl thead tr:first-child th:first-child {
    font-size: 8pt;
    padding: 6px 4px !important;
    text-align: center;
    border-right: 2px solid var(--border);
  }

  #tab-comparison .plan-badge {
    display: inline-block;
    font-size: 5.5pt;
    padding: 0 2px;
    margin-top: 1px;
    line-height: 1.2;
    white-space: normal;
  }

  #tab-comparison .comp-tbl thead tr:nth-child(2) th {
    background: var(--warm-gray);
    color: var(--text-muted);
    font-size: 6pt;
    padding: 4px 1px;
    letter-spacing: 0;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
  }

  #tab-comparison .comp-tbl thead tr:nth-child(2) th:first-child {
    font-size: 6.5pt;
    text-align: center;
    border-right: 2px solid var(--border);
  }

  .comp-tbl td,
  .comp-tbl tbody th {
    font-size: 9pt;
    padding: 11px 1px;
    border-right: 2px solid var(--warm-gray);
  }

  .comp-tbl tbody th[scope="row"],
  .comp-tbl tbody tr > :first-child {
    padding: 11px 4px;
    font-size: 9pt;
    border-right: 2px solid var(--border);
  }

  .comp-tbl tbody tr:hover {
    background: none;
  }

  .cov-info-btn,
  .cov-tip-wrap,
  .cov-tooltip {
    display: none !important;
  }

  .cov-cell {
    gap: 0;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }


  /* Medical, Dental Premiums print layout */
  #tab-estimator.active .tab-inner {
    max-width: none;
    width: 100%;
    padding: 0;
    grid-template-columns: 30% 1fr;
    gap: 16px;
  }

  #tab-estimator.active .card {
    box-shadow: none;
    break-inside: avoid;
  }

  #tab-estimator.active .results-panel .contrib-card {
    width: 50%;
  }

  #tab-estimator.active .table-wrap {
    overflow: visible;
  }

  /* Vision, Legal Premiums print layout */
  #tab-vl.active .tab-inner {
    width: 100%;
    max-width: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  #tab-vl.active .card {
    flex: 1 1 50%;
    box-shadow: none;
    break-inside: avoid;
  }

  #tab-vl.active .table-wrap {
    overflow: visible;
  }
}
/* ── Clean Plan Boundaries (Screen View) ── */

/* 1. Darken the left border of every NET PREMIUM column to create the left plan boundary */
.comp-tbl tbody td:nth-child(2n) {
  border-left: 2px solid var(--border) !important;
}

/* 2. Darken the right border of every PART B REIMB. column to create the right plan boundary */
.comp-tbl tbody td:nth-child(2n+1) {
  border-right: 2px solid var(--border) !important;
}

/* 3. Keep the inner line separating Net Premium and Part B thin and clean */
.comp-tbl tbody td:nth-child(2n) {
  border-right: 2px solid var(--warm-gray) !important;
}

/* ── Medical Plan Comparison: fit all columns on larger screens ── */
@media (min-width: 1200px) {
  /* Let the comparison tab use more of the viewport */
  #tab-comparison .tab-inner {
    max-width: min(1600px, 96vw);
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Size columns to the container instead of their content */
  .comp-tbl {
    table-layout: fixed;
    width: 100%;
  }

  /* Allow header text to wrap instead of forcing width */
  .comp-tbl thead tr:first-child th,
  .comp-tbl thead tr:nth-child(2) th {
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 8px 5px;
  }

  .comp-tbl thead tr:nth-child(2) th {
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }

  /* Tighter body cells */
  .comp-tbl td,
  .comp-tbl tbody th {
    padding: 7px 5px;
    font-size: 11.5px;
  }

  /* Plan badge shouldn't force a 140px column */
  .comp-tbl .plan-badge {
    width: auto;
  }

  /* Keep the row-label column readable */
  .comp-tbl thead tr:first-child th:first-child,
  .comp-tbl tbody tr > :first-child {
    width: 90px;
  }
}
