/* WasteWatts: Home Energy Waste Audit — Stylesheet */
:root {
  --green-900: #0d3b1f;
  --green-800: #1a6b3c;
  --green-700: #238a4e;
  --green-600: #2ea85e;
  --green-500: #3cc46e;
  --green-100: #e0f5e8;
  --green-50: #f0faf3;
  --amber-500: #f5c542;
  --amber-100: #fef7dc;
  --red-600: #c0392b;
  --red-100: #fdecea;
  --yellow-600: #d4a017;
  --yellow-100: #fef9e7;
  --gray-900: #1a1a2e;
  --gray-800: #2d2d44;
  --gray-700: #444466;
  --gray-600: #5a5a7a;
  --gray-400: #9999aa;
  --gray-200: #dddde8;
  --gray-100: #f0f0f5;
  --gray-50: #f8f8fc;
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --max-width: 1200px;
}

*, *::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-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; }
a:hover, a:focus { color: var(--green-900); 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-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-text { font-weight: 700; font-size: 1.2rem; color: var(--green-900); }
.main-nav { display: flex; gap: 20px; }
.main-nav a { font-size: 0.9rem; font-weight: 500; color: var(--gray-700); }
.main-nav a:hover { color: var(--green-800); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 4px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.3;
}
.btn-primary { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: var(--white); text-decoration: none; }
.btn-secondary { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn-ghost:hover { background: var(--green-50); text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-600) 100%);
  color: var(--white);
  padding: 80px 0 70px;
}
.hero-content { max-width: 640px; }
.hero-content h1 { font-size: 2.4rem; line-height: 1.2; margin-bottom: 16px; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-actions .btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--white); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,0.1); }
.hero-meta { font-size: 0.85rem; opacity: 0.7; }

/* Section headers */
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 1.6rem; color: var(--gray-900); margin-bottom: 8px; }
.section-header p { color: var(--gray-600); max-width: 600px; }

/* Audit section */
.audit-section { padding: 60px 0; }
.audit-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }

/* Progress bar */
.progress-bar {
  background: var(--gray-200);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--green-600);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}
.progress-text { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 20px; }

/* Room tabs */
.room-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 0;
  border-bottom: 2px solid var(--gray-200);
}
.room-tab {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-600);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.15s;
  position: relative;
  bottom: -2px;
}
.room-tab:hover { background: var(--gray-100); color: var(--gray-800); }
.room-tab.active {
  background: var(--white);
  color: var(--green-800);
  border: 2px solid var(--gray-200);
  border-bottom-color: var(--white);
}

/* Room panels */
.room-panel {
  display: none;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px;
}
.room-panel.active { display: block; }

