/* ===== Si Se Puede Interview System - CSS ===== */
:root {
  --red: #c8232c;
  --orange: #e06c1a;
  --brown: #8b4513;
  --dark: #333;
  --light: #fff;
  --gray-light: #f8f9fa;
  --gray-medium: #e9ecef;
  --gray-dark: #6c757d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
}

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

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--dark);
  color: var(--light);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.3s ease;
}
.skip-link:focus {
  top: 0;
}

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-light);
  margin: 0;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
header {
  background: var(--dark);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .logo {
  height: 50px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Quick Exit Button - Safety feature for vulnerable users */
.quick-exit-btn {
  margin-left: auto;
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.quick-exit-btn:hover {
  background: #c82333;
  transform: scale(1.05);
}

.quick-exit-btn:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ===== Main Container ===== */
main {
  max-width: 680px;
  margin: 2rem auto;
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  flex: 1;
  width: calc(100% - 2rem);
}

/* ===== Footer ===== */
footer {
  background: var(--dark);
  color: var(--light);
  padding: 1rem;
  text-align: center;
  margin-top: auto;
}

footer p { margin: 0.25rem 0; font-size: 0.85rem; }
footer .security-badge { color: var(--success); font-size: 0.8rem; }

/* ===== Typography ===== */
h1, h2, h3, h4 { margin-top: 0; color: var(--dark); }
h1 { font-size: 2rem; text-align: center; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; font-weight: 300; text-align: center; color: var(--orange); margin-bottom: 1.5rem; }
h3 { font-size: 1.35rem; font-weight: 600; border-bottom: 3px solid var(--orange); padding-bottom: 0.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }

.subtitle { font-size: 1.1rem; color: var(--gray-dark); text-align: center; margin-bottom: 2rem; }
.step-desc { color: var(--gray-dark); margin-bottom: 1.5rem; }

/* ===== Screens ===== */
.screen.hidden { display: none; }
.screen-content { padding: 1rem 0; }
.screen-content.centered { text-align: center; }

/* ===== Language Buttons ===== */
.language-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.language-btn {
  background: var(--red);
  color: var(--light);
  border: none;
  padding: 1.5rem 2rem;
  font-size: 1.25rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  flex: 1;
  min-width: 150px;
  max-width: 250px;
}

.language-btn:hover { background: #b01e26; transform: translateY(-2px); }
.language-btn .lang-title { display: block; font-weight: 700; }
.language-btn .lang-subtitle { display: block; font-size: 0.9rem; margin-top: 0.5rem; opacity: 0.9; }

/* ===== Info Card ===== */
.info-card {
  background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
  border: 1px solid #b3d9ff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.feature-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.feature-list li { padding: 0.5rem 0; font-size: 1rem; }
.checklist,
.glossary-list {
  margin: 0.5rem 0 0;
  padding-left: 1.5rem;
}

.checklist li,
.glossary-list li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  font-family: inherit;
}

.btn-primary { background: var(--orange); color: var(--light); }
.btn-primary:hover { background: var(--red); transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-secondary { background: var(--gray-dark); color: var(--light); }
.btn-secondary:hover { background: #495057; }

.btn-success { background: var(--success); color: var(--light); }
.btn-success:hover { background: #218838; }

.btn-text { background: transparent; color: var(--gray-dark); box-shadow: none; text-decoration: underline; }
.btn-text:hover { color: var(--dark); }

.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn:disabled { background: var(--gray-medium); cursor: not-allowed; transform: none; }

.button-group { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.button-group .btn-lg { width: 100%; max-width: 280px; }

/* ===== Progress Bar ===== */
.progress-wrapper { margin-bottom: 1.5rem; }
.progress-bar { height: 8px; background: var(--gray-medium); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--red)); width: 0%; transition: width 0.4s ease; }
.progress-text { display: block; text-align: center; font-size: 0.85rem; color: var(--gray-dark); margin-top: 0.5rem; }

/* ===== Form Elements ===== */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-size: 0.95rem;
}

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

input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 16px;
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  font-family: inherit;
  background: var(--light);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 108, 26, 0.15);
}

input.error, select.error { border-color: var(--danger); }
textarea { resize: vertical; min-height: 80px; }

.field-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.25rem; min-height: 1.2rem; }

.age-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-md);
  color: #856404;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
}

/* ===== Help Tips ===== */
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  margin-left: 4px;
}

.help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: normal;
  max-width: 250px;
  white-space: normal;
  display: none;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  line-height: 1.4;
}

.help-tip:hover::after, .help-tip:focus::after { display: block; }

/* ===== Card Options ===== */
.card-options { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }

.card-option { display: block; cursor: pointer; }
.card-option input { display: none; }

