/* Enhanced Calculator CSS - Light theme for OffsetMy.ai, Dark for OffsetOur.ai */

/* ===== Light Theme (Default for OffsetMy.ai) ===== */
:root {
  --bg: #f8fafc;              /* soft off-white */
  --surface: #ffffff;         /* pure white cards */
  --surface-2: #f1f5f9;       /* subtle gray for elevation */
  --text: #0f172a;            /* near-black text */
  --text-strong: #020617;     /* stronger black for headings */
  --muted: #475569;           /* medium gray for secondary text */
  --ring: #3b82f6;            /* blue focus ring */
  --accent: #3b82f6;          /* primary blue */
  --accent-2: #06b6d4;        /* cyan accent */
  --border: #e2e8f0;          /* light gray borders */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

/* ===== Dark Theme Override for OffsetOur.ai ===== */
html[data-brand="offsetour"] {
  --bg: #0f1115;
  --surface: #151821;
  --surface-2: #1b1f2a;
  --text: #e6e9ef;
  --text-strong: #f8fafc;
  --muted: #a7adbb;
  --ring: #6aa9ff;
  --accent: #f7a8d8;
  --accent-2: #9fd4ff;
  --border: #2a3040;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.45);
}

/* ===== Base Styles ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  position: relative;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 150px;
  position: relative;
  min-height: 100vh; /* Ensure body takes full viewport height */
}

/* Light theme gradient background */
body:not([data-brand="offsetour"]) {
  background: 
    radial-gradient(ellipse at top right, rgba(59, 130, 246, 0.1), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(6, 182, 212, 0.08), transparent 50%),
    var(--bg);
}

/* Dark theme gradient background */
html[data-brand="offsetour"] body {
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(159,212,255,0.06), transparent 40%),
    radial-gradient(900px 500px at 100% 10%, rgba(247,168,216,0.06), transparent 45%),
    var(--bg);
}

/* ===== Topbar ===== */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

html[data-brand="offsetour"] .topbar {
  background: linear-gradient(180deg, rgba(21,24,33,.8), rgba(21,24,33,.5));
  backdrop-filter: blur(6px);
}

.tagline {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== Container ===== */
.container {
  width: min(960px, 92vw);
  margin: clamp(20px, 3vw, 48px) auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-lg);
  padding-bottom: 150px;
  position: relative;
  z-index: 1; /* Keep low so fixed header (z-index: 1000) stays on top */
}

/* Mobile padding fix for all phones */
@media (max-width: 768px) {
  .container {
    padding-bottom: 2rem; /* Reduced for mobile accessibility */
  }
}

/* ===== Typography ===== */
.title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.6;
}

/* ===== Form Sections ===== */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-brand="offsetour"] .form-section {
  background: rgba(27, 31, 42, 0.3);
  backdrop-filter: blur(8px);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--surface-2);
}

html[data-brand="offsetour"] .section-title {
  color: var(--accent-2);
  border-bottom-color: rgba(159, 212, 255, 0.2);
}

/* ===== Form Elements ===== */
.label {
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.label:first-child {
  margin-top: 0;
}

.input, .select {
  appearance: none;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  font-family: inherit;
}

html[data-brand="offsetour"] .input,
html[data-brand="offsetour"] .select {
  background: #0e1118;
}

.select {
  background-image: 
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
  cursor: pointer;
}

.input:hover, .select:hover {
  border-color: var(--accent);
}

.input:focus, .select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

html[data-brand="offsetour"] .input:focus,
html[data-brand="offsetour"] .select:focus {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 30%, transparent);
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

/* ===== Small Helper Text ===== */
small.muted {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ===== Buttons ===== */
.button, .calculate-btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.button:hover, .calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
  filter: brightness(1.05);
}

.button:active, .calculate-btn:active {
  transform: translateY(0);
}

/* ===== Input Warnings ===== */
.input-warnings {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--warning);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  display: none;
}

.warning {
  color: #92400e;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

html[data-brand="offsetour"] .warning {
  color: #fbbf24;
}

.suggestion {
  color: #1e40af;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

html[data-brand="offsetour"] .suggestion {
  color: var(--accent-2);
}

/* ===== Results Container ===== */
.result {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 20px;
}

/* ===== Enhanced Results ===== */
.enhanced-results {
  padding: 2rem;
  background: var(--surface);
}

.enhanced-results h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-strong);
}

.result-primary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.emissions-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.confidence-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: help;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
}

.confidence-badge.high {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 2px solid #10b981;
  color: #047857;
}

.confidence-badge.medium {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  color: #92400e;
}

.confidence-badge.low {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 2px solid #ef4444;
  color: #dc2626;
}

.uncertainty-range {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.05));
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-weight: 500;
}

