/* PawPass: Pet Sitter Handover Sheet Builder */
:root {
  --brown-900: #3E2723;
  --brown-800: #4E342E;
  --brown-700: #5D4037;
  --brown-600: #6D4C41;
  --brown-500: #8B5E3C;
  --brown-400: #A1887F;
  --brown-300: #BCAAA4;
  --brown-200: #D7CCC8;
  --brown-100: #EFEBE9;
  --brown-50: #FAF6F2;
  --cream: #FFF8F0;
  --warm-white: #FEFDFB;
  --accent-orange: #E65100;
  --accent-orange-light: #FFF3E0;
  --accent-green: #2E7D32;
  --accent-green-light: #E8F5E9;
  --accent-red: #C62828;
  --accent-red-light: #FFEBEE;
  --text-primary: #2C1810;
  --text-secondary: #5D4037;
  --text-muted: #8D6E63;
  --border: #D7CCC8;
  --border-light: #EFEBE9;
  --shadow-sm: 0 1px 3px rgba(62, 39, 35, 0.08);
  --shadow-md: 0 4px 12px rgba(62, 39, 35, 0.1);
  --shadow-lg: 0 8px 24px rgba(62, 39, 35, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--warm-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brown-600);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus {
  color: var(--accent-orange);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--brown-700);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--brown-50);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brown-800);
}
.logo:hover, .logo:focus {
  color: var(--brown-800);
}
.logo-icon {
  flex-shrink: 0;
}
.main-nav {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brown-100) 0%, var(--cream) 100%);
  padding: 48px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--brown-900);
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn:focus-visible {
  outline: 3px solid var(--brown-400);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brown-600);
  color: #fff;
  border-color: var(--brown-600);
}
.btn-primary:hover {
  background: var(--brown-700);
  border-color: var(--brown-700);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--brown-600);
  border-color: var(--brown-300);
}
.btn-outline:hover {
  background: var(--brown-100);
  border-color: var(--brown-500);
  color: var(--brown-700);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-danger {
  background: var(--accent-red-light);
  color: var(--accent-red);
  border-color: var(--accent-red-light);
}
.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  background: var(--brown-100);
  color: var(--text-muted);
  border: none;
  flex-shrink: 0;
  align-self: flex-end;
}
.btn-icon:hover {
  background: var(--accent-red-light);
  color: var(--accent-red);
}
.btn-preset {
  background: var(--accent-orange-light);
  color: var(--accent-orange);
  border-color: var(--accent-orange-light);
  padding: 4px 14px;
  font-size: 0.82rem;
}
.btn-preset:hover {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

/* Builder Section */
.builder-section {
  padding: 40px 0;
}
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Form */
.builder-form {
  min-width: 0;
}
.pet-selector {
  margin-bottom: 16px;
}
.pet-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pet-select-row select {
  flex: 1;
  min-width: 0;
}
.presets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.presets-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  background: #fff;
}
.form-section legend {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brown-800);
  padding: 0 8px;
  margin-left: -8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--warm-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brown-400);
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15);
}
.field textarea {
  resize: vertical;
  min-height: 60px;
}

/* Dynamic rows */
.feeding-row,
.med-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.med-row {
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
}

/* Preview Panel */
.preview-panel {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.preview-header h2 {
  font-size: 1.1rem;
  color: var(--brown-800);
}
.preview-actions {
  display: flex;
  gap: 8px;
}
.preview-sheet {
  padding: 20px;
}
.sheet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--brown-200);
}
.sheet-paw {
  flex-shrink: 0;
}
.sheet-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brown-900);
}
.sheet-pet-name {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.sheet-section {
  margin-bottom: 18px;
}
.sheet-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brown-500);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.sheet-grid-item {
  font-size: 0.88rem;
}
.sheet-grid-item .label {
  font-weight: 600;
  color: var(--text-secondary);
}
.sheet-grid-item .value {
  color: var(--text-primary);
}
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.sheet-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sheet-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.sheet-section p {
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: pre-wrap;
}
.sheet-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Tips Section */
.tips-section {
  background: var(--brown-50);
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.tips-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brown-900);
  margin-bottom: 24px;
  text-align: center;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tip-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.tip-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown-800);
  margin-bottom: 8px;
}
.tip-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* FAQ Section */
.faq-section {
  padding: 48px 0;
}
.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brown-900);
  margin-bottom: 24px;
  text-align: center;
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-list summary {
  padding: 14px 18px;
  font-weight: 600;
  color: var(--brown-800);
  cursor: pointer;
  background: var(--brown-50);
  transition: background var(--transition);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--brown-400);
  transition: transform var(--transition);
}
.faq-list details[open] summary::after {
  content: '−';
}
.faq-list summary:hover {
  background: var(--brown-100);
}
.faq-list details p {
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  border-top: 1px solid var(--border-light);
}

/* Footer */
.site-footer {
  background: var(--brown-800);
  color: var(--brown-200);
  padding: 32px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.footer-tag {
  font-size: 0.8rem;
  color: var(--brown-300);
}
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: var(--brown-300);
  font-size: 0.85rem;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: #fff;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--brown-400);
}

/* Print styles */
@media print {
  body {
    background: #fff;
  }
  .site-header,
  .site-footer,
  .hero,
  .builder-form,
  .tips-section,
  .faq-section,
  .preview-header,
  .skip-link {
    display: none !important;
  }
  .builder-section {
    padding: 0;
  }
  .builder-layout {
    display: block;
  }
  .preview-panel {
    position: static;
    max-height: none;
    overflow: visible;
    border: none;
    box-shadow: none;
  }
  .preview-sheet {
    padding: 0;
  }
  .sheet-footer {
    border-top: 2px solid #333;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
    max-height: none;
    order: -1;
  }
  .tips-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .feeding-row,
  .med-row {
    grid-template-columns: 1fr 1fr;
  }
  .tips-grid {
    grid-template-columns: 1fr;
  }
  .sheet-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
    gap: 8px;
  }
  .main-nav {
    gap: 16px;
  }
  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .preview-actions {
    width: 100%;
  }
  .preview-actions .btn {
    flex: 1;
  }
}

/* Empty state for preview */
.empty-hint {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brown-800);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  pointer-events: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 3px solid var(--brown-400);
  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;
}