.card-option .card-body {
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.3s ease;
  background: var(--light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-option:hover .card-body { border-color: var(--orange); background: #fff8f5; }
.card-option input:checked + .card-body { border-color: var(--orange); background: #fff8f5; box-shadow: 0 0 0 3px rgba(224, 108, 26, 0.2); }

.card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.card-option h4 { margin: 0 0 0.5rem; color: var(--dark); }
.card-option p { margin: 0; color: var(--gray-dark); font-size: 0.9rem; }

/* ===== Checkbox Styles ===== */
.checkbox-inline { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.checkbox-inline input[type="checkbox"] { width: auto; margin: 0; }
.checkbox-inline label { margin: 0; font-weight: normal; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 1rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  accent-color: var(--orange);
}

.checkbox-label span { font-size: 0.95rem; line-height: 1.4; }

/* ===== Conditional Sections ===== */
.conditional-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--gray-medium);
  animation: fadeIn 0.3s ease;
}

.conditional-section.hidden { display: none; }

/* ===== Info & Warning Boxes ===== */
.info-note {
  display: flex;
  gap: 0.75rem;
  background: #f0f8ff;
  border: 1px solid #b3d9ff;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.info-note.compact { padding: 0.75rem; font-size: 0.9rem; }
.note-icon { font-size: 1.25rem; flex-shrink: 0; }
.info-note p { margin: 0; }

.warning-box {
  display: flex;
  gap: 0.75rem;
  background: #fff8e6;
  border: 1px solid #ffd966;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.warning-icon { font-size: 1.5rem; flex-shrink: 0; }
.warning-box strong { color: #856404; display: block; margin-bottom: 0.25rem; }
.warning-box p { margin: 0; color: #856404; font-size: 0.95rem; }
.warning-box.hidden { display: none; }

/* ===== Powers Grid ===== */
.powers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.power-item {
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.power-item:hover { border-color: var(--orange); background: #fff8f5; }
.power-item:has(input:checked) { border-color: var(--orange); background: #fff8f5; }

.power-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  width: 100%;
}

.power-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer;
}

.power-check { display: none; }

.power-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.power-text strong {
  font-size: 0.95rem;
  color: var(--dark);
}

.power-text small {
  font-size: 0.85rem;
  color: var(--gray-dark);
  line-height: 1.4;
}

/* ===== Steps ===== */
.step { animation: fadeIn 0.3s ease; }
.step.hidden { display: none; }

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

/* ===== Navigation Buttons ===== */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-medium);
}

/* ===== Dynamic Content (Children/Guardians) ===== */
.child-entry, .guardian-entry {
  background: var(--gray-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--gray-medium);
}

.child-entry h4, .guardian-entry h4 {
  color: var(--orange);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-medium);
}

.section-heading {
  color: var(--orange);
  font-size: 1.1rem;
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
}

/* ===== Understanding List ===== */
.understanding-list {
  background: var(--gray-light);
  padding: 1rem 1rem 1rem 2rem;
  border-radius: var(--radius);
  margin: 0.5rem 0 1rem;
}

.understanding-list li { margin-bottom: 0.5rem; font-size: 0.95rem; }

/* ===== Review Container ===== */
.review-container { margin: 1.5rem 0; }

.review-section { margin-bottom: 1.5rem; }
.review-section h4 { color: var(--orange); border-bottom: 2px solid var(--orange); padding-bottom: 0.5rem; margin-bottom: 1rem; }

.review-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-light); }
.review-item:last-child { border-bottom: none; }
.review-label { font-weight: 500; color: var(--gray-dark); }
.review-value { text-align: right; font-weight: 500; }
.review-value.missing { color: var(--danger); font-style: italic; }

/* ===== Terms Section ===== */
.terms-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--gray-medium); }

.terms-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  background: var(--gray-light);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.terms-scroll::-webkit-scrollbar { width: 8px; }
.terms-scroll::-webkit-scrollbar-track { background: var(--gray-medium); border-radius: 4px; }
.terms-scroll::-webkit-scrollbar-thumb { background: var(--gray-dark); border-radius: 4px; }

.signature-section { margin-top: 1.5rem; }
.signature-input { font-family: 'Brush Script MT', cursive; font-size: 1.5rem; text-align: center; }
.signature-note { font-size: 0.85rem; color: var(--gray-dark); margin-top: 0.5rem; text-align: center; }

/* ===== Completion Screen ===== */
.completion-header { text-align: center; margin-bottom: 2rem; }
.completion-icon { font-size: 4rem; margin-bottom: 1rem; }

.completion-options { display: flex; flex-direction: column; gap: 1.5rem; margin: 2rem 0; }

.option-card {
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.option-card.featured { border-color: var(--orange); background: #fff8f5; }

.option-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.option-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.option-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; border: none; padding: 0; }
.option-card p { color: var(--gray-dark); margin-bottom: 1rem; font-size: 0.95rem; }
.option-card .btn { width: 100%; }

.notary-reminder {
  display: flex;
  gap: 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: left;
}

.reminder-icon { font-size: 1.5rem; flex-shrink: 0; }
.notary-reminder strong { color: #856404; display: block; margin-bottom: 0.25rem; }
.notary-reminder p { margin: 0; font-size: 0.95rem; color: #856404; }

.completion-actions { text-align: center; margin-top: 2rem; }

/* ===== Email Confirmation Card ===== */
.email-confirmation-card {
  background: var(--gray-light);
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.email-confirmation-card h4 {
  color: var(--dark);
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.email-confirmation-card p {
  color: var(--gray-dark);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.email-form-inline {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.email-form-inline input[type="email"] {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  font-size: 1rem;
}

.email-form-inline input[type="email"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 108, 26, 0.1);
}

.email-form-inline .btn {
  white-space: nowrap;
}

.email-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.email-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.email-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.email-status.sending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

@media (max-width: 480px) {
  .email-form-inline {
    flex-direction: column;
  }
  .email-form-inline input[type="email"] {
    max-width: 100%;
  }
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.overlay.hidden { display: none; }

.overlay-content {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.overlay-icon { font-size: 3rem; margin-bottom: 1rem; }
.overlay-content h2 { color: var(--red); }

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-medium);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.radio-group .radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: normal;
}

.radio-group .radio-label:hover {
  background: var(--gray-medium);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== Noscript Warning ===== */
.noscript-warning {
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: var(--radius);
  margin: 1rem;
  text-align: center;
}

/* ===== Utility Classes ===== */
.hidden { display: none !important; }

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  main { margin: 1rem auto; padding: 1.25rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  .form-row { grid-template-columns: 1fr; }
  .language-btn { padding: 1.25rem 1.5rem; font-size: 1.1rem; }
  .nav-buttons { flex-direction: column-reverse; }
  .nav-buttons .btn { width: 100%; }
  .review-item { flex-direction: column; gap: 0.25rem; }
  .review-value { text-align: left; }
}

@media (max-width: 480px) {
  header { padding: 0.75rem 1rem; }
  header .logo { height: 40px; }
  main { padding: 1rem; }
}

/* ===== Radio Options ===== */
.radio-options, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-option, .radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--light);
}

.radio-option:hover, .radio-label:hover {
  border-color: var(--orange);
  background: #fff8f5;
}

.radio-option:has(input:checked), .radio-label:has(input:checked) {
  border-color: var(--orange);
  background: #fff8f5;
  box-shadow: 0 0 0 3px rgba(224, 108, 26, 0.15);
}

.radio-option input[type="radio"], .radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer;
}

.radio-option span, .radio-label span {
  flex: 1;
  line-height: 1.5;
}

/* ===== Date Option Cards ===== */
.date-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.date-option-card {
  border: 2px solid var(--gray-medium);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--light);
}

.date-option-card:hover {
  border-color: var(--orange);
  background: #fff8f5;
}

.date-option-card:has(input:checked) {
  border-color: var(--orange);
  background: #fff8f5;
  box-shadow: 0 0 0 3px rgba(224, 108, 26, 0.15);
}

.date-option-card input[type="radio"] {
  display: none;
}

.date-option-highlight {
  background: #e8f5e9;
  border-color: #4caf50;
}

.date-option-highlight:hover {
  background: #c8e6c9;
}

.date-option-highlight .date-option-title {
  color: #2e7d32;
}

.date-option-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--dark);
}

.date-option-desc {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.4;
}

/* ===== Download Links ===== */
.download-links {
  margin-top: 1rem;
  text-align: center;
}

.download-links a {
  display: inline-block;
  color: var(--orange);
  margin: 0.25rem 0.5rem;
  text-decoration: underline;
}

.download-links a:hover {
  color: var(--red);
}

/* ===== Improved Mobile Responsiveness ===== */
@media (max-width: 480px) {
  .date-option-card {
    padding: 0.75rem;
  }

  .date-option-title {
    font-size: 0.95rem;
  }

  .date-option-desc {
    font-size: 0.85rem;
  }

  .powers-grid {
    grid-template-columns: 1fr;
  }

  .info-box > div {
    display: block !important;
  }

  .info-box ul {
    margin-bottom: 0.5rem;
  }
}

/* ===== Warning Box ===== */
.warning-box {
  background: #fff8e1;
  border: 2px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.warning-box.compact {
  padding: 0.75rem;
}

.warning-box .warning-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.warning-box strong {
  display: block;
  color: #f57c00;
  margin-bottom: 0.25rem;
}

.warning-box p {
  margin: 0;
  color: #5d4037;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== Accessibility Improvements ===== */
/* Focus visible styles for keyboard navigation */
*:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1976d2;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.2);
}

/* Skip link styling */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1976d2;
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }

  .card-option {
    border-width: 3px;
  }

  .legal-term {
    border-bottom-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Legal Term Glossary Tooltips ===== */
.legal-term {
  border-bottom: 1px dashed #1976d2;
  cursor: help;
  position: relative;
  color: #1976d2;
  font-weight: 500;
}

.legal-term::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  width: max-content;
  max-width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  pointer-events: none;
}

.legal-term::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 101;
}

