/* CSS Variables */
:root {
  --bg: #0f172a;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  --card-bg: #1e293b;
  --card-bg-hover: #263548;
  --results-bg: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --color-a: #6366f1;
  --color-a-light: #818cf8;
  --color-a-dark: #4f46e5;
  --color-a-bg: rgba(99, 102, 241, 0.1);
  --color-b: #10b981;
  --color-b-light: #34d399;
  --color-b-dark: #059669;
  --color-b-bg: rgba(16, 185, 129, 0.1);
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --success: #22c55e;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Skip Link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-a);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

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

/* Screen reader only */
.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;
}

.scenario-title-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-a-light) 0%, var(--color-b-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.attribution {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.attribution a {
  color: var(--color-a-light);
  text-decoration: none;
  transition: color 0.2s;
}

.attribution a:hover {
  color: var(--color-b-light);
  text-decoration: underline;
}

/* Onboarding Tip */
.onboarding-tip {
  background: linear-gradient(135deg, var(--color-a-bg), var(--color-b-bg));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  text-align: left;
  font-size: 0.95rem;
  animation: fadeIn 0.5s ease;
}

.onboarding-tip.hidden {
  display: none;
}

.tip-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.tip-close:hover {
  color: var(--text-primary);
}

.tip-hint {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.help-icon-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--color-a);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
}

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

/* Income Goal Section */
.income-goal-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.income-goal-section label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.goal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.goal-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.goal-input-wrapper .currency {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.goal-input-wrapper input {
  font-size: 2.5rem;
  font-weight: 700;
  width: 180px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  text-align: center;
}

.goal-input-wrapper input:focus {
  outline: none;
}

.goal-input-wrapper .period {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Reset Button */
.reset-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reset-btn svg {
  width: 16px;
  height: 16px;
}

/* Scenarios Container */
.scenarios-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Scenario Card */
.scenario-card {
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 1.75rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.scenario-card:hover {
  background: var(--card-bg-hover);
  transform: translateY(-2px);
}

.scenario-a {
  border-color: var(--color-a);
}

.scenario-b {
  border-color: var(--color-b);
}

.scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.title-edit-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edit-hint {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}

.title-edit-wrapper:hover .edit-hint {
  opacity: 1;
}

.scenario-title {
  font-size: 1.25rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-primary);
  padding: 0.25rem 0;
  transition: border-color 0.2s;
  max-width: 200px;
}

.scenario-title:focus {
  outline: none;
  border-bottom-color: var(--text-muted);
}

.scenario-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.scenario-a .scenario-badge {
  background: var(--color-a);
  color: white;
}

.scenario-b .scenario-badge {
  background: var(--color-b);
  color: white;
}

/* Help Icon / Tooltip */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--border);
  color: var(--text-muted);
  border: none;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
  transition: all 0.2s;
}

.help-icon:hover {
  background: var(--color-a);
  color: white;
}

.tooltip {
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  max-width: 280px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
  z-index: 1000;
  pointer-events: none;
}

/* Inputs Section */
.inputs-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.input-group small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.input-group input,
.input-with-prefix,
.input-with-suffix {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.2s;
}

.input-group input {
  padding: 0.625rem 0.75rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.input-with-prefix,
.input-with-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
}

.input-with-prefix span,
.input-with-suffix span {
  color: var(--text-muted);
  font-weight: 500;
}

.input-with-prefix input,
.input-with-suffix input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.625rem 0.5rem;
}

.input-with-prefix input:focus,
.input-with-suffix input:focus {
  outline: none;
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* Upsell Section */
.upsell-section {
  margin-bottom: 1.5rem;
}

.upsell-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.upsell-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.upsell-toggle:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.toggle-icon {
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.2s;
}

.upsell-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 0.5rem;
  animation: slideDown 0.2s ease;
}

.upsell-inputs[hidden] {
  display: none;
}

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

/* Results Panel */
.results-panel {
  background: var(--results-bg);
  border-radius: 1rem;
  padding: 1.5rem;
}

