/* =============================================================================
   V1C DESIGN SYSTEM - OFFSETMY.AI & OFFSETOUR.AI
   =============================================================================
   Unified design system supporting both brands via data-brand attribute.

   Usage:
   - Default: OffsetMy.ai light theme
   - Add data-brand="offsetour" to <html> for OffsetOur.ai dark theme

   Last Updated: December 2025
   ============================================================================= */

/* =============================================================================
   1. RESET & BASE
   ============================================================================= */

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

html {
  scroll-behavior: smooth;
}

/* =============================================================================
   2. OFFSETMY.AI LIGHT THEME (DEFAULT)
   ============================================================================= */

:root {
  /* Brand gradient: Periwinkle → Pink */
  --gradient-start: #98b4fd;
  --gradient-end: #ffcaeb;
  --gradient-brand: linear-gradient(135deg, #98b4fd 0%, #ffcaeb 100%);

  /* Core palette - Navy base */
  --navy-950: #0a1628;
  --navy-900: #0f1d32;
  --navy-800: #162744;

  /* Light surfaces */
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --surface-3: #e8eef8;

  /* Text hierarchy */
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  /* Teal accent for environmental/success */
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-muted: rgba(13, 148, 136, 0.1);

  /* Primary accent (teal for OffsetMy) */
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-muted: rgba(13, 148, 136, 0.1);

  /* Secondary accent (periwinkle) */
  --accent-2: #98b4fd;
  --accent-2-hover: #7a9dfc;
  --accent-2-muted: rgba(152, 180, 253, 0.15);

  /* Borders */
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Status colors */
  --success: #10b981;
  --success-muted: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.1);
  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 30px rgba(13, 148, 136, 0.15);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
}

/* =============================================================================
   3. OFFSETOUR.AI DARK THEME OVERRIDE
   ============================================================================= */

html[data-brand="offsetour"] {
  /* Dark surfaces - deep navy base */
  --bg: #0a0d14;
  --surface: #0f1420;
  --surface-2: #151b2a;
  --surface-3: #1a2235;

  /* Text hierarchy for dark mode */
  --text: #e8ecf4;
  --text-secondary: #a8b4c8;
  --text-muted: #6b7a94;

  /* Pink primary accent (from brand gradient) */
  --accent: #f7a8d8;
  --accent-hover: #ffcaeb;
  --accent-muted: rgba(247, 168, 216, 0.15);

  /* Periwinkle secondary (from brand gradient) */
  --accent-2: #98b4fd;
  --accent-2-hover: #b4c9fe;
  --accent-2-muted: rgba(152, 180, 253, 0.15);

  /* Brighter teal for dark mode */
  --teal-600: #14b8a6;
  --teal-500: #2dd4bf;
  --teal-400: #5eead4;
  --teal-muted: rgba(45, 212, 191, 0.12);

  /* Status colors adjusted for dark */
  --success: #34d399;
  --success-muted: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-muted: rgba(251, 191, 36, 0.15);
  --error: #f87171;
  --error-muted: rgba(248, 113, 113, 0.15);

  /* Dark borders */
  --border: #1e2840;
  --border-light: #2a3654;

  /* Shadows for dark mode */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 30px rgba(247, 168, 216, 0.2);
}

/* =============================================================================
   4. BASE TYPOGRAPHY
   ============================================================================= */

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* =============================================================================
   5. LAYOUT COMPONENTS
   ============================================================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--sm { max-width: 640px; }
.container--md { max-width: 800px; }
.container--lg { max-width: 1024px; }

/* =============================================================================
   6. CARD COMPONENTS
   ============================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.card--elevated {
  box-shadow: var(--shadow-lg);
}

.card--interactive {
  cursor: pointer;
  transition: all 0.2s ease;
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

/* Form section card (calculator style) */
.form-section {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}

/* Tier cards for pricing */
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  position: relative;
  transition: all 0.3s ease;
}

.tier-card:hover {
  background: var(--surface-2);
}

.tier-card.recommended {
  border-color: var(--text);
}

.tier-card.recommended::before {
  content: "Recommended";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[data-brand="offsetour"] .tier-card.recommended::before {
  background: var(--accent);
  color: var(--bg);
}

/* =============================================================================
   7. BUTTON COMPONENTS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary button - gradient */
.btn-primary {
  background: var(--gradient-brand);
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(152, 180, 253, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(152, 180, 253, 0.35);
}

html[data-brand="offsetour"] .btn-primary {
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(247, 168, 216, 0.25);
}

html[data-brand="offsetour"] .btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(247, 168, 216, 0.35);
}

/* Secondary button - outline */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

/* Accent button - solid accent color */
.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px var(--accent-muted);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-muted);
}

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

