/* ============================================
   ZANER LAW 401(k) ENROLLMENT - STYLES
   Aesthetic: Corporate Elegance
   ============================================ */

:root {
  --navy: #151544;
  --navy-light: #1e1e5a;
  --navy-mid: #2a2a6e;
  --gold: #c9a84c;
  --gold-light: #e4cc7a;
  --gold-pale: #f5ecd0;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --cream: #faf9f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --red: #dc2626;
  --red-light: #fef2f2;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --blue-info: #2563eb;
  --blue-light: #eff6ff;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px rgba(21,21,68,0.06);
  --shadow-md: 0 4px 12px rgba(21,21,68,0.08);
  --shadow-lg: 0 8px 30px rgba(21,21,68,0.12);
  --shadow-xl: 0 20px 50px rgba(21,21,68,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- BRAND HEADER ---- */
.brand-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.brand-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.brand-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.header-center {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcm-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

.logo-block { text-align: left; }

.logo-text {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
}

.logo-zaner { font-style: italic; }
.logo-law { font-weight: 400; }

.logo-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 4px;
  opacity: 0.7;
  margin-top: 2px;
}

.logo-tagline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 2px;
}

.gold-diamond { color: var(--gold); font-size: 8px; vertical-align: middle; }

.header-right { text-align: right; flex: 1; }

.form-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-subtitle {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 2px;
}

/* ---- APP LAYOUT ---- */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 100px);
}

/* ---- STEPPER NAV ---- */
.stepper {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 24px 0;
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 13px;
  color: var(--gray-400);
  border-left: 3px solid transparent;
}

.step-item:hover { background: var(--gray-50); color: var(--gray-600); }

.step-item.active {
  color: var(--navy);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(201,168,76,0.08), transparent);
  border-left-color: var(--gold);
}

.step-item.completed { color: var(--green); }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--gray-300);
  background: var(--white);
  transition: var(--transition);
}

.step-item.active .step-num {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.step-item.completed .step-num {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.step-label { line-height: 1.3; }

/* ---- MAIN FORM AREA ---- */
.form-main {
  padding: 32px 40px 40px;
  min-height: 500px;
}

.step-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- SECTION STYLES ---- */
.section-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-header p {
  font-size: 14px;
  color: var(--gray-500);
}

.section-number {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ---- FORM GRID ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid .full-width { grid-column: 1 / -1; }
.form-grid .third { grid-column: span 1; }

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

/* ---- FORM FIELDS ---- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.3px;
}

.field-group label .required {
  color: var(--red);
  margin-left: 2px;
}

.field-group input:not([type="radio"]):not([type="checkbox"]),
.field-group select,
.field-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  width: 100%;
}

.field-group input:not([type="radio"]):not([type="checkbox"]):focus,
.field-group select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(21,21,68,0.1);
}

.field-group input:not([type="radio"]):not([type="checkbox"]).error,
.field-group select.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.field-error {
  font-size: 12px;
  color: var(--red);
  display: none;
}

.field-error.visible { display: block; }

.field-group input::placeholder { color: var(--gray-400); }

/* ---- RADIO & CHECKBOX GROUPS ---- */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-group.horizontal, .checkbox-group.horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-group.horizontal > .radio-option,
.checkbox-group.horizontal > .checkbox-option {
  padding: 12px 20px;
  white-space: nowrap;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
  background: var(--white);
}

.radio-option:hover, .checkbox-option:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.radio-option.selected {
  border-color: var(--navy);
  background: linear-gradient(135deg, rgba(21,21,68,0.03), rgba(201,168,76,0.03));
  box-shadow: 0 0 0 3px rgba(21,21,68,0.08);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--navy);
  flex-shrink: 0;
}

.radio-option .option-content { flex: 1; }

.option-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.radio-group:not(.horizontal) .option-label,
.checkbox-group:not(.horizontal) .option-label {
  display: block;
}

.option-desc {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 2px;
  line-height: 1.5;
}

/* Card-style radio for big choices */
.card-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-radio-group .card-radio {
  flex: 1 1 120px;
  min-width: 100px;
}

.card-radio {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--white);
}

.card-radio:hover {
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.card-radio.selected {
  border-color: var(--navy);
  background: linear-gradient(135deg, rgba(21,21,68,0.04), rgba(201,168,76,0.04));
  box-shadow: 0 0 0 3px rgba(21,21,68,0.08);
}

.card-radio input { display: none; }

.card-radio .card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.card-radio .card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
}

.card-radio .card-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ---- INFO BOXES ---- */
.info-box {
  background: var(--blue-light);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue-info);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 13.5px;
  line-height: 1.7;
}

