/* Thrifted Ceramic Crack & Glaze Checker */
:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #2b2521;
  --muted: #6f655b;
  --line: #e6ddd1;
  --accent: #b85a3c;
  --accent-ink: #ffffff;
  --safe: #5a7a4a;
  --warn: #c28a2a;
  --risk: #a83b2b;
  --shadow: 0 1px 2px rgba(43, 37, 33, 0.06), 0 8px 24px rgba(43, 37, 33, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); 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: 20;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.brand-text { font-size: 1rem; }

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 8px;
  font-weight: 700;
}
.hero-copy h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 16px;
}
.lede {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-points li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.7;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.hero-card h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.hero-card ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.hero-card li { margin-bottom: 6px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #9f4a2e; border-color: #9f4a2e; text-decoration: none; color: var(--accent-ink); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Section heads */
.section-head {
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.section-head p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* Worksheet */
.worksheet { padding: 32px 0; }
.worksheet-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}
.worksheet-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}
.field textarea { resize: vertical; }

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 18px;
  background: var(--bg);
}
.step legend {
  font-weight: 700;
  padding: 0 6px;
  color: var(--ink);
}
.step-help {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  cursor: pointer;
  font-size: 0.95rem;
}
.check input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Scorecard */
.scorecard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.scorecard h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.score-label {
  font-size: 0.9rem;
  color: var(--muted);
}
.score-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}
.meter {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.meter-fill {
  height: 100%;
  width: 0;
  background: var(--safe);
  transition: width 0.25s ease, background 0.25s ease;
}
.verdict {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 16px;
  min-height: 40px;
}
.scorecard h3 {
  font-size: 0.95rem;
  margin: 16px 0 8px;
  color: var(--ink);
}
.explanations {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.explanations li {
  padding: 8px 10px;
  border-left: 3px solid var(--line);
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: none;
}
.explanations li.active {
  display: block;
  border-left-color: var(--accent);
  color: var(--ink);
}

/* Presets */
.presets { padding: 32px 0; }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.preset {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.preset h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--accent);
}
.preset p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 10px;
}
.preset ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--ink);
}
.preset li { margin-bottom: 4px; }

/* Scenario */
.scenario { padding: 32px 0; }
.walkthrough {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.walkthrough li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  counter-increment: step;
  position: relative;
  padding-left: 56px;
}
.walkthrough li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.walkthrough h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.walkthrough p {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

/* Collection */
.collection { padding: 32px 0; }
.collection-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}
.collection-grid h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.find-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.find-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
}
.find-list li.empty {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}
.find-list li .meta {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}
.find-list li .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.safe { background: #e3eedb; color: var(--safe); }
.badge.warn { background: #f6ecd3; color: var(--warn); }
.badge.risk { background: #f3d9d3; color: var(--risk); }

.collection-tips {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.collection-tips ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.95rem;
  color: var(--ink);
}
.collection-tips li { margin-bottom: 6px; }

/* About */
.about { padding: 32px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.about-grid p {
  color: var(--ink);
  font-size: 0.95rem;
  margin: 0 0 12px;
}
.about-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.about-side h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--accent);
}
.about-side ul {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 0.95rem;
  color: var(--ink);
}
.about-side li { margin-bottom: 4px; }

/* Donate */
.donate {
  padding: 32px 0;
}
.donate-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.donate-grid h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.donate-grid p {
  margin: 0;
  color: var(--muted);
  max-width: 50ch;
}
.donate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 24px 0 12px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-grid a { color: var(--ink); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.muted { color: var(--muted); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .worksheet-grid,
  .collection-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .scorecard {
    position: static;
  }
  .site-nav {
    gap: 12px;
  }
  .site-nav a {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .nav-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero {
    padding-top: 32px;
  }
  .actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
  .donate-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .donate,
  .collection,
  .hero-actions,
  .hero-points,
  .section-head p {
    display: none;
  }
  body {
    background: #fff;
  }
  .worksheet-main,
  .scorecard {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}



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