/* Success button (green/teal) */
.btn-success {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  box-shadow: 0 4px 14px var(--teal-muted);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--teal-muted);
}

/* Size variants */
.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--full {
  width: 100%;
}

/* Calculate button (main CTA) */
.calculate-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-brand);
  color: var(--navy-900);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin: var(--space-8) 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(152, 180, 253, 0.25);
}

.calculate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(152, 180, 253, 0.35);
}

html[data-brand="offsetour"] .calculate-btn {
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(247, 168, 216, 0.25);
}

html[data-brand="offsetour"] .calculate-btn:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(247, 168, 216, 0.35);
}

/* =============================================================================
   8. FORM COMPONENTS
   ============================================================================= */

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

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

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Dark mode input adjustments */
html[data-brand="offsetour"] .form-input,
html[data-brand="offsetour"] .form-select {
  background: var(--surface-2);
}

/* Help text */
.form-help {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Field group */
.form-field {
  margin-bottom: var(--space-6);
}

/* Team input specific styles */
.team-input,
.team-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.team-input:focus,
.team-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

html[data-brand="offsetour"] .team-input,
html[data-brand="offsetour"] .team-select {
  background: var(--surface-2);
}

.team-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}

.team-field {
  margin-bottom: var(--space-6);
}

/* =============================================================================
   9. PROGRESS BAR
   ============================================================================= */

.progress-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.progress-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
}

.progress-step:hover {
  background: var(--surface-2);
}

.progress-step.active {
  color: var(--accent);
  background: var(--accent-muted);
}

