/* Household Outbreak Prep Notebook - Stylesheet */
:root {
  --green-900: #1B4332;
  --green-700: #2D6A4F;
  --green-500: #40916C;
  --green-300: #95D5B2;
  --green-100: #D8F3DC;
  --green-50: #F0FAF2;
  --warm-100: #FFF8F0;
  --warm-200: #F5EDE4;
  --warm-300: #E8DDD0;
  --ink: #1A1A2E;
  --ink-light: #4A4A6A;
  --ink-muted: #7A7A9A;
  --white: #FFFFFF;
  --danger: #C0392B;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--warm-100);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.site-header {
  background: var(--green-900);
  color: var(--white);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--green-300);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover {
  color: var(--white);
  border-bottom-color: var(--green-300);
}

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

/* Print Bar */
.print-bar {
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.2;
}
.page-subtitle {
  color: var(--ink-light);
  margin-top: 0.25rem;
  font-size: 0.95rem;
}
.action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.bottom-actions { margin-top: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
  line-height: 1.3;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); }
.btn-secondary {
  background: var(--white);
  color: var(--green-700);
  border-color: var(--green-300);
}
.btn-secondary:hover { background: var(--green-50); border-color: var(--green-500); }
.btn-danger {
  background: var(--white);
  color: var(--danger);
  border-color: #E8B4B0;
}
.btn-danger:hover { background: #FFF0EE; border-color: var(--danger); }
.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.save-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--green-700);
  min-height: 1.2em;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--warm-300);
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.card-title .icon { flex-shrink: 0; }
.card-desc {
  color: var(--ink-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Fields */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { margin-bottom: 0.75rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--warm-300);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--warm-100);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.15);
  background: var(--white);
}
.field textarea { resize: vertical; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  transition: background 0.15s;
}
.checklist-item:hover { background: var(--green-50); }
.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-700);
  flex-shrink: 0;
  margin-top: 2px;
}
.checklist-item label {
  font-size: 0.9rem;
  flex: 1;
  cursor: pointer;
}
.qty-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 0.5rem;
}

.add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.add-row input[type="text"] {
  flex: 1;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid var(--warm-300);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 0.875rem;
}
.add-row input[type="text"]:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.15);
}

/* Symptom Table */
.table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
.symptom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.symptom-table th {
  background: var(--green-50);
  color: var(--green-900);
  font-weight: 700;
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 2px solid var(--green-300);
  white-space: nowrap;
}
.symptom-table td {
  padding: 0.25rem;
  border-bottom: 1px solid var(--warm-200);
}
.table-input {
  width: 100%;
  min-width: 90px;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--warm-300);
  border-radius: 5px;
  font-family: var(--font);
  font-size: 0.82rem;
  background: var(--warm-100);
}
.table-input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 2px rgba(64,145,108,0.15);
  background: var(--white);
}

/* Side Column */
.side-sticky { position: sticky; top: 70px; }
.side-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--warm-300);
}
.side-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 0.5rem;
}
.side-card p {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
  line-height: 1.55;
}
.side-card p:last-child { margin-bottom: 0; }
.side-list {
  font-size: 0.85rem;
  color: var(--ink-light);
  padding-left: 1.1rem;
  line-height: 1.55;
}
.side-list li { margin-bottom: 0.4rem; }
.side-list strong { color: var(--ink); }
.affiliate-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--green-50);
  border: 1.5px solid var(--green-300);
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--green-700);
  transition: background 0.2s;
}
.affiliate-link:hover { background: var(--green-100); }
.last-updated {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
}

/* Print-only card */
.print-only-card { display: none; }

/* Footer */
.site-footer {
  background: var(--green-900);
  color: var(--green-300);
  padding: 1.5rem 0;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.footer-nav {
  display: flex;
  gap: 1rem;
}
.footer-nav a {
  color: var(--green-300);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--white); text-decoration: underline; }

/* Print Styles */
@media print {
  .no-print { display: none !important; }
  .print-only-card { display: block !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer { display: none; }
  .main-grid { display: block; padding: 0; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; margin-bottom: 1rem; padding: 1rem; }
  .card-title { font-size: 12pt; }
  .field input, .field textarea, .table-input {
    border: none;
    border-bottom: 1px solid #999;
    background: transparent;
    border-radius: 0;
    padding: 0.2rem 0;
    font-size: 10pt;
  }
  .checklist-item { padding: 0.2rem 0; }
  .symptom-table { font-size: 9pt; }
  .table-input { min-width: 70px; }
  .print-bar { display: none; }
  a { color: #000; text-decoration: none; }
  .affiliate-link { display: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .side-col { order: 2; }
  .side-sticky { position: static; }
  .field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 0.75rem; }
  .page-title { font-size: 1.35rem; }
  .action-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .card { padding: 1rem; }
  .qty-hint { display: block; padding-left: 0; margin-top: 0.15rem; }
  .checklist-item { flex-wrap: wrap; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
}



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