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

:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1160px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--teal-800); }
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--teal-700);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--teal-600);
  color: var(--white);
  border-color: var(--teal-600);
}
.btn-primary:hover { background: var(--teal-700); border-color: var(--teal-700); }
.btn-secondary {
  background: var(--amber-500);
  color: var(--gray-900);
  border-color: var(--amber-500);
}
.btn-secondary:hover { background: var(--amber-600); border-color: var(--amber-600); }
.btn-ghost {
  background: transparent;
  color: var(--teal-700);
  border-color: var(--teal-300);
}
.btn-ghost:hover { background: var(--teal-50); border-color: var(--teal-500); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--gray-400);
  padding: 4px;
  line-height: 1;
}
.btn-icon:hover { color: var(--gray-700); }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
}
.logo:hover { text-decoration: none; }
.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
}
.site-nav {
  display: flex;
  gap: 24px;
}
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
}
.site-nav a:hover { color: var(--teal-700); text-decoration: none; }

/* ===== Hero ===== */
.hero-section {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-900) 100%);
  color: var(--white);
  padding: 60px 0 48px;
}
.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 600px;
}
.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-actions .btn-primary {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: var(--gray-900);
}
.hero-actions .btn-primary:hover {
  background: var(--amber-400);
  border-color: var(--amber-400);
}
.hero-actions .btn-ghost {
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.hero-actions .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
.hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.stat-card {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  text-align: center;
  min-width: 140px;
}
.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
}
.stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ===== Calculator Section ===== */
.calculator-section {
  padding: 56px 0;
  background: var(--white);
}
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.calc-inputs h2,
.calc-results h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-note {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Presets */
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.preset-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.15s ease;
}
.preset-btn:hover {
  border-color: var(--teal-400);
  color: var(--teal-700);
}
.preset-btn.active {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: var(--white);
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  margin-bottom: 4px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--gray-700);
}
.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s ease;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.form-group .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-600);
}
.checkbox-group label {
  margin-bottom: 0;
  font-weight: 500;
}

/* Results Panel */
.calc-results {
  background: var(--teal-50);
  border: 2px solid var(--teal-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.result-sticky {
  position: sticky;
  top: 80px;
}
.result-hero {
  text-align: center;
  padding: 20px 0;
}
.result-big {
  display: block;
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--teal-700);
  line-height: 1;
}
.result-unit {
  font-size: 0.95rem;
  color: var(--gray-500);
  font-weight: 500;
}
.result-explanation {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 20px;
  line-height: 1.5;
}
.result-breakdown {
  border-top: 1px solid var(--teal-200);
  padding-top: 16px;
  margin-bottom: 16px;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
}
.breakdown-row span { color: var(--gray-600); }
.breakdown-row strong { color: var(--gray-800); }
.savings-positive { color: var(--teal-700) !important; }
.savings-negative { color: #dc2626 !important; }

.result-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.95rem;
}
.result-verdict.verdict-yes {
  background: #ecfdf5;
  color: var(--teal-800);
  border: 1px solid var(--teal-200);
}
.result-verdict.verdict-no {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.result-verdict.verdict-close {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.verdict-icon { font-size: 1.2rem; }

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.result-actions .btn { flex: 1; min-width: 80px; }

.result-history {
  border-top: 1px solid var(--teal-200);
  padding-top: 16px;
}
.result-history h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.result-history ul {
  list-style: none;
  margin-bottom: 8px;
}
.result-history li {
  padding: 8px 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--teal-100);
}
.result-history li button {
  background: none;
  border: none;
  color: var(--teal-600);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.result-history li button:hover { text-decoration: underline; }

/* ===== Comparison Section ===== */
.comparison-section {
  padding: 56px 0;
  background: var(--gray-50);
}
.comparison-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.comparison-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 640px;
}
.comparison-table th {
  background: var(--teal-700);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.comparison-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.comparison-table input,
.comparison-table select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
}
.comparison-table input:focus,
.comparison-table select:focus {
  outline: none;
  border-color: var(--teal-500);
}
.compare-ride {
  font-weight: 700;
  color: var(--teal-700);
  text-align: center;
}
.compare-savings {
  font-weight: 700;
  text-align: center;
}

/* ===== Guide Section ===== */
.guide-section {
  padding: 56px 0;
  background: var(--white);
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}
.guide-main h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gray-900);
}
.guide-main h2:not(:first-child) { margin-top: 40px; }
.guide-steps {
  padding-left: 24px;
  margin-bottom: 16px;
}
.guide-steps li {
  margin-bottom: 12px;
  line-height: 1.6;
}
.guide-list {
  padding-left: 20px;
}
.guide-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}
.scenario-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.scenario-card {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-md);
  padding: 20px;
}
.scenario-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--teal-800);
}
.scenario-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Sidebar */
.guide-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
}
.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gray-800);
}
.sidebar-card dl { font-size: 0.85rem; }
.sidebar-card dt {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 2px;
}
.sidebar-card dd {
  color: var(--gray-500);
  margin-bottom: 10px;
}
.sidebar-card dd:last-child { margin-bottom: 0; }
.sidebar-card ul {
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.sidebar-card ul li { margin-bottom: 6px; }
.sidebar-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ===== FAQ Section ===== */
.faq-section {
  padding: 56px 0;
  background: var(--gray-50);
}
.faq-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.faq-grid details {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.faq-grid summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-800);
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::before {
  content: '+';
  font-weight: 700;
  color: var(--teal-600);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.faq-grid details[open] summary::before { content: '−'; }
.faq-grid details p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 40px 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand { max-width: 320px; }
.footer-brand .logo-text {
  color: var(--white);
  display: block;
  margin-bottom: 8px;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.5; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: var(--gray-400);
  font-size: 0.85rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--teal-400); }
.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .result-sticky { position: static; }
  .guide-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-content h1 { font-size: 1.7rem; }
  .hero-sub { font-size: 1rem; }
  .hero-stats { gap: 12px; }
  .stat-card { min-width: 100px; padding: 12px 16px; }
  .stat-number { font-size: 1.3rem; }
  .form-grid { grid-template-columns: 1fr; }
  .preset-bar { gap: 6px; }
  .preset-btn { padding: 6px 12px; font-size: 0.8rem; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.8rem; }
  .result-big { font-size: 2.4rem; }
  .comparison-table { min-width: 500px; }
  .footer-top { flex-direction: column; }
}

@media print {
  .site-header, .site-footer, .hero-section, .comparison-section, .guide-section, .faq-section, .result-actions, .preset-bar, .result-history { display: none !important; }
  .calculator-section { padding: 0; }
  .calc-layout { display: block; }
  .calc-results { border: 2px solid #333; }
  body { background: #fff; color: #000; }
}

/* ===== Utilities ===== */
[hidden] { display: none !important; }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
