/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #1a3a25;
  --green-800: #2D5F3E;
  --green-600: #3d8a56;
  --green-400: #8FBAA0;
  --green-200: #C8E0D0;
  --green-100: #E8F0EC;
  --green-50: #F5F9F7;
  --sand-100: #F5E6C8;
  --sand-200: #EDD9B0;
  --sand-300: #D4B87A;
  --white: #FFFFFF;
  --gray-700: #3A3A3A;
  --gray-600: #555;
  --gray-400: #999;
  --gray-200: #E0E0E0;
  --gray-100: #F4F4F4;
  --red-500: #C0392B;
  --red-100: #FDEDEC;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --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-700);
  background: var(--green-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-800); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-600); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 9999;
  background: var(--green-800); color: var(--white);
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--green-900);
  color: var(--white);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--sand-100); text-decoration: none; font-weight: 700;
  font-size: 1.15rem; letter-spacing: -.01em;
}
.logo:hover { color: var(--white); }
.logo-icon { flex-shrink: 0; }
.main-nav { display: flex; gap: 20px; }
.main-nav a {
  color: var(--green-200); text-decoration: none;
  font-size: .9rem; font-weight: 500; padding: 4px 0;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--white); border-bottom-color: var(--sand-200);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 60%, var(--green-600) 100%);
  color: var(--white);
  padding: 64px 0 56px;
}
.hero-eyebrow {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sand-200); margin-bottom: 12px; font-weight: 600;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15; margin-bottom: 16px;
  max-width: 600px;
}
.hero-sub {
  font-size: 1.05rem; color: var(--green-200);
  max-width: 520px; margin-bottom: 28px; line-height: 1.55;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stat { display: flex; gap: 16px; }
.stat-card {
  background: rgba(255,255,255,.12); border-radius: var(--radius-md);
  padding: 16px 24px; text-align: center; min-width: 120px;
  backdrop-filter: blur(4px);
}
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--sand-100); }
.stat-label { display: block; font-size: .78rem; color: var(--green-200); margin-top: 2px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  text-decoration: none; line-height: 1.3;
}
.btn-primary { background: var(--sand-200); color: var(--green-900); border-color: var(--sand-200); }
.btn-primary:hover { background: var(--sand-100); color: var(--green-900); border-color: var(--sand-100); }
.btn-secondary { background: var(--green-100); color: var(--green-800); border-color: var(--green-200); }
.btn-secondary:hover { background: var(--green-200); border-color: var(--green-400); color: var(--green-900); }
.btn-ghost { background: transparent; color: var(--sand-200); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--gray-400); padding: 4px;
  line-height: 1; border-radius: 4px;
}
.btn-icon:hover { color: var(--red-500); background: var(--red-100); }

/* ===== SECTIONS ===== */
section { padding: 56px 0; }
.section-title {
  font-size: 1.6rem; font-weight: 700; color: var(--green-900);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--gray-600); font-size: 1rem;
  max-width: 600px; margin-bottom: 32px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-100);
}
.card h3 { font-size: 1.05rem; font-weight: 700; color: var(--green-900); margin-bottom: 12px; }
.card-help { font-size: .88rem; color: var(--gray-600); margin-bottom: 16px; }

/* ===== BUILDER ===== */
.builder-section { background: var(--green-50); }
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}
.builder-inputs { display: flex; flex-direction: column; gap: 20px; }
.builder-preview { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; }

/* Profile picker */
.profile-picker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.profile-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-md); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.profile-option:hover { border-color: var(--green-400); }
.profile-option input[type="radio"] {
  margin-top: 3px; accent-color: var(--green-800); flex-shrink: 0;
}
.profile-option:has(input:checked) {
  border-color: var(--green-800); background: var(--green-100);
}
.profile-card-inner { display: flex; flex-direction: column; gap: 2px; }
.profile-card-inner strong { font-size: .92rem; color: var(--green-900); }
.profile-card-inner span { font-size: .82rem; color: var(--gray-600); }

/* Form elements */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 4px;
}
.form-group input[type="text"] {
  width: 100%; padding: 8px 12px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .92rem; font-family: var(--font-sans);
  transition: border-color .15s;
}
.form-group input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(61,138,86,.15); }

/* Spots list */
.spots-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.spot-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr .9fr 70px 32px;
  gap: 6px; align-items: center;
}
.spot-row input, .spot-row select {
  padding: 7px 8px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .85rem;
  font-family: var(--font-sans); background: var(--white);
}
.spot-row input:focus, .spot-row select:focus {
  outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(61,138,86,.15);
}
.spot-row .spot-dist { text-align: center; }
.btn-add-spot { margin-top: 4px; }
.btn-generate { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 4px; }

.error-msg {
  background: var(--red-100); color: var(--red-500);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  border: 1px solid var(--red-500);
}

