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

:root {
  --green-900: #1b4332;
  --green-700: #2d6a4f;
  --green-500: #40916c;
  --green-300: #74c69d;
  --green-100: #d8f3dc;
  --sand-900: #5c4a2e;
  --sand-700: #8b6f3e;
  --sand-500: #c9a96e;
  --sand-200: #f0e6d0;
  --sand-100: #faf6ef;
  --gray-900: #212529;
  --gray-700: #495057;
  --gray-500: #adb5bd;
  --gray-200: #dee2e6;
  --gray-100: #f8f9fa;
  --white: #ffffff;
  --danger: #dc3545;
  --danger-light: #f8d7da;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1100px;
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--sand-100);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover, a:focus { color: var(--green-900); text-decoration: underline; }
ul { list-style: none; }

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--green-900);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.logo:hover, .logo:focus { text-decoration: none; color: var(--green-700); }
.logo-icon { flex-shrink: 0; }
.site-nav { display: flex; gap: 24px; }
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  padding: 4px 0;
}
.site-nav a:hover, .site-nav a:focus { color: var(--green-700); text-decoration: none; border-bottom: 2px solid var(--green-500); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; }
.mobile-menu { display: none; background: var(--white); border-top: 1px solid var(--gray-200); padding: 12px 20px; flex-direction: column; gap: 8px; }
.mobile-menu a { font-size: 0.95rem; font-weight: 500; color: var(--gray-700); text-decoration: none; padding: 8px 0; }
.mobile-menu a:hover { color: var(--green-700); }
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { display: flex; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover, .btn:focus { text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-primary { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.btn-primary:hover, .btn-primary:focus { background: var(--green-900); border-color: var(--green-900); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--green-700); border-color: var(--green-700); }
.btn-secondary:hover, .btn-secondary:focus { background: var(--green-100); color: var(--green-900); }
.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover, .btn-danger:focus { background: var(--danger-light); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--sand-700) 100%);
  color: var(--white);
  padding: 80px 0 70px;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; max-width: 600px; margin: 0 auto 28px; opacity: 0.92; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary { background: var(--sand-500); border-color: var(--sand-500); color: var(--sand-900); }
.hero .btn-primary:hover { background: var(--sand-200); border-color: var(--sand-200); }
.hero .btn-secondary { background: transparent; border-color: var(--white); color: var(--white); }
.hero .btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: var(--white); color: var(--white); }

/* ===== SECTIONS ===== */
section { padding: 60px 0; }
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 1.7rem; font-weight: 700; color: var(--green-900); margin-bottom: 8px; }
.section-header p { color: var(--gray-700); max-width: 680px; }

/* ===== FINDER ===== */
.finder-section { background: var(--white); }
.finder-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--sand-100);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.control-group { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; }
.control-group label { font-size: 0.82rem; font-weight: 600; color: var(--gray-700); text-transform: uppercase; letter-spacing: 0.03em; }
.control-group select {
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--gray-900);
  font-family: var(--font-sans);
}
.control-group select:focus { outline: 2px solid var(--green-500); outline-offset: 1px; border-color: var(--green-500); }
.checkbox-group { flex-direction: row; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding-bottom: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; font-weight: 500; text-transform: none; letter-spacing: 0; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green-700); }

.results-header { margin-bottom: 12px; font-size: 0.88rem; color: var(--gray-700); font-weight: 500; }
.results-list { display: flex; flex-direction: column; gap: 10px; }
.station-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--sand-100);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.station-card:hover { border-color: var(--green-300); box-shadow: var(--shadow-sm); }
.station-info h3 { font-size: 1rem; font-weight: 600; color: var(--green-900); margin-bottom: 4px; }
.station-info p { font-size: 0.85rem; color: var(--gray-700); line-height: 1.5; }
.station-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-free { background: var(--green-100); color: var(--green-700); }
.tag-paid { background: #fff3cd; color: #856404; }
.tag-rinse { background: #cce5ff; color: #004085; }
.tag-24hr { background: #e2d5f1; color: #4a2074; }
.station-add { flex-shrink: 0; align-self: center; }

/* ===== LOG ===== */
.log-section { background: var(--white); }
.log-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.log-table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-md); }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.log-table th {
  background: var(--sand-200);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--sand-900);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.log-table td { padding: 10px 14px; border-top: 1px solid var(--gray-200); color: var(--gray-900); }
.log-table tr:hover td { background: var(--sand-100); }
.col-actions { text-align: right; width: 80px; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray-700);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-icon:hover { background: var(--gray-200); color: var(--gray-900); }
.btn-icon.delete:hover { background: var(--danger-light); color: var(--danger); }

/* ===== TIPS ===== */
.tips-section { background: var(--sand-100); }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 32px; }
.tip-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.tip-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--green-900); margin-bottom: 12px; }
.tip-card ul { list-style: disc; padding-left: 20px; }
.tip-card li { font-size: 0.88rem; color: var(--gray-700); margin-bottom: 6px; line-height: 1.5; }
.affiliate-note {
  background: var(--green-100);
  border-left: 4px solid var(--green-500);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--green-900);
}

/* ===== HOW IT WORKS ===== */
.how-section { background: var(--white); }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 36px; }
.step { text-align: center; padding: 20px; }
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.step h3 { font-size: 1rem; font-weight: 600; color: var(--green-900); margin-bottom: 8px; }
.step p { font-size: 0.88rem; color: var(--gray-700); line-height: 1.6; }
.assumptions-box {
  background: var(--sand-200);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--sand-500);
}
.assumptions-box h3 { font-size: 1rem; font-weight: 600; color: var(--sand-900); margin-bottom: 12px; }
.assumptions-box ul { list-style: disc; padding-left: 20px; }
.assumptions-box li { font-size: 0.88rem; color: var(--sand-900); margin-bottom: 6px; line-height: 1.5; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}
.empty-state svg { margin: 0 auto 12px; }
.empty-state p { font-size: 0.9rem; max-width: 400px; margin: 0 auto; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--green-900); margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--green-500); outline-offset: 1px; border-color: var(--green-500); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--green-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 300;
  transition: opacity 0.3s, transform 0.3s;
}
.toast[hidden] { display: none; opacity: 0; transform: translateY(10px); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--green-900);
  color: var(--green-300);
  padding: 48px 0 20px;
  font-size: 0.88rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-grid h4 { color: var(--white); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: var(--green-300); text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-tagline { margin-top: 8px; opacity: 0.7; font-size: 0.85rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; opacity: 0.7; }
.footer-bottom a { color: var(--green-300); }
.footer-bottom a:hover { color: var(--white); }
.version { text-align: right; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 52px 0 44px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.95rem; }
  section { padding: 40px 0; }
  .finder-controls { flex-direction: column; }
  .control-group { min-width: unset; }
  .station-card { flex-direction: column; align-items: flex-start; }
  .station-add { align-self: stretch; }
  .station-add .btn { width: 100%; }
  .log-table th, .log-table td { padding: 8px 10px; font-size: 0.82rem; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .version { text-align: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .how-steps { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}



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