/* Grout & Seal Inspector */
:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-2: #eef1ee;
  --ink: #1c2420;
  --ink-soft: #4a5752;
  --line: #d9dfd8;
  --teal: #0f766e;
  --teal-dark: #0b5e58;
  --teal-soft: #d6ece8;
  --amber: #b45309;
  --amber-soft: #fbe9d2;
  --red: #b91c1c;
  --red-soft: #fbdada;
  --green: #15803d;
  --green-soft: #dcf2e3;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(28, 36, 32, 0.06), 0 6px 24px rgba(28, 36, 32, 0.06);
  --max: 1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}

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

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; }
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--teal); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 48px 0 32px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
  margin: 0 0 8px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
}
.lede {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 20px;
  max-width: 56ch;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.hero-card-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-small { padding: 6px 12px; font-size: 13px; }

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.panel-head { margin-bottom: 18px; }
.panel-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}
.panel-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--teal-soft);
  border-color: var(--teal);
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.chip input { margin: 0; }
.chip:has(input:checked) {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 600;
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* Empty state */
.empty-state {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
}

/* Checklist output */
.checklist-output { display: flex; flex-direction: column; gap: 16px; }
.checklist-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
#checklist-summary {
  font-size: 14px;
  color: var(--ink-soft);
}
.checklist-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.checklist-item.prioritized {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.checklist-item-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 15px;
}
.checklist-item-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}
.checklist-item-photo {
  font-size: 12px;
  color: var(--teal-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
  margin-top: 6px;
}
.severity-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  min-width: 140px;
}
.severity-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-align: center;
}
.severity-buttons {
  display: flex;
  gap: 4px;
}
.severity-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  font-family: inherit;
}
.severity-btn.active-low { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.severity-btn.active-med { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.severity-btn.active-high { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.severity-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-low { background: var(--green); }
.dot-med { background: var(--amber); }
.dot-high { background: var(--red); }

/* Decision tree */
.decision-tree { display: flex; flex-direction: column; gap: 18px; }
.decision-q {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.decision-q-text { margin: 0 0 10px; font-weight: 600; }
.decision-options { display: flex; gap: 8px; flex-wrap: wrap; }
.decision-btn.selected {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.decision-output {
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  color: var(--teal-dark);
  display: none;
}
.decision-output.visible { display: block; }
.decision-output h4 { margin: 0 0 6px; font-size: 15px; }
.decision-output p { margin: 0; }

/* History */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.history-item-info { display: flex; flex-direction: column; gap: 2px; }
.history-item-name { font-weight: 600; font-size: 14px; }
.history-item-date { font-size: 12px; color: var(--ink-soft); }
.history-item-actions { display: flex; gap: 6px; }
.history-empty {
  color: var(--ink-soft);
  font-size: 14px;
  font-style: italic;
}

/* Content blocks */
.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.content-block h2 {
  margin: 0 0 16px;
  font-size: 22px;
}
.content-block h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--teal-dark);
}
.content-block p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.mistake-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}
.mistake-list li { margin-bottom: 10px; }
.mistake-list strong { color: var(--ink); }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding: 28px 0;
}
.footer-inner { display: flex; flex-direction: column; gap: 6px; }
.footer-line { margin: 0; font-size: 13px; color: var(--ink-soft); }
.footer-nav {
  display: flex;
  gap: 14px;
  margin: 4px 0;
}
.footer-nav a { font-size: 13px; }
.footer-small { font-size: 12px; }

/* Print */
@media print {
  .site-header, .site-footer, .hero-actions, .form-actions, .checklist-actions, .decision-tree, #history, .content-block, .site-nav { display: none !important; }
  .panel { box-shadow: none; border: none; padding: 0; }
  body { background: #fff; }
  .checklist-item { break-inside: avoid; }
}

/* Responsive */
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 32px 0 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .checklist-item { grid-template-columns: 1fr; }
  .severity-group { min-width: 0; }
}
@media (max-width: 520px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 12px; }
  .hero h1 { font-size: 26px; }
  .panel, .content-block { padding: 20px; }
}



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