/* Community Event Supply Planner - Styles */
:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-accent: #F59E0B;
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text: #1E293B;
  --color-text-light: #64748B;
  --color-border: #E2E8F0;
  --color-success: #16A34A;
  --color-error: #DC2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1120px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.125rem; color: var(--color-text); }
.logo:hover { text-decoration: none; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { font-size: 0.9375rem; color: var(--color-text-light); font-weight: 500; }
.site-nav a:hover { color: var(--color-primary); text-decoration: none; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); color: white; padding: 4rem 0; text-align: center; }
.hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.hero-sub { font-size: 1.125rem; opacity: 0.9; max-width: 560px; margin: 0 auto 2rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.625rem 1.25rem; border-radius: var(--radius); font-size: 0.9375rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; }
.btn-primary { background: var(--color-accent); color: #1E293B; }
.btn-primary:hover { background: #D97706; text-decoration: none; }
.btn-secondary { background: var(--color-surface); color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary); color: white; text-decoration: none; }
.btn-small { padding: 0.375rem 0.75rem; font-size: 0.875rem; }

/* Planner Section */
.planner-section { padding: 3rem 0; }
.planner-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }

.planner-inputs h2,
.planner-output h2 { font-size: 1.25rem; margin-bottom: 1.25rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; color: var(--color-text); }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.9375rem; font-family: inherit; background: var(--color-surface); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.custom-items-fieldset { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; }
.custom-items-fieldset legend { font-weight: 600; font-size: 0.875rem; padding: 0 0.5rem; }
.custom-item-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.custom-item-row input { flex: 1; }
.custom-item-row .remove-item { background: none; border: none; color: var(--color-error); cursor: pointer; font-size: 1.25rem; padding: 0 0.25rem; }

/* Output sidebar */
.planner-output { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.output-sticky { position: sticky; top: 80px; padding: 1.5rem; }

#checklist-results { margin-bottom: 1rem; }
.checklist-header { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--color-border); }
.checklist-meta { font-size: 0.875rem; color: var(--color-text-light); margin-bottom: 1rem; }
.checklist-group { margin-bottom: 1rem; }
.checklist-group-title { font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-light); margin-bottom: 0.375rem; }
.checklist-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.25rem 0; font-size: 0.9375rem; }
.checklist-item input[type="checkbox"] { margin-top: 0.25rem; width: 1rem; height: 1rem; accent-color: var(--color-primary); }
.checklist-item.checked label { text-decoration: line-through; color: var(--color-text-light); }
.checklist-notes { margin-top: 1rem; padding: 0.75rem; background: #FEF3C7; border-radius: var(--radius); font-size: 0.875rem; }
.checklist-notes-title { font-weight: 600; margin-bottom: 0.25rem; }

.empty-state { color: var(--color-text-light); font-style: italic; text-align: center; padding: 2rem 1rem; }

.output-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.save-notice { margin-top: 0.75rem; font-size: 0.875rem; color: var(--color-success); font-weight: 500; }

/* Examples Section */
.examples-section { padding: 3rem 0; background: var(--color-surface); }
.examples-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.example-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; background: var(--color-bg); }
.example-card h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.example-card p { font-size: 0.9375rem; color: var(--color-text-light); margin-bottom: 1rem; }

/* Tips Section */
.tips-section { padding: 3rem 0; }
.tips-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.tip-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.tip-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.tip-card p { font-size: 0.9375rem; color: var(--color-text-light); }

.assumptions-box { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: var(--radius); padding: 1.5rem; }
.assumptions-box h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.assumptions-box ul { margin-left: 1.25rem; margin-bottom: 1rem; }
.assumptions-box li { font-size: 0.9375rem; margin-bottom: 0.375rem; }
.last-updated { font-size: 0.8125rem; color: var(--color-text-light); }

/* Footer */
.site-footer { background: var(--color-text); color: #94A3B8; padding: 2.5rem 0 1.5rem; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-grid strong { color: white; display: block; margin-bottom: 0.5rem; }
.footer-grid a { display: block; color: #94A3B8; margin-bottom: 0.25rem; }
.footer-grid a:hover { color: white; }
.footer-copy { text-align: center; padding-top: 1.5rem; border-top: 1px solid #334155; }
.footer-copy a { color: #94A3B8; }

/* Print styles */
@media print {
  .site-header, .site-footer, .hero, .examples-section, .tips-section, .output-actions, .planner-inputs { display: none !important; }
  .planner-section { padding: 0; }
  .planner-grid { display: block; }
  .planner-output { border: none; box-shadow: none; }
  .output-sticky { position: static; padding: 0; }
  .checklist-item input[type="checkbox"] { display: none; }
}

/* Responsive */
@media (max-width: 860px) {
  .planner-grid { grid-template-columns: 1fr; }
  .output-sticky { position: static; }
  .hero h1 { font-size: 1.75rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-header .container { flex-direction: column; height: auto; padding: 0.75rem 1rem; gap: 0.5rem; }
  .site-nav { gap: 1rem; }
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.5rem; }
  .output-actions { flex-direction: column; }
  .output-actions .btn { width: 100%; }
}



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