.info-box.gold {
  background: var(--gold-pale);
  border-color: var(--gold);
  border-left-color: var(--gold);
}

.info-box.green {
  background: var(--green-light);
  border-color: #86efac;
  border-left-color: var(--green);
}

.info-box h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.info-box ul {
  margin: 8px 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-box strong { font-weight: 700; }

/* ---- MATCH CALCULATOR ---- */
.calc-box {
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
}

.calc-box h4 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 16px;
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.calc-result {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.calc-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.calc-stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-light);
}

/* ---- BENEFICIARY SECTION ---- */
.bene-pct-total {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin: 8px 0 4px;
  display: none;
}

.bene-pct-total.bene-pct-ok {
  display: block;
  color: var(--green);
  background: var(--green-light);
  border: 1px solid #86efac;
}

.bene-pct-total.bene-pct-warn {
  display: block;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.bene-pct-total.bene-pct-error {
  display: block;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid var(--red);
}

.beneficiary-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--white);
}

.beneficiary-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--gray-500);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.add-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--gray-50);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-body);
  padding: 4px 8px;
  border-radius: 4px;
}

.remove-btn:hover { background: var(--red-light); }

/* ---- DISCLOSURES ---- */
.disclosure-section {
  margin-bottom: 24px;
}

.disclosure-section h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}

.disclosure-section ul {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ---- SIGNATURE PAD ---- */
.signature-container {
  margin-top: 8px;
}

.signature-pad {
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  height: 120px;
}

.signature-pad.signing { border-color: var(--navy); }

.sig-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sig-clear {
  font-size: 12px;
  color: var(--gray-500);
  background: none;
  border: 1px solid var(--gray-300);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
}

.sig-clear:hover { background: var(--gray-50); }

/* ---- ACKNOWLEDGMENTS ---- */
.ack-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ack-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--gray-600);
  transition: var(--transition);
}

.ack-item:has(input:checked) {
  border-color: var(--green);
  background: var(--green-light);
}

.ack-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--navy);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ---- REVIEW SUMMARY ---- */
.review-section {
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.review-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.review-edit-btn {
  font-size: 12px;
  color: var(--blue-info);
  background: none;
  border: 1px solid var(--blue-info);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
}

.review-edit-btn:hover {
  background: var(--blue-light);
}

.review-body {
  padding: 16px 20px;
}

.review-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13.5px;
}

.review-row:last-child { border-bottom: none; }

.review-label {
  width: 200px;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--gray-600);
}

.review-value { color: var(--gray-800); }

/* ---- NAV BUTTONS ---- */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: var(--shadow-md);
}

.btn-gold:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-outline-gold {
  background: none;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}

.btn-outline-gold:hover {
  background: rgba(201,168,76,0.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-outline {
  background: none;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover {
  background: rgba(21,21,68,0.06);
}

.nav-left, .nav-right { display: flex; gap: 10px; align-items: center; }

.save-indicator {
  font-size: 12px;
  color: var(--gray-400);
  font-style: italic;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  transform: translateY(80px);
  opacity: 0;
  transition: 0.3s ease;
  z-index: 999;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ---- ENROLLMENT CHOICE (big cards) ---- */
.enrollment-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
  margin: 32px auto;
}

.enrollment-card {
  border: 2.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

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

.enrollment-card.selected-yes {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.1);
}

.enrollment-card.selected-no {
  border-color: var(--gray-400);
  background: var(--gray-100);
}

.enrollment-card .ec-icon { font-size: 40px; margin-bottom: 12px; }
.enrollment-card .ec-title { font-weight: 700; font-size: 18px; margin-bottom: 6px; color: var(--navy); }
.enrollment-card .ec-desc { font-size: 13px; color: var(--gray-500); }
.enrollment-card input { display: none; }

/* ---- COLLAPSIBLE ---- */
.collapsible { margin-bottom: 12px; }

.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  transition: var(--transition);
}

.collapsible-trigger:hover { background: var(--gray-100); }

.collapsible-trigger .arrow {
  transition: transform 0.2s;
  font-size: 12px;
}

.collapsible-trigger.open .arrow { transform: rotate(180deg); }

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapsible-body.open {
  max-height: 2000px;
}

.collapsible-body-inner {
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--white);
}

/* ---- PROGRESS BAR (in stepper) ---- */
.stepper-progress {
  height: 4px;
  background: var(--gray-200);
  margin: 0 20px 16px;
  border-radius: 2px;
  overflow: hidden;
}

.stepper-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.4s ease;
  border-radius: 2px;
}