.legal-term:hover::after,
.legal-term:hover::before,
.legal-term:focus::after,
.legal-term:focus::before {
  opacity: 1;
  visibility: visible;
}

/* Mobile: tap to show tooltip */
@media (max-width: 768px) {
  .legal-term::after {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
  }

  .legal-term::before {
    display: none;
  }
}

/* ===== Next Steps Checklist ===== */
.next-steps-checklist {
  background: #e3f2fd;
  border: 2px solid #1976d2;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.next-steps-checklist h4 {
  margin: 0 0 1rem;
  color: #1565c0;
}

.next-steps-checklist ol.checklist {
  margin: 0;
  padding-left: 1.5rem;
}

.next-steps-checklist ol.checklist li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: var(--dark);
}

.next-steps-checklist ol.checklist li strong {
  color: #1565c0;
}

/* ===== SSN Notice ===== */
.ssn-notice {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.ssn-notice .notice-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.ssn-notice p {
  margin: 0;
  color: #2e7d32;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ===== Consent Checkbox ===== */
.consent-checkbox {
  background: #fff8e1;
  border: 2px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.consent-checkbox label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 500;
}

.consent-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: #f57c00;
}

/* ===== Simplified Welcome Screen ===== */
.welcome-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gray-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--dark);
}

.highlight-item.highlight-safe {
  background: #e8f5e9;
  color: #2e7d32;
}

