/* Foraging Season Calendar — Styles */
:root {
  --green-900: #2d3b1f;
  --green-800: #3d5229;
  --green-700: #4a6332;
  --green-600: #5a7247;
  --green-500: #6b8a52;
  --green-400: #7a9a5f;
  --green-300: #9ab87a;
  --green-200: #c2d9a8;
  --green-100: #e8f0e0;
  --green-50: #f5f9f1;
  --brown-700: #5c3d1e;
  --brown-500: #8b6914;
  --red-600: #c0392b;
  --red-50: #fdf0ef;
  --gray-900: #1a1a1a;
  --gray-700: #3d3d3d;
  --gray-500: #6b6b6b;
  --gray-300: #b0b0b0;
  --gray-100: #e8e8e8;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --max-width: 1100px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-900); background: var(--green-50); line-height: 1.6; }

a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-900); }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header { background: var(--green-900); color: var(--white); padding: 0.75rem 0; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 0.5rem; color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.logo:hover { color: var(--green-200); }
.logo-accent { color: var(--green-300); }
.main-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.main-nav a { color: var(--green-200); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.main-nav a:hover { color: var(--white); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 100%); color: var(--white); padding: 3rem 1.5rem; }
.hero-content { max-width: var(--max-width); margin: 0 auto; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; }
.hero-sub { font-size: 1.05rem; color: var(--green-200); max-width: 640px; margin-bottom: 2rem; }

/* Controls */
.controls-bar { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; background: rgba(255,255,255,0.1); padding: 1.25rem; border-radius: var(--radius-lg); backdrop-filter: blur(4px); }
.control-group { display: flex; flex-direction: column; gap: 0.35rem; }
.control-label { font-size: 0.8rem; font-weight: 600; color: var(--green-200); text-transform: uppercase; letter-spacing: 0.04em; }
.control-select { padding: 0.6rem 0.75rem; border-radius: var(--radius); border: 2px solid var(--green-400); background: var(--white); color: var(--gray-900); font-size: 0.95rem; font-family: var(--font); min-width: 180px; cursor: pointer; }
.control-select:focus { outline: 3px solid var(--green-300); outline-offset: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.25rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; font-family: var(--font); cursor: pointer; border: 2px solid transparent; transition: all 0.15s; text-decoration: none; }
.btn-primary { background: var(--green-600); color: var(--white); border-color: var(--green-600); }
.btn-primary:hover { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--green-300); }
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* Sections */
section { padding: 3rem 1.5rem; }
.section-header { max-width: var(--max-width); margin: 0 auto 1.5rem; }
.section-header h2 { font-size: 1.6rem; font-weight: 700; color: var(--green-900); margin-bottom: 0.4rem; }
.section-desc { color: var(--gray-500); font-size: 0.95rem; max-width: 600px; }