.progress-step.completed {
  color: var(--success);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.progress-step.active .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

html[data-brand="offsetour"] .progress-step.active .step-number {
  color: var(--bg);
}

.progress-step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.progress-arrow {
  color: var(--border);
  font-size: 0.75rem;
}

/* =============================================================================
   10. COLLAPSIBLE SECTIONS
   ============================================================================= */

.collapsible-section {
  margin-top: var(--space-6);
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s ease;
}

.collapsible-header:hover {
  background: var(--surface-2);
}

.collapsible-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.collapsible-icon {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.collapsible-section.open .collapsible-icon {
  transform: rotate(180deg);
}

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

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

/* When used inside native <details> element, content should be visible when open */
details.collapsible-section .collapsible-content {
  max-height: none;
  overflow: visible;
}

.collapsible-inner {
  padding: var(--space-6) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Details/summary for native collapsible */
details {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

summary {
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '▶';
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.8rem;
}

details[open] summary::before {
  transform: rotate(90deg);
}

/* =============================================================================
   11. ALLOCATION BAR
   ============================================================================= */

.allocation-section {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}

.allocation-bar {
  display: flex;
  height: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.allocation-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.allocation-segment.credits {
  background: linear-gradient(135deg, #10b981, #059669);
}

.allocation-segment.community {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.allocation-segment.advocacy {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.allocation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.allocation-legend .item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.allocation-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.allocation-legend .dot.credits { background: #10b981; }
.allocation-legend .dot.community { background: #3b82f6; }
.allocation-legend .dot.advocacy { background: #8b5cf6; }

/* =============================================================================
   12. TRUST & BADGE COMPONENTS
   ============================================================================= */

.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.trust-sep {
  color: var(--border);
}

/* Tier badge */
.tier-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gradient-brand);
  color: var(--navy-900);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[data-brand="offsetour"] .tier-badge {
  color: var(--bg);
}

/* Model badges */
.model-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.5rem;
}

.badge-new {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-efficient {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-eco {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* =============================================================================
   13. RESULT SECTION
   ============================================================================= */

.result {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-top: var(--space-8);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Hide result only when empty */
.result:empty {
  display: none;
}

.result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

.big-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* =============================================================================
   14. MODAL
   ============================================================================= */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  margin: 5% auto;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  right: var(--space-6);
  top: var(--space-6);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  line-height: 1;
}

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

/* =============================================================================
   15. UTILITY CLASSES
   ============================================================================= */

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text colors */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Gradient text */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

/* Gap utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Margin utilities */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Padding utilities */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* Border radius utilities */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* =============================================================================
   16. RESPONSIVE BREAKPOINTS
   ============================================================================= */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding: 0 var(--space-4);
  }

  .form-section {
    padding: var(--space-6);
  }

  .tier-card {
    padding: var(--space-6) var(--space-5);
  }

  .big-number {
    font-size: 2.25rem;
  }

  .progress-steps {
    gap: 0.25rem;
  }

  .progress-step span:not(.step-number) {
    display: none;
  }

  .progress-step {
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .form-section {
    padding: var(--space-5);
  }

  .btn {
    padding: 0.625rem 1.25rem;
  }

  .calculate-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .modal-content {
    margin: 2% auto;
    padding: var(--space-6);
    max-height: 90vh;
  }
}

/* =============================================================================
   17. PRINT STYLES
   ============================================================================= */

@media print {
  .progress-bar,
  .calculate-btn,
  .btn,
  .modal {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .form-section,
  .result {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* =============================================================================
   18. INTEGRATED TIER SELECTION (Calculator Results)
   ============================================================================= */

.tier-selection-section {
  margin: var(--space-8) 0;
  padding: var(--space-8);
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
}

.tier-section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.tier-section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-6);
}

/* Tier cards grid */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
  .tier-cards {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

/* Individual tier card */
.tier-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tier-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tier-card.active {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.tier-card.recommended {
  border-color: var(--accent);
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: var(--navy-900);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

html[data-brand="offsetour"] .tier-badge {
  color: var(--bg);
}

.tier-percent {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-1);
  color: var(--text);
}

.tier-card.active .tier-percent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tier-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.tier-card.active .tier-label {
  color: var(--accent);
}

.tier-kg {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.tier-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.tier-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

/* Allocation preview */
.tier-allocation-preview {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-md);
}

.allocation-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.allocation-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.allocation-dot.credits {
  background: linear-gradient(135deg, #10b981, #059669);
}

.allocation-dot.community {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.allocation-dot.advocacy {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Checkout CTA button */
.checkout-cta-btn {
  display: block;
  width: 100%;
  padding: var(--space-4) var(--space-8);
  background: var(--gradient-brand);
  color: var(--navy-900);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(152, 180, 253, 0.25);
}

.checkout-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(152, 180, 253, 0.35);
}

html[data-brand="offsetour"] .checkout-cta-btn {
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(247, 168, 216, 0.25);
}

html[data-brand="offsetour"] .checkout-cta-btn:hover {
  box-shadow: 0 6px 20px rgba(247, 168, 216, 0.35);
}

/* Trust note */
.tier-trust-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
}

/* =============================================================================
   19. MOBILE STICKY CHECKOUT
   ============================================================================= */

.mobile-sticky-checkout {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-4);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-sticky-checkout.visible {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .mobile-sticky-checkout {
    display: block;
  }

  /* Add padding to results container so sticky doesn't cover content */
  .results-container {
    padding-bottom: 100px;
  }
}

.sticky-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.sticky-price {
  display: flex;
  flex-direction: column;
}

.sticky-price span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.sticky-price small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sticky-checkout-btn {
  flex: 1;
  max-width: 180px;
  padding: var(--space-3) var(--space-5);
  background: var(--gradient-brand);
  color: var(--navy-900);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sticky-checkout-btn:hover {
  transform: translateY(-1px);
}

html[data-brand="offsetour"] .sticky-checkout-btn {
  color: var(--bg);
}

/* =============================================================================
   20. LUCIDE ICON INTEGRATION
   ============================================================================= */

/* Icon sizing */
.lucide-icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vertical-align: -0.125em;
}

.lucide-icon--sm {
  width: 16px;
  height: 16px;
}

.lucide-icon--md {
  width: 20px;
  height: 20px;
}

.lucide-icon--lg {
  width: 24px;
  height: 24px;
}

.lucide-icon--xl {
  width: 32px;
  height: 32px;
}

/* Circle step icons */
.circle-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent);
  stroke-width: 1.5;
}

html[data-brand="offsetour"] .circle-icon svg {
  stroke: var(--accent);
}

/* =============================================================================
   21. COMPACT OPTIONAL SETTINGS (Precision Mode & Advanced)
   ============================================================================= */

.optional-settings-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 480px) {
  .optional-settings-row {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* Compact details styling */
.compact-details {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.compact-details summary {
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  list-style: none;
}

.compact-details summary::-webkit-details-marker {
  display: none;
}

.compact-details summary::after {
  content: '';
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.2s ease;
}

.compact-details[open] summary::after {
  transform: rotate(180deg);
}

.compact-details summary:hover {
  color: var(--text);
  background: var(--surface-2);
}

.compact-details summary svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.compact-details-content {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.compact-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Compact grid for fields */
.prec-grid.compact,
.adv-grid.compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .prec-grid.compact,
  .adv-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.compact .prec-field label,
.compact .adv-field label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Small inputs */
.input-sm,
.select-sm {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

/* Embodied emissions toggle */
.embodied-toggle {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.embodied-toggle summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
}

.embodied-toggle summary::-webkit-details-marker {
  display: none;
}

.embodied-toggle summary:hover {
  color: var(--text-secondary);
}

.embodied-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .embodied-fields {
    grid-template-columns: 1fr;
  }
}

/* Compact action buttons */
.adv-actions.compact {
  display: flex;
  gap: var(--space-3);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.btn-text {
  background: none;
  border: none;
  padding: 0.25rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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