.welcome-subtext {
  text-align: center;
  color: var(--gray-dark);
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
}

.learn-more-section {
  margin-top: 2rem;
  border: 1px solid var(--gray-medium);
  background: var(--gray-light);
}

.learn-more-section summary {
  color: var(--gray-dark);
  font-weight: 500;
}

.learn-more-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-medium);
}

.learn-more-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.learn-more-block h4 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--dark);
}

.learn-more-block p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.5;
}

.compact-list {
  margin: 0;
  padding-left: 1.25rem;
}

.compact-list li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== Simplified Completion Screen ===== */
.completion-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.completion-header .completion-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.completion-header h2 {
  margin-bottom: 0;
}

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

.option-card {
  padding: 1.25rem;
  text-align: center;
}

.option-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  border: none;
  padding: 0;
}

.option-card p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--gray-dark);
}

.email-confirmation-compact {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.email-confirmation-compact .email-form-inline {
  justify-content: center;
}

.next-steps-compact {
  background: #e3f2fd;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.next-steps-compact h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #1565c0;
}

.next-steps-compact .compact-list {
  margin: 0;
}

.additional-tips {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.additional-tips li {
  margin-bottom: 0.25rem;
}

/* ===== Responsive adjustments for simplified screens ===== */
@media (max-width: 600px) {
  .completion-options {
    grid-template-columns: 1fr;
  }

  .welcome-highlights {
    gap: 0.5rem;
  }

  .highlight-item {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* ===== Print Styles ===== */
@media print {
  /* Hide navigation elements */
  header, footer, .nav-buttons, .progress-wrapper,
  .btn, button, .hidden, .language-button { display: none !important; }

  /* Reset page layout */
  body { background: white; font-size: 12pt; }
  main { box-shadow: none; max-width: 100%; margin: 0; padding: 0; }

  /* Show only the review screen */
  .screen:not(#step-review) { display: none !important; }
  #step-review { display: block !important; padding: 0; }

  /* Review section styling */
  .review-section {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    padding: 1rem;
  }

  .review-section h3 {
    font-size: 14pt;
    margin-top: 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
  }

  .review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dotted #ddd;
  }

  .review-label { font-weight: 600; }
  .review-value { text-align: right; }

  /* Page breaks */
  h2 { page-break-before: auto; page-break-after: avoid; }
  .review-section { page-break-before: auto; }

  /* Ensure text is readable */
  * { color: black !important; }
  a { text-decoration: underline; }
}