/* ---- RESPONSIVE: TABLET (max-width: 900px) ---- */
@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
  }

  .stepper {
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: wrap;
    padding: 12px;
    gap: 4px;
    max-height: none;
  }

  .step-item {
    padding: 6px 10px;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 11px;
  }

  .step-item.active { border-bottom-color: var(--gold); border-left: none; }
  .step-label { display: none; }
  .stepper-progress { display: none; }

  .form-main { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .brand-header-inner { flex-direction: column; text-align: center; padding: 12px 16px; }
  .header-left { justify-content: center; flex: none; }
  .header-center { order: -1; }
  .tcm-logo { width: 48px; height: 48px; }
  .header-right { text-align: center; }
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-result { grid-template-columns: 1fr; }
  .enrollment-choice { grid-template-columns: 1fr; }
  .radio-group.horizontal .radio-option { flex: 1 1 45%; }
  .card-radio-group .card-radio { flex: 1 1 45%; }
}

/* ---- RESPONSIVE: MOBILE (max-width: 600px) ---- */
@media (max-width: 600px) {
  /* -- Header -- */
  .brand-header-inner {
    flex-direction: column;
    text-align: center;
    padding: 10px 12px;
    gap: 8px;
  }
  .header-left { justify-content: center; flex: none; }
  .header-center { order: -1; }
  .tcm-logo { width: 40px; height: 40px; }
  .logo-text { font-size: 24px; letter-spacing: 1px; }
  .logo-sub { font-size: 8px; letter-spacing: 2px; }
  .logo-tagline { font-size: 9px; letter-spacing: 2px; }
  .header-right { text-align: center; flex: none; }
  .form-title { font-size: 18px; }
  .form-subtitle { font-size: 11px; }
  .auth-status { justify-content: center; flex-wrap: wrap; }

  /* -- Stepper as compact scroll strip -- */
  .stepper {
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 6px;
    gap: 2px;
    max-height: none;
    scrollbar-width: none;
  }
  .stepper::-webkit-scrollbar { display: none; }
  .step-item {
    padding: 6px 8px;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 11px;
    flex-shrink: 0;
    min-width: auto;
  }
  .step-item.active { border-bottom-color: var(--gold); border-left: none; }
  .step-label { display: none; }
  .step-num { width: 24px; height: 24px; font-size: 10px; }
  .stepper-progress { display: none; }

  /* -- Form area -- */
  .form-main { padding: 16px 12px 24px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-row { flex-direction: column; gap: 14px; }

  /* -- Section headers -- */
  .section-header { margin-bottom: 20px; padding-bottom: 12px; }
  .section-header h2 { font-size: 22px; }
  .section-header p { font-size: 13px; }
  .section-number { font-size: 11px; letter-spacing: 1.5px; }

  /* -- Fields -- */
  .field-group input:not([type="radio"]):not([type="checkbox"]),
  .field-group select,
  .field-group textarea {
    padding: 12px 14px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .field-group label { font-size: 12px; }

  /* -- Radio & checkboxes -- */
  .radio-group.horizontal, .checkbox-group.horizontal {
    flex-direction: column;
  }
  .radio-group.horizontal > .radio-option,
  .checkbox-group.horizontal > .checkbox-option {
    white-space: normal;
    padding: 10px 14px;
  }
  .radio-option, .checkbox-option { padding: 10px 12px; gap: 8px; }
  .option-label { font-size: 13px; }
  .option-desc { font-size: 12px; }

  /* -- Card radios -- */
  .card-radio-group { gap: 8px; }
  .card-radio-group .card-radio { flex: 1 1 100%; min-width: 0; }
  .card-radio { padding: 12px 10px; }
  .card-radio .card-icon { font-size: 24px; margin-bottom: 6px; }
  .card-radio .card-title { font-size: 13px; }
  .card-radio .card-desc { font-size: 11px; }

  /* -- Info boxes -- */
  .info-box { padding: 12px 14px; font-size: 13px; }
  .info-box h4 { font-size: 13px; }

  /* -- Calculator -- */
  .calc-box { padding: 16px; margin: 16px 0; }
  .calc-box h4 { font-size: 17px; margin-bottom: 12px; }
  .calc-inputs { grid-template-columns: 1fr; gap: 12px; }
  .calc-result { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .calc-stat-label { font-size: 10px; letter-spacing: 1px; }
  .calc-stat-value { font-size: 22px; }

  /* -- Beneficiary cards -- */
  .beneficiary-card { padding: 14px; }
  .beneficiary-card h4 { font-size: 14px; flex-direction: column; gap: 8px; align-items: flex-start; }

  /* -- Enrollment choice (Yes/No) -- */
  .enrollment-choice { grid-template-columns: 1fr; gap: 12px; margin: 20px auto; }
  .enrollment-card { padding: 24px 16px; }
  .enrollment-card .ec-icon { font-size: 32px; margin-bottom: 8px; }
  .enrollment-card .ec-title { font-size: 16px; }
  .enrollment-card .ec-desc { font-size: 12px; }

  /* -- Disclosure sections -- */
  .disclosure-section h4 { font-size: 16px; }
  .disclosure-section ul { font-size: 13px; margin-left: 16px; }

  /* -- Signature pad -- */
  .signature-pad { height: 100px; }
  .sig-actions { flex-wrap: wrap; }

  /* -- Acknowledgments -- */
  .ack-item { padding: 10px 12px; font-size: 13px; }
  .ack-item input[type="checkbox"] { width: 18px; height: 18px; }

  /* -- Review -- */
  .review-section { margin-bottom: 16px; }
  .review-header { padding: 10px 14px; }
  .review-header h4 { font-size: 14px; }
  .review-body { padding: 12px 14px; }
  .review-row { flex-direction: column; gap: 2px; padding: 6px 0; }
  .review-label { width: auto; font-size: 12px; }
  .review-value { font-size: 13px; }

  /* -- Navigation buttons -- */
  .form-nav { flex-direction: column; gap: 12px; margin-top: 24px; padding-top: 16px; }
  .nav-left, .nav-right { width: 100%; justify-content: center; }
  .btn { width: 100%; justify-content: center; padding: 14px 24px; font-size: 15px; }
  .btn-sm { padding: 10px 16px; font-size: 13px; }
  .save-indicator { text-align: center; order: -1; width: 100%; }

  /* -- Collapsibles -- */
  .collapsible-trigger { padding: 10px 12px; font-size: 13px; }
  .collapsible-body-inner { padding: 12px; }

  /* -- Toast -- */
  .toast { bottom: 12px; right: 12px; left: 12px; text-align: center; font-size: 13px; }

  /* -- Confirmation screen -- */
  .confirmation-screen { padding: 24px 12px; }
  .confirmation-icon { width: 56px; height: 56px; font-size: 28px; }
  .confirmation-details { padding: 14px 16px; }
  .confirmation-detail-row { flex-direction: column; gap: 2px; padding: 6px 0; }
  .confirmation-label { font-size: 12px; }
  .confirmation-value { font-size: 13px; }
  .confirmation-account { padding: 16px; }
  .confirmation-account h3 { font-size: 17px; }

  /* -- Gate / Login / Forgot Password / Reset screens -- */
  .gate-overlay { padding: 16px; align-items: flex-start; padding-top: 10vh; }
  .gate-card { padding: 24px 20px; max-width: 100%; border-radius: var(--radius-md); }
  .gate-header h3 { font-size: 20px; }
  .gate-header p { font-size: 12px; }
  .gate-form { gap: 14px; }
  .gate-submit { padding: 14px; font-size: 15px; }
  .gate-link { font-size: 12px; margin-top: 12px; }

  /* -- Auth modal -- */
  .auth-modal { padding: 24px 20px; max-width: 100%; margin: 16px; border-radius: var(--radius-md); }
  .auth-header h3 { font-size: 20px; }
  .auth-header p { font-size: 12px; }
  .auth-tabs { margin-bottom: 16px; }
  .auth-tab { font-size: 13px; padding: 8px; }
  .auth-form { gap: 14px; }
  .auth-submit { padding: 14px; font-size: 15px; }

  /* -- Cloud status -- */
  .cloud-status { font-size: 10px; }
}

/* ---- CONFIRMATION SCREEN ---- */
.app-container.submission-mode {
  grid-template-columns: 1fr;
}

.app-container.submission-mode .form-main {
  max-width: 700px;
  margin: 0 auto;
}

.confirmation-screen {
  text-align: center;
  padding: 48px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.confirmation-details {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
  text-align: left;
}

.confirmation-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.confirmation-detail-row:last-child {
  border-bottom: none;
}

.confirmation-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.confirmation-value {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}

.confirmation-account {
  background: var(--cream);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 8px;
}

/* ---- AUTH MODAL ---- */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21,21,68,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.auth-overlay.open { display: flex; }

.auth-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.auth-close:hover { color: var(--gray-700); }

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-header h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 13px;
  color: var(--gray-500);
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.auth-tab:hover { color: var(--gray-600); }

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

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-error {
  display: none;
  padding: 10px 14px;
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 13px;
}

.auth-error.visible { display: block; }

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---- AUTH STATUS (header) ---- */
.auth-status {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auth-status .auth-user {
  opacity: 0.7;
}

.auth-status .auth-link {
  color: var(--gold-light);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
}

.auth-status .auth-link:hover {
  color: var(--gold);
}

/* ---- CLOUD SAVE INDICATOR ---- */
.cloud-status {
  font-size: 11px;
  color: var(--gray-400);
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cloud-status.saving { color: var(--gold); }
.cloud-status.saved { color: var(--green); }
.cloud-status.error { color: var(--red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.cloud-status.saving::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 1s infinite;
}

.cloud-status.saved::before {
  content: '\2713';
  font-style: normal;
}

/* ---- GATE / LOGIN / FORGOT SCREENS ---- */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21,21,68,0.6);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.gate-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.gate-header {
  text-align: center;
  margin-bottom: 20px;
}

.gate-header h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.gate-header p {
  font-size: 13px;
  color: var(--gray-500);
}

.gate-form { display: flex; flex-direction: column; gap: 16px; }

.gate-submit { width: 100%; }

.gate-error {
  display: none;
  padding: 10px 14px;
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 13px;
}

.gate-error.visible { display: block; }

.gate-error.success {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}

.gate-error.info {
  border-color: var(--blue-info);
  background: var(--blue-light);
  color: var(--blue-info);
}

.gate-success {
  display: none;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #22c55e;
  border-radius: var(--radius-sm);
  color: #16a34a;
  font-size: 13px;
}

.gate-success.visible { display: block; }

.gate-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

.gate-link a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.gate-link a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.gate-link.gate-forgot { margin-top: 12px; }

.gate-link.gate-forgot a {
  color: var(--gray-500);
  font-weight: 400;
}

.gate-link.gate-forgot a:hover { color: var(--gold); }

/* ---- PRINT STYLES ---- */
@media print {
  body { background: white; font-size: 11px; }

  .brand-header {
    position: static;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .stepper, .form-nav, .btn, .sig-actions, .save-indicator, .toast,
  .add-btn, .remove-btn, .review-edit-btn, .collapsible-trigger .arrow,
  .auth-overlay, .auth-status, .cloud-status, .gate-overlay { display: none !important; }

  .app-container { grid-template-columns: 1fr; display: block; }
  .form-main { padding: 20px; }

  .step-content { break-inside: avoid; }

  .review-section { break-inside: avoid; border: 1px solid #ccc; }
  .review-header { background: #f3f4f6 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .collapsible-body { max-height: none !important; overflow: visible !important; }

  .signature-pad { border: 1px solid #ccc; }

  .radio-option, .checkbox-option, .enrollment-card, .card-radio, .ack-item { border: 1px solid #ddd; }
  .radio-option.selected, .card-radio.selected { border: 2px solid #333; }

  .info-box, .calc-box { border: 1px solid #ccc; }
  .calc-result { color: black; background: #f3f4f6 !important; print-color-adjust: exact; }
  .calc-stat-value { color: #333; }

  .print-section { page-break-before: always; }
  .print-section:first-child { page-break-before: auto; }
}