/* Checklist items */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--green-700);
  cursor: pointer;
}
.checklist-item label {
  flex: 1;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
}
.checklist-item .item-title { font-weight: 600; color: var(--gray-900); display: block; }
.checklist-item .item-desc { font-size: 0.82rem; color: var(--gray-600); display: block; margin-top: 2px; }
.checklist-item .item-meta {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tag-quick { background: var(--red-100); color: var(--red-600); }
.tag-medium { background: var(--yellow-100); color: var(--yellow-600); }
.tag-project { background: var(--green-100); color: var(--green-800); }
.tag-renter { background: var(--amber-100); color: var(--yellow-600); }
.tag-landlord { background: var(--gray-100); color: var(--gray-700); }

/* Audit actions */
.audit-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

/* Sidebar */
.audit-sidebar { position: relative; }
.sidebar-sticky { position: sticky; top: 80px; }
.priority-panel {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.priority-panel h3 { font-size: 1.1rem; margin-bottom: 4px; }
.sidebar-note { font-size: 0.82rem; color: var(--gray-600); margin-bottom: 16px; }
.priority-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.stat {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.stat-num { display: block; font-size: 1.4rem; font-weight: 700; color: var(--green-800); }
.stat-label { display: block; font-size: 0.75rem; color: var(--gray-600); margin-top: 2px; }
.priority-list { list-style: none; }
.priority-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.priority-list li:last-child { border-bottom: none; }
.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.dot-red { background: var(--red-600); }
.dot-yellow { background: var(--yellow-600); }
.dot-green { background: var(--green-600); }
.priority-list .savings { font-size: 0.78rem; color: var(--gray-600); }
.empty-state { color: var(--gray-400); font-style: italic; font-size: 0.88rem; }

.sidebar-card {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  padding: 18px;
}
.sidebar-card h4 { font-size: 0.95rem; color: var(--green-900); margin-bottom: 6px; }
.sidebar-card p { font-size: 0.85rem; color: var(--gray-700); }

/* Example section */
.example-section { padding: 60px 0; background: var(--white); }
.example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.example-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
}
.example-card h4 { font-size: 1rem; margin-bottom: 12px; }
.example-card ul { padding-left: 18px; }
.example-card li { font-size: 0.88rem; margin-bottom: 6px; color: var(--gray-700); }
.example-note { font-size: 0.88rem; color: var(--gray-600); text-align: center; }

/* Fixes section */
.fixes-section { padding: 60px 0; }
.table-wrap { overflow-x: auto; }
.fix-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.fix-table th {
  background: var(--green-800);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.fix-table td { padding: 10px 16px; border-bottom: 1px solid var(--gray-200); }
.fix-table tr:nth-child(even) td { background: var(--gray-50); }
.fix-table tr:hover td { background: var(--green-50); }
.table-note { font-size: 0.82rem; color: var(--gray-600); margin-top: 12px; }

/* Landlord section */
.landlord-section { padding: 60px 0; background: var(--white); }
.landlord-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; color: var(--gray-800); }
.field input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: border-color 0.15s;
}
.field input:focus { outline: none; border-color: var(--green-600); }
.landlord-preview h4 { font-size: 1rem; margin-bottom: 12px; }
.request-preview-box {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.request-preview-box .empty-state { color: var(--gray-400); font-style: italic; }

/* FAQ section */
.faq-section { padding: 60px 0; }
.faq-list { max-width: 760px; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--gray-900);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--green-700);
  font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { background: var(--gray-50); }
.faq-item p { padding: 0 20px 16px; font-size: 0.9rem; color: var(--gray-700); }

/* Mistakes section */
.mistakes-section { padding: 60px 0; background: var(--white); }
.mistakes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mistake-card {
  background: var(--gray-50);
  border-left: 4px solid var(--amber-500);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.mistake-card h4 { font-size: 0.95rem; margin-bottom: 6px; color: var(--gray-900); }
.mistake-card p { font-size: 0.88rem; color: var(--gray-700); }

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 0 24px;
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { margin-top: 8px; }
.footer-brand a { color: var(--green-500); }
.footer-links h4 { color: var(--white); font-size: 0.85rem; margin-bottom: 10px; }
.footer-links a { display: block; margin-bottom: 6px; color: var(--gray-400); }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--gray-800); padding-top: 20px; text-align: center; }

/* Print styles */
@media print {
  .site-header, .site-footer, .audit-actions-bar, .audit-sidebar, .hero-section, .nav-toggle { display: none !important; }
  .audit-layout { display: block; }
  .room-panel { display: block !important; border: 1px solid #ccc; margin-bottom: 16px; }
  .room-tabs { display: none; }
  body { background: #fff; color: #000; }
}

/* Responsive */
@media (max-width: 900px) {
  .audit-layout { grid-template-columns: 1fr; }
  .audit-sidebar { order: -1; }
  .sidebar-sticky { position: static; }
  .example-grid { grid-template-columns: 1fr; }
  .landlord-layout { grid-template-columns: 1fr; }
  .mistakes-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 1.8rem; }
}

@media (max-width: 600px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 20px;
    gap: 12px;
    box-shadow: var(--shadow);
  }
  .hero-section { padding: 48px 0 40px; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .priority-stats { grid-template-columns: repeat(4, 1fr); }
  .audit-actions-bar { flex-direction: column; }
  .audit-actions-bar .btn { width: 100%; }
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}



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