/* Daycare Incident Documentation Assistant - Styles */
:root {
  --teal: #0d6b6a;
  --teal-dark: #094f4e;
  --teal-light: #e8f4f4;
  --teal-mid: #2a9d8f;
  --amber: #f0a500;
  --amber-light: #fef7e6;
  --red: #c0392b;
  --red-light: #fdf0ef;
  --gray-900: #1a1a2e;
  --gray-700: #3d3d56;
  --gray-500: #6b6b80;
  --gray-300: #c4c4d0;
  --gray-100: #f4f4f8;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --max-width: 1160px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--teal-dark); text-decoration: underline; }

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

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
}
.logo:hover { text-decoration: none; color: var(--gray-900); }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-nav {
  display: flex;
  gap: 24px;
}
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.site-nav a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
  text-decoration: none;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--white) 60%);
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--teal-dark);
  max-width: 640px;
  margin: 0 auto 16px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--gray-700);
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--teal);
  border-color: var(--teal);
}
.btn-secondary:hover { background: var(--teal-light); color: var(--teal-dark); }
.btn-ghost {
  background: transparent;
  color: var(--gray-500);
  border-color: var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-danger {
  background: var(--white);
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-light); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Builder Section */
.builder-section {
  padding: 60px 0;
  background: var(--white);
}
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.builder-form-wrap h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.builder-intro {
  color: var(--gray-500);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--gray-700);
}
.required { color: var(--red); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,107,106,0.15);
}
.form-group textarea { resize: vertical; }
.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Sidebar */
.builder-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.04);
}
.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 12px;
}
.compare-table { display: flex; flex-direction: column; gap: 8px; }
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.compare-label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 0;
}
.compare-label.good { color: var(--teal); }
.compare-label.bad { color: var(--red); }
.compare-row .good { color: var(--teal-dark); }
.compare-row .bad { color: var(--red); }
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist li {
  font-size: 0.88rem;
  color: var(--gray-700);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.sidebar-note {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-top: 10px;
  line-height: 1.5;
}

/* Timeline */
.timeline-section {
  padding: 60px 0;
  background: var(--teal-light);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.timeline-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.timeline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.empty-state h3 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
  color: var(--gray-700);
}
.empty-state p { max-width: 400px; margin: 0 auto; font-size: 0.95rem; }

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--teal);
  position: relative;
}
.timeline-card.injury { border-left-color: var(--red); }
.timeline-card.behavioral { border-left-color: var(--amber); }
.timeline-card.neglect { border-left-color: var(--red); }
.timeline-card.verbal { border-left-color: #8e44ad; }
.timeline-card.provider-response { border-left-color: #e67e22; }
.timeline-card.food-safety { border-left-color: #27ae60; }
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.timeline-card-date {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-dark);
}
.timeline-card-type {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--teal-light);
  color: var(--teal-dark);
}
.timeline-card-body {
  display: grid;
  gap: 10px;
}
.timeline-field {
  font-size: 0.9rem;
  line-height: 1.6;
}
.timeline-field-label {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 2px;
}
.timeline-card-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}
.timeline-card-actions .btn {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* Guidance */
.guidance-section {
  padding: 60px 0;
  background: var(--white);
}
.guidance-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 32px;
}
.guidance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.guidance-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(0,0,0,0.04);
}
.guidance-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 12px;
}
.guidance-card p {
  font-size: 0.93rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 10px;
}
.guidance-card p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-block {
  max-width: 760px;
}
.faq-block h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 20px;
}
.faq-block details {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-block summary {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--gray-900);
  background: var(--gray-100);
  transition: background var(--transition);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::before {
  content: "+";
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}
.faq-block details[open] summary::before { content: "−"; }
.faq-block summary:hover { background: var(--teal-light); }
.faq-block details p {
  padding: 14px 20px;
  font-size: 0.93rem;
  color: var(--gray-700);
  line-height: 1.7;
  border-top: 1px solid var(--gray-300);
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 48px 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo-text {
  color: var(--white);
  font-size: 1.1rem;
}
.footer-brand p {
  font-size: 0.88rem;
  margin-top: 8px;
  max-width: 300px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: var(--gray-300);
  font-size: 0.88rem;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--gray-500);
}
.footer-bottom a { color: var(--gray-300); }
.footer-bottom a:hover { color: var(--white); }
.footer-meta { margin-top: 8px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--teal-dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .builder-grid { grid-template-columns: 1fr; }
  .builder-sidebar { position: static; }
  .guidance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header .container { height: 56px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.82rem; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: 1rem; }
  .timeline-header { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; }
  .compare-row { grid-template-columns: 1fr; gap: 2px; }
  .compare-row .compare-label { display: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .builder-section, .hero, .guidance-section, .timeline-actions { display: none; }
  .timeline-section { background: white; padding: 0; }
  .timeline-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--teal);
  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;
}