/* Route card */
.route-card { border: 2px solid var(--green-200); }
.route-card-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px; flex-wrap: wrap; gap: 4px;
}
.route-card-badge {
  font-size: .78rem; color: var(--green-600); font-weight: 600;
  background: var(--green-100); padding: 3px 10px; border-radius: 20px;
}
.route-empty {
  text-align: center; padding: 32px 16px; color: var(--gray-400);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.route-results { display: flex; flex-direction: column; gap: 16px; }
.route-day {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--gray-200);
}
.route-day:last-child { border-bottom: none; }
.route-day-num {
  background: var(--green-800); color: var(--white);
  font-weight: 700; font-size: .78rem;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.route-day-info { flex: 1; }
.route-day-name { font-weight: 700; font-size: .92rem; color: var(--green-900); }
.route-day-meta { font-size: .8rem; color: var(--gray-600); margin-top: 2px; }
.route-day-goal {
  font-size: .78rem; display: inline-block;
  background: var(--sand-100); color: var(--green-800);
  padding: 2px 8px; border-radius: 10px; margin-top: 4px;
}
.route-day-check { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.route-day-check input { accent-color: var(--green-800); }
.route-day-check label { font-size: .8rem; color: var(--gray-600); cursor: pointer; }
.route-notes textarea {
  width: 100%; padding: 10px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .88rem;
  font-family: var(--font-sans); resize: vertical;
}
.route-notes h4 { font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--green-900); }
.route-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Profile summary */
.profile-summary { font-size: .88rem; }
.profile-summary ul { padding-left: 18px; }
.profile-summary li { margin-bottom: 6px; color: var(--gray-600); }

/* ===== HOW IT WORKS ===== */
.how-section { background: var(--white); }
.how-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-bottom: 32px;
}
.how-card {
  padding: 20px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); background: var(--green-50);
}
.how-num {
  background: var(--green-800); color: var(--white);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; margin-bottom: 10px;
}
.how-card h3 { font-size: .95rem; font-weight: 700; color: var(--green-900); margin-bottom: 6px; }
.how-card p { font-size: .88rem; color: var(--gray-600); line-height: 1.55; }

.assumptions-box {
  background: var(--sand-100); border-radius: var(--radius-md);
  padding: 20px 24px; border-left: 4px solid var(--sand-300);
}
.assumptions-box h3 { font-size: .95rem; color: var(--green-900); margin-bottom: 10px; }
.assumptions-box ul { padding-left: 18px; }
.assumptions-box li { font-size: .88rem; color: var(--gray-600); margin-bottom: 4px; }

/* ===== SCENARIOS ===== */
.scenario-section { background: var(--green-50); }
.scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.scenario-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--green-100);
}
.scenario-card h3 { font-size: .95rem; font-weight: 700; color: var(--green-900); margin-bottom: 10px; }
.scenario-card p { font-size: .88rem; color: var(--gray-600); margin-bottom: 8px; line-height: 1.55; }

/* ===== MISTAKES ===== */
.mistakes-section { background: var(--white); }
.mistakes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mistake-card {
  padding: 16px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--sand-300);
}
.mistake-card h3 { font-size: .9rem; font-weight: 700; color: var(--green-900); margin-bottom: 6px; }
.mistake-card p { font-size: .85rem; color: var(--gray-600); line-height: 1.5; }

/* ===== FAQ ===== */
.faq-section { background: var(--green-50); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); overflow: hidden;
}
.faq-item summary {
  padding: 14px 18px; font-weight: 600; font-size: .92rem;
  color: var(--green-900); cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--green-600); }
.faq-item[open] summary::after { content: '-'; }
.faq-item[open] summary { border-bottom: 1px solid var(--gray-200); }
.faq-item p { padding: 0 18px 14px; font-size: .88rem; color: var(--gray-600); line-height: 1.55; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--green-900); color: var(--green-200);
  padding: 24px 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; font-size: .85rem;
}
.footer-inner a { color: var(--sand-200); text-decoration: none; }
.footer-inner a:hover { color: var(--white); text-decoration: underline; }
.footer-nav { display: flex; gap: 16px; }

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .hero, .how-section, .scenario-section, .mistakes-section, .faq-section, .builder-inputs, .route-actions, .btn { display: none !important; }
  body { background: white; color: black; }
  .builder-preview { position: static; }
  .route-card { box-shadow: none; border: 2px solid #333; }
  .route-day { break-inside: avoid; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; }
  .builder-preview { position: static; }
  .how-grid, .scenario-grid, .mistakes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { height: auto; flex-direction: column; padding: 10px 0; gap: 6px; }
  .hero { padding: 40px 0 36px; }
  .hero-stat { flex-direction: row; }
  .spot-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .spot-row .btn-remove-spot { grid-column: span 2; justify-self: end; }
  .footer-inner { flex-direction: column; text-align: center; }
}



/* 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;
}