.results-panel h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.result-item.highlight {
  grid-column: span 2;
}

.result-item.featured {
  background: var(--accent);
  color: #000;
}

.scenario-a .result-item.featured {
  background: var(--color-a);
  color: white;
}

.scenario-b .result-item.featured {
  background: var(--color-b);
  color: white;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.3s ease;
}

.result-value.updating {
  transform: scale(1.1);
}

.result-item.highlight .result-value,
.result-item.featured .result-value {
  font-size: 1.75rem;
}

.result-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.result-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.result-summary strong {
  color: var(--text-primary);
}

/* Comparison Summary */
.comparison-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.comparison-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.comparison-card:hover {
  transform: translateY(-2px);
}

.comparison-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-b-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-b);
}

.comparison-content {
  display: flex;
  flex-direction: column;
}

.comparison-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-b);
}

.comparison-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Share Section */
.share-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-a), var(--color-b));
  border: none;
  border-radius: 50px;
  padding: 0.875rem 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.share-btn:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-btn.secondary {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.share-btn.secondary:hover {
  border-color: var(--color-a);
}

.share-btn.twitter {
  background: #000;
  border: 1px solid #333;
}

.share-btn.twitter:hover {
  background: #1a1a1a;
  border-color: #555;
}

.copy-feedback {
  font-size: 0.85rem;
  color: var(--success);
  min-width: 100px;
}

/* Charts Section */
.charts-section {
  margin-bottom: 3rem;
}

.charts-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.chart-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.chart-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.growth-rate-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 8px;
}

.growth-rate-control label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.growth-rate-control input[type="range"] {
  flex: 1;
  max-width: 200px;
  accent-color: var(--color-a);
}

.growth-rate-control span {
  font-weight: 600;
  color: var(--color-a);
  min-width: 40px;
}

.chart-container {
  height: 280px;
  position: relative;
}

.chart-container.large {
  height: 320px;
}

/* Accessible Data Tables for Charts */
.chart-data-table {
  margin-top: 1rem;
}

.chart-data-table summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

.chart-data-table summary:hover {
  color: var(--text-secondary);
}

.chart-data-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.chart-data-table th,
.chart-data-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.chart-data-table th {
  color: var(--text-muted);
  font-weight: 500;
}

/* Insight Section */
.insight-section {
  margin-bottom: 3rem;
}

.insight-card {
  background: linear-gradient(135deg, var(--color-a-dark) 0%, var(--color-b-dark) 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  box-shadow: var(--shadow);
}

.insight-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insight-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.insight-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.insight-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.insight-content strong {
  color: var(--accent-light);
}

/* CTA Section */
.cta-section {
  margin-bottom: 3rem;
}

.cta-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-card > p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.prelaunch-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-a), var(--color-b));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.875rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.prelaunch-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

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

.cta-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 0.875rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 1rem;
}

.cta-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-a);
  box-shadow: var(--focus-ring);
}

.cta-form button {
  background: linear-gradient(135deg, var(--color-a), var(--color-b));
  border: none;
  border-radius: 50px;
  padding: 0.875rem 2rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cta-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cta-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Email success state */
.email-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  animation: fadeIn 0.5s ease;
}

.email-success .success-icon {
  width: 48px;
  height: 48px;
  color: var(--success);
}

.email-success p {
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

/* Trust badge */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-b-bg);
  border: 1px solid var(--color-b);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--color-b);
  font-weight: 500;
}

.trust-badge svg {
  width: 16px;
  height: 16px;
}