.uncertainty-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

/* ===== Context Comparisons ===== */
.context-comparisons {
  margin: 2rem 0;
}

.context-comparisons h4 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.comparison-item {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.comparison-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
}

.comparison-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.comparison-label {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.3;
  font-weight: 500;
}

/* ===== Methodology ===== */
.methodology-summary {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.methodology-summary summary {
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 600;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.methodology-summary summary:hover {
  background: var(--surface);
}

.methodology-details {
  padding: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
}

.methodology-details p {
  margin: 0.75rem 0;
}

.methodology-details ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.methodology-details li {
  margin: 0.5rem 0;
}

/* ===== Offset Recommendation ===== */
.offset-recommendation {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.05));
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  text-align: center;
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.offset-recommendation p {
  color: var(--text-strong) !important;
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
}

.btn.enhanced, #offsetNowBtn {
  display: inline-block;
  margin-top: 1rem;
  padding: 1.125rem 2.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white !important;
  font-size: 1.0625rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.btn.enhanced:hover, #offsetNowBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  text-decoration: none;
  color: white !important;
}

.impact-breakdown {
  margin-top: 1rem;
  text-align: left;
  color: var(--text);
}

.impact-breakdown ul {
  list-style: none;
  padding-left: 0;
}

.impact-breakdown li {
  padding: 0.25rem 0;
}

/* ===== Feedback ===== */
.accuracy-feedback {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface-2);
  border-radius: 10px;
  text-align: center;
}

.accuracy-feedback p {
  color: var(--text) !important;
  font-weight: 500;
  margin-bottom: 1rem;
}

.feedback-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-btn {
  padding: 0.625rem 1.25rem;
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ===== Precision & Advanced Panels ===== */
.prec, .adv {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

html[data-brand="offsetour"] .prec,
html[data-brand="offsetour"] .adv {
  background: rgba(27, 31, 42, 0.3);
  backdrop-filter: blur(8px);
  border: 2px solid var(--border);
}

.prec > summary, .adv > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-strong);
  padding: 1.125rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  font-size: 1.0625rem;
}

html[data-brand="offsetour"] .prec > summary,
html[data-brand="offsetour"] .adv > summary {
  color: var(--accent-2);
  background: rgba(159, 212, 255, 0.1);
}

.prec > summary:hover, .adv > summary:hover {
  background: var(--surface);
  color: var(--accent);
}

.prec[open] > summary, .adv[open] > summary {
  background: var(--accent);
  color: white;
}

html[data-brand="offsetour"] .prec[open] > summary,
html[data-brand="offsetour"] .adv[open] > summary {
  background: rgba(247, 168, 216, 0.15);
  color: var(--accent);
}

.prec-grid, .adv-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 1.5rem;
}