/* Calendar */
.calendar-section { background: var(--white); }
.calendar-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.month-card { background: var(--green-50); border-radius: var(--radius-lg); border: 1px solid var(--green-200); overflow: hidden; }
.month-header { background: var(--green-700); color: var(--white); padding: 0.6rem 1rem; font-weight: 700; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; }
.month-header .month-count { font-size: 0.75rem; background: rgba(255,255,255,0.2); padding: 0.15rem 0.5rem; border-radius: 10px; font-weight: 500; }
.month-body { padding: 0.75rem; }
.species-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid var(--green-100); cursor: pointer; transition: background 0.1s; border-radius: 4px; }
.species-item:last-child { border-bottom: none; }
.species-item:hover { background: var(--green-100); }
.species-item input[type="checkbox"] { margin-top: 0.2rem; accent-color: var(--green-600); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.species-item label { font-size: 0.88rem; line-height: 1.35; cursor: pointer; flex: 1; }
.species-item .sp-type { font-size: 0.7rem; color: var(--gray-500); display: block; }
.species-item.checked label { text-decoration: line-through; color: var(--gray-300); }
.current-month { border-color: var(--green-500); box-shadow: 0 0 0 2px var(--green-300); }
.current-month .month-header { background: var(--green-600); }

/* Species Panel */
.species-section { background: var(--green-50); }
.species-panel { max-width: var(--max-width); margin: 0 auto; }
.species-empty { text-align: center; padding: 3rem 1rem; color: var(--gray-500); }
.species-empty svg { margin: 0 auto 1rem; opacity: 0.5; }
.species-detail { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.species-header { background: var(--green-800); color: var(--white); padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.species-header h3 { font-size: 1.3rem; font-weight: 700; }
.species-type-badge { background: rgba(255,255,255,0.2); padding: 0.2rem 0.6rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.species-body { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.5rem; }
.species-photo { background: var(--green-100); border-radius: var(--radius); min-height: 160px; display: flex; align-items: center; justify-content: center; }
.species-photo svg { opacity: 0.4; }
.species-info { display: flex; flex-direction: column; gap: 1.25rem; }
.info-block h4 { font-size: 0.85rem; font-weight: 700; color: var(--green-700); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.35rem; }
.info-block p { font-size: 0.92rem; color: var(--gray-700); line-height: 1.55; }
.warning-block { background: var(--red-50); border-left: 4px solid var(--red-600); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.warning-block h4 { color: var(--red-600); }

/* Safety */
.safety-section { background: var(--white); }
.safety-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.safety-card { background: var(--green-50); border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid var(--green-200); }
.safety-card h3 { font-size: 1rem; font-weight: 700; color: var(--green-800); margin-bottom: 0.6rem; }
.safety-card ul { padding-left: 1.1rem; }
.safety-card li { font-size: 0.88rem; color: var(--gray-700); margin-bottom: 0.35rem; line-height: 1.45; }

/* Pocket Guide */
.pocket-guide-section { background: var(--green-50); }
.pocket-guide-preview { max-width: var(--max-width); margin: 0 auto 1.5rem; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.5rem; min-height: 120px; }
.pocket-guide-preview h3 { font-size: 1.1rem; color: var(--green-800); margin-bottom: 0.75rem; }
.pocket-guide-preview ul { columns: 2; padding-left: 1.2rem; }
.pocket-guide-preview li { font-size: 0.88rem; color: var(--gray-700); margin-bottom: 0.25rem; }
.pocket-guide-actions { max-width: var(--max-width); margin: 0 auto; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.pocket-guide-actions .btn-outline { color: var(--green-700); border-color: var(--green-500); }
.pocket-guide-actions .btn-outline:hover { background: var(--green-100); color: var(--green-900); }

/* FAQ */
.faq-section { background: var(--white); }
.faq-list { max-width: var(--max-width); margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-100); }
.faq-toggle { width: 100%; text-align: left; background: none; border: none; font-family: var(--font); font-size: 0.95rem; font-weight: 600; color: var(--green-800); padding: 1rem 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-toggle::after { content: '+'; font-size: 1.2rem; color: var(--green-500); transition: transform 0.2s; }
.faq-toggle[aria-expanded="true"]::after { content: '−'; }
.faq-toggle:hover { color: var(--green-600); }
.faq-item dd { font-size: 0.9rem; color: var(--gray-700); line-height: 1.55; padding: 0 0 1rem; margin: 0; }

/* Why Section */
.why-section { background: var(--green-50); }
.why-content { max-width: var(--max-width); margin: 0 auto; }
.why-content h2 { font-size: 1.4rem; color: var(--green-900); margin-bottom: 1rem; }
.why-content p { font-size: 0.93rem; color: var(--gray-700); margin-bottom: 0.75rem; line-height: 1.6; }
.last-updated { font-size: 0.8rem; color: var(--gray-500); margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--green-200); }

/* Footer */
.site-footer { background: var(--green-900); color: var(--green-200); padding: 2rem 1.5rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.footer-links a { color: var(--green-300); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: var(--green-400); }
.footer-copy a { color: var(--green-300); }

/* Print */
@media print {
  .site-header, .site-footer, .controls-bar, .species-section, .safety-section, .faq-section, .why-section, .pocket-guide-actions { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .calendar-grid { display: block; }
  .month-card { break-inside: avoid; margin-bottom: 1rem; border: 1px solid #ccc; }
  .month-header { background: #eee !important; color: black !important; }
  .pocket-guide-preview { box-shadow: none; border: 1px solid #ccc; }
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding: 2rem 1rem; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .control-select { min-width: 0; width: 100%; }
  .species-body { grid-template-columns: 1fr; }
  .species-photo { min-height: 100px; }
  .pocket-guide-preview ul { columns: 1; }
  section { padding: 2rem 1rem; }
}

@media (max-width: 480px) {
  .calendar-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .main-nav { gap: 0.75rem; }
  .main-nav a { font-size: 0.82rem; }
}



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