/* Micro testimonial */
.micro-testimonial {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

.micro-testimonial p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.micro-testimonial cite {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: normal;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

footer p {
  font-size: 0.9rem;
}

footer strong {
  color: var(--text-secondary);
}

.footer-links {
  margin-top: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .scenarios-container {
    grid-template-columns: 1fr;
  }

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

  .comparison-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .goal-input-wrapper input {
    font-size: 1.75rem;
    width: 120px;
  }

  .goal-input-wrapper .currency {
    font-size: 1.5rem;
  }

  .inputs-section {
    grid-template-columns: 1fr;
  }

  .upsell-inputs {
    grid-template-columns: 1fr;
  }

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

  .result-item.highlight {
    grid-column: span 2;
  }

  .insight-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .share-section {
    flex-direction: column;
  }

  .cta-form {
    flex-direction: column;
    align-items: center;
  }

  .cta-form input[type="email"] {
    width: 100%;
  }

  .chart-container {
    height: 300px;
  }
}

/* Number input spinner removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-a);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #ffffff;
  }

  .scenario-card,
  .chart-card,
  .comparison-card {
    border: 2px solid var(--border);
  }
}

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

/* Input error states */
.input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;
}

.input-error {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  font-weight: 500;
}

.input-with-prefix.input-invalid,
.input-with-suffix.input-invalid {
  border-color: #ef4444 !important;
}

/* Touch target minimum 44x44px */
@media (pointer: coarse) {
  .help-icon {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .tip-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .upsell-toggle {
    min-height: 44px;
  }

  .reset-btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }

  .share-btn {
    min-height: 44px;
  }

  .cta-form button {
    min-height: 44px;
  }

  .scenario-badge {
    min-width: 44px;
    min-height: 44px;
  }

  input[type="range"] {
    height: 44px;
  }

  /* Larger tap targets for chart data table toggles */
  .chart-data-table summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Print stylesheet */
@media print {
  /* Reset background for printing */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  /* Hide non-essential elements */
  .skip-link,
  .onboarding-tip,
  .share-section,
  .cta-section,
  .reset-btn,
  .upsell-toggle,
  footer,
  #tooltip,
  .growth-rate-control,
  .help-icon {
    display: none !important;
  }

  /* Hide charts, show data tables */
  .chart-container,
  canvas {
    display: none !important;
  }

  .chart-data-table {
    display: block !important;
  }

  .chart-data-table[open] summary,
  .chart-data-table summary {
    display: none;
  }

  .chart-data-table table {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
  }

  .chart-data-table th,
  .chart-data-table td {
    border: 1px solid #333;
    padding: 8px;
    text-align: left;
  }

  .chart-data-table th {
    background: #eee;
    font-weight: bold;
  }

  /* Open all data tables for print */
  .chart-data-table {
    display: block !important;
  }

  .chart-data-table > table {
    display: table !important;
  }

  /* Adjust cards for print */
  .scenario-card,
  .chart-card,
  .comparison-card,
  .insight-card {
    background: white !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  /* Make text readable */
  .scenario-title,
  .result-value,
  .comparison-value,
  h1, h2, h3 {
    color: black !important;
    -webkit-text-fill-color: black !important;
  }

  .result-item.featured {
    background: #eee !important;
    color: black !important;
  }

  /* Grid layout adjustments for print */
  .scenarios-container {
    display: block;
  }

  .scenarios-container > * {
    margin-bottom: 1rem;
  }

  .comparison-summary {
    display: block;
  }

  .charts-grid {
    display: block;
  }

  /* Insight card */
  .insight-card {
    background: #f5f5f5 !important;
    border: 2px solid #333 !important;
  }

  .insight-content p,
  .insight-content strong {
    color: black !important;
  }

  /* Header for print */
  header {
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 24pt;
    background: none !important;
  }

  /* Page title */
  @page {
    margin: 1cm;
  }
}

/* Keyboard shortcut hints */
.keyboard-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  padding: 0.125rem 0.375rem;
  background: var(--bg);
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Export button styling */
.export-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.export-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.export-btn:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.export-btn svg {
  width: 18px;
  height: 18px;
}

/* Honeypot field - hidden from real users, catches bots */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Follow button */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: #000;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.follow-btn:hover {
  background: #333;
  transform: translateY(-2px);
}

.follow-btn svg {
  width: 18px;
  height: 18px;
}

.follow-btn-secondary {
  background: transparent;
  border: 1px solid #333;
  color: var(--text-secondary);
}

.follow-btn-secondary:hover {
  background: #1a1a1a;
  border-color: #555;
}
