/* KitchenMap: Shared Kitchen Etiquette Planner */
:root {
  --color-primary: #D97706;
  --color-primary-dark: #B45309;
  --color-primary-light: #FEF3C7;
  --color-secondary: #059669;
  --color-secondary-light: #D1FAE5;
  --color-text: #1F2937;
  --color-text-light: #6B7280;
  --color-bg: #FFFBEB;
  --color-white: #FFFFFF;
  --color-border: #E5E7EB;
  --color-error: #DC2626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

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

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

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: var(--color-white);
  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: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg) 100%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

/* Planner Section */
.planner-section {
  padding: 64px 0;
}

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.planner-form {
  background: var(--color-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.planner-form h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-primary-light);
}

.planner-form h3 {
  font-size: 1.1rem;
  margin: 32px 0 16px;
  color: var(--color-primary-dark);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
}

.radio-label input,
.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* Preview Panel */
.preview-panel {
  position: sticky;
  top: 88px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-border);
}

.preview-header h2 {
  font-size: 1.25rem;
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.preview-actions .btn {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.agreement-preview {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.agreement-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--color-border);
}

.agreement-header h3 {
  font-size: 1.5rem;
  color: var(--color-primary-dark);
}

.agreement-date {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-top: 4px;
}

.agreement-section {
  margin-bottom: 20px;
}

.agreement-section h4 {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: 8px;
  font-weight: 700;
}

.agreement-section ul {
  list-style: none;
  padding-left: 0;
}

.agreement-section li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.agreement-section li::before {
  content: "•";
  color: var(--color-primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.agreement-signatures {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px dashed var(--color-border);
}

.agreement-signatures p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.signature-lines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.signature-line {
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* Chore Table */
.chore-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.chore-table th,
.chore-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.chore-table th {
  background: var(--color-primary-light);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.chore-table tr:nth-child(even) {
  background: var(--color-bg);
}

/* Conflicts Section */
.conflicts-section {
  padding: 64px 0;
  background: var(--color-white);
}

.conflicts-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.conflicts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.conflict-card {
  background: var(--color-bg);
  padding: 24px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
}

.conflict-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
}

.conflict-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
  padding: 64px 0;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--color-primary);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--color-text-light);
}

/* Tips Section */
.tips-section {
  padding: 64px 0;
  background: var(--color-secondary-light);
}

.tips-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--color-secondary);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.tip-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.tip-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-secondary);
}

.tip-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: var(--color-white);
  padding: 48px 0 24px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: 8px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-brand a {
  color: var(--color-primary-light);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .planner-form,
  .preview-actions,
  .hero,
  .conflicts-section,
  .faq-section,
  .tips-section {
    display: none;
  }

  .planner-section {
    padding: 0;
  }

  .planner-grid {
    display: block;
  }

  .preview-panel {
    position: static;
    box-shadow: none;
  }

  .preview-header {
    display: none;
  }

  .agreement-preview {
    max-height: none;
    overflow: visible;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .planner-grid {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 1.1rem;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 48px 0;
  }

  .planner-form {
    padding: 20px;
  }

  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .conflicts-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}


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