/* CampTote Styles */
:root {
  --green-900: #1b3a1a;
  --green-700: #2d5a27;
  --green-500: #4a7c3f;
  --green-200: #c8e6c0;
  --green-100: #e8f5e0;
  --green-50: #f4faf2;
  --stone-100: #f5f2eb;
  --stone-200: #e6dfd1;
  --stone-700: #5c5343;
  --stone-900: #2c2416;
  --orange-500: #d97706;
  --red-500: #b91c1c;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--stone-100);
  color: var(--stone-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Header */
.site-header {
  background: var(--green-900);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-text { letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--green-200);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--white); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.hero-sub { font-size: 1.15rem; opacity: 0.95; margin-bottom: 0.5rem; }
.hero-note { font-size: 0.9rem; opacity: 0.8; }

/* Planner Layout */
.planner-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.planner-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.planner-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 80px;
}
.control-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-200);
}
.control-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stone-700);
  margin-bottom: 0.5rem;
}
.control-select, .control-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--stone-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--green-50);
  color: var(--stone-900);
  transition: border-color 0.2s;
}
.control-select:focus, .control-input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(74,124,63,0.2);
}

/* Weight Summary */
.weight-summary { text-align: center; }
.weight-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.weight-value { font-weight: 700; font-size: 1.1rem; }
.weight-target-row { margin-top: 0.25rem; }
.weight-bar-track {
  width: 100%;
  height: 14px;
  background: var(--stone-200);
  border-radius: 7px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.weight-bar-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 7px;
  transition: width 0.3s, background 0.3s;
}
.weight-bar-fill.warning { background: var(--orange-500); }
.weight-bar-fill.over { background: var(--red-500); }
.weight-status {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.25rem;
  color: var(--green-700);
}
.weight-status.warning { color: var(--orange-500); }
.weight-status.over { color: var(--red-500); }

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--green-700);
  color: var(--white);
  margin-bottom: 0.5rem;
}
.btn-primary:hover { background: var(--green-900); }
.btn-secondary {
  background: var(--stone-200);
  color: var(--stone-900);
}
.btn-secondary:hover { background: var(--stone-700); color: var(--white); }

.note-card { background: var(--green-50); border-color: var(--green-200); }
.note-title { font-weight: 700; font-size: 0.85rem; color: var(--green-700); margin-bottom: 0.25rem; }
.note-text { font-size: 0.85rem; color: var(--stone-700); line-height: 1.5; }

/* Gear List Main */
.planner-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.gear-category {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-200);
  overflow: hidden;
}
.category-header {
  background: var(--green-100);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--green-200);
}
.category-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.category-weight {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stone-700);
}
.gear-items { padding: 0.5rem 1.25rem; }
.gear-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--green-50);
  flex-wrap: wrap;
}
.gear-item:last-child { border-bottom: none; }
.gear-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--stone-200);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: var(--white);
}
.gear-check.checked {
  background: var(--green-500);
  border-color: var(--green-500);
}
.gear-check.checked::after {
  content: '✓';
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
}
.gear-name {
  flex: 1;
  min-width: 120px;
  font-weight: 500;
  font-size: 0.95rem;
}
.gear-qty {
  width: 50px;
  padding: 0.35rem;
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  text-align: center;
  font-size: 0.85rem;
  font-family: inherit;
}
.gear-weight {
  width: 65px;
  padding: 0.35rem;
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  text-align: center;
  font-size: 0.85rem;
  font-family: inherit;
}
.gear-label {
  font-size: 0.75rem;
  color: var(--stone-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.add-custom-btn {
  background: none;
  border: 1px dashed var(--stone-200);
  color: var(--green-700);
  padding: 0.5rem 1.25rem;
  margin: 0.5rem 1.25rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.2s;
}
.add-custom-btn:hover { background: var(--green-50); }

/* Supporting Content */
.supporting-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.supporting-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-900);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.support-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-200);
}
.support-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-900); margin-bottom: 0.5rem; }
.support-card p { font-size: 0.95rem; color: var(--stone-700); line-height: 1.55; }

/* Caveats */
.caveats-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.caveats-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-900);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.caveats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.caveat-item {
  background: var(--white);
  border-left: 4px solid var(--orange-500);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.caveat-item h3 { font-size: 1rem; font-weight: 700; color: var(--stone-900); margin-bottom: 0.4rem; }
.caveat-item p { font-size: 0.9rem; color: var(--stone-700); line-height: 1.5; }

/* Scenarios */
.scenarios-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.scenarios-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-900);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.scenario-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-200);
}
.scenario-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--green-900); margin-bottom: 0.5rem; }
.scenario-card p { font-size: 0.9rem; color: var(--stone-700); line-height: 1.5; margin-bottom: 0.5rem; }
.scenario-card p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--green-900);
  color: var(--green-200);
  padding: 2rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.footer-brand { font-weight: 600; margin-bottom: 0.75rem; }
.footer-brand a { color: var(--white); text-decoration: underline; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.footer-nav a { color: var(--green-200); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }
.footer-note { font-size: 0.8rem; opacity: 0.7; }

/* Print styles */
@media print {
  .site-header, .site-footer, .planner-sidebar, .hero, .supporting-content, .caveats-section, .scenarios-section, .add-custom-btn { display: none !important; }
  .planner-layout { display: block; }
  .planner-main { max-width: 100%; }
  .gear-category { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; margin-bottom: 0.5rem; }
  .gear-check { border: 2px solid #000; }
  .gear-check.checked { background: #fff; border-color: #000; }
  .gear-check.checked::after { color: #000; }
  .gear-qty, .gear-weight { border: 1px solid #ccc; background: #fff; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 800px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }
  .planner-sidebar {
    position: static;
    order: -1;
  }
  .hero h1 { font-size: 1.75rem; }
  .hero-sub { font-size: 1rem; }
  .gear-item { gap: 0.5rem; }
  .gear-name { min-width: 100px; font-size: 0.9rem; }
  .gear-qty { width: 40px; }
  .gear-weight { width: 55px; }
}
@media (max-width: 500px) {
  .header-inner { flex-direction: column; gap: 0.5rem; }
  .site-nav { gap: 1rem; }
  .support-grid, .caveats-grid, .scenario-cards { 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;
}