.prec-field, .adv-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prec-field label, .adv-field label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.prec-field input, .prec-field select,
.adv-field input, .adv-field select {
  padding: 0.75rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

html[data-brand="offsetour"] .prec-field input,
html[data-brand="offsetour"] .prec-field select,
html[data-brand="offsetour"] .adv-field input,
html[data-brand="offsetour"] .adv-field select {
  background: #0e1118;
}

.prec-field input:focus, .prec-field select:focus,
.adv-field input:focus, .adv-field select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.prec-field small, .adv-field small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.adv-actions {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}

.adv-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.adv-actions button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.adv-breakdown {
  margin-top: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.9375rem;
}

.breakdown-section h4 {
  color: var(--text-strong);
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.breakdown-section div {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: var(--text);
}

/* ===== Telemetry ===== */
.telemetry {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.9375rem;
}

.telemetry label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
}

.telemetry input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

/* ===== Links ===== */
.explain {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.link:hover {
  color: var(--accent-2);
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.modal-content {
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  margin: 8vh auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 2rem;
  line-height: 1;
  float: right;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.modal h2 {
  color: var(--text-strong);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.modal h3 {
  color: var(--text-strong);
  margin: 1.5rem 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal p {
  color: var(--text);
  line-height: 1.6;
  margin: 1rem 0;
}

.modal ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.modal li {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: var(--text);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .result-primary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .emissions-value {
    font-size: 2rem;
  }
  
  .comparison-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .enhanced-results {
    padding: 1.5rem;
  }
  
  .confidence-badge {
    min-width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  
  .comparison-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 520px) {
  body {
    padding-bottom: 2rem; /* Reduced to keep content visible */
  }

  .container {
    width: 96vw;
    padding: 1rem;
    border-radius: 12px;
    padding-bottom: 2rem; /* Reduced from 100px to keep button accessible */
    margin: 1rem auto;
  }
  
  .title {
    font-size: 1.375rem;
  }
  
  .subtitle {
    font-size: 0.9375rem;
  }
  
  .form-section {
    padding: 1rem;
  }
  
  .label {
    font-size: 0.875rem;
  }
  
  .adv-grid, .prec-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-item {
    padding: 1rem;
  }
  
  .button, .calculate-btn, #offsetNowBtn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    min-height: 44px; /* Touch-friendly */
    font-size: 1rem;
  }
}

/* ===== iPhone XR and similar (414px and below) ===== */
@media (max-width: 414px) {
  .container {
    width: 96vw;
    padding: 1rem 0.875rem;
    padding-bottom: 1.5rem;
    margin: 1rem auto;
  }

  body {
    padding-bottom: 1.5rem;
  }
}

/* ===== Ultra-Small Screens (iPhone SE, older devices) ===== */
@media (max-width: 375px) {
  .container {
    width: 98vw;
    padding: 0.75rem;
    padding-bottom: 1.5rem; /* Even less padding on small screens */
    border-radius: 8px;
    margin: 0.5rem auto;
  }

  .title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .form-section {
    padding: 0.75rem;
  }

  .input,
  .select,
  .team-input,
  .team-select {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 10px 14px;
  }

  .button,
  #offsetNowBtn {
    font-size: 0.9375rem;
    padding: 0.875rem 1.25rem;
    min-height: 44px; /* Touch-friendly */
  }

  .emissions-value {
    font-size: 1.75rem;
  }

  .comparison-value {
    font-size: 1.1rem;
  }

  .comparison-label {
    font-size: 0.8125rem;
  }

  .enhanced-results {
    padding: 1rem;
  }

  .form-section h3,
  .section-title {
    font-size: 1.1rem;
  }

  .modal-content {
    max-height: 80vh;
    padding: 1.25rem 1rem;
  }

  .modal h3 {
    font-size: 1.25rem;
  }

  .modal p,
  .modal li {
    font-size: 0.9rem;
  }

  .confidence-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .circle-step {
    padding: 0.875rem 0.625rem;
  }

  .circle-icon {
    font-size: 2rem;
  }

  .circle-title {
    font-size: 1rem;
  }

  .full-circle-explainer {
    padding: 1.25rem 0.75rem;
  }

  .full-circle-explainer h4 {
    font-size: 1.25rem;
  }
}

/* ===== Accessibility ===== */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Print Styles ===== */
@media print {
  .topbar, .telemetry, .explain, .feedback-buttons {
    display: none;
  }
  
  .container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Emissions breakdown inline */
.emissions-breakdown-inline {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.emissions-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.emissions-line.digital {
  color: var(--muted, #64748b);
  font-size: 0.95rem;
}

.emissions-line.total {
  border-bottom: 2px solid var(--accent, #5b6cff);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  font-size: 1.1rem;
}

.emissions-line:last-child {
  border-bottom: none;
}

.emissions-label {
  font-weight: 500;
}

/* Checkbox label styling */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Pricing tiers */
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.tier-option {
  padding: 1rem;
  background: var(--surface-2, #f8fafc);
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.tier-option.recommended {
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.1), rgba(182, 104, 255, 0.1));
  border-color: var(--accent, #5b6cff);
  position: relative;
}

.tier-option.recommended::before {
  content: "★";
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent, #5b6cff);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Full Circle Explainer */
.full-circle-explainer {
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.05), rgba(182, 104, 255, 0.05));
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0 1rem;
}

.full-circle-explainer h4 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-strong, #0f172a);
}

.full-circle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.circle-step {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface, #ffffff);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.circle-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.circle-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-strong, #0f172a);
}

.circle-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent, #5b6cff);
  margin-bottom: 0.75rem;
}

.circle-step p {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
  margin: 0;
}

.circle-arrow {
  font-size: 2rem;
  color: var(--accent, #5b6cff);
  font-weight: bold;
}

.full-circle-summary {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text, #1e293b);
  margin: 1.5rem 0 0;
  padding: 1.25rem;
  background: var(--surface-2, #f8fafc);
  border-radius: 8px;
}

.full-circle-summary strong {
  color: var(--accent, #5b6cff);
  font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .full-circle-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .circle-arrow {
    transform: rotate(90deg);
    font-size: 1.5rem;
  }
  
  .full-circle-explainer {
    padding: 1.5rem 1rem;
  }
  
  .circle-step {
    padding: 1rem 0.75rem;
  }
}

/* Form Input Styling */
.team-input,
.team-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--tile);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.team-input:focus,
.team-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
  background: var(--card);
}

.team-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.team-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ink-strong);
  font-size: 14px;
}

.team-field {
  margin-bottom: 1.5rem;
}

/* Checkbox styling */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Ensure select dropdowns are styled */
.team-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}