/* Wear vs Damage Decoder styles */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1c2430;
  --muted: #5a6473;
  --line: #d9dedd;
  --accent: #2f6b57;
  --accent-ink: #ffffff;
  --wear: #2f6b57;
  --gray: #b7791f;
  --damage: #b91c1c;
  --wear-bg: #e4f1ec;
  --gray-bg: #fdf2e1;
  --damage-bg: #fde7e7;
  --shadow: 0 1px 2px rgba(28, 36, 48, 0.06), 0 8px 24px rgba(28, 36, 48, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1100px;
}

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

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;
}
.site-header .container {
  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;
  color: var(--ink);
  font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
}
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink);
  font-weight: 500;
  padding: 6px 2px;
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.eyebrow {
  display: inline-block;
  background: var(--wear-bg);
  color: var(--wear);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  margin: 0 0 12px;
}
.hero-copy h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.lede {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 20px;
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}
.hero-points li {
  position: relative;
  padding-left: 22px;
  margin: 6px 0;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.hero-card h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
.card-tip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

/* Section heads */
.section-head {
  margin: 0 0 20px;
}
.section-head h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.section-head p {
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

/* Decoder */
.decoder {
  padding: 32px 0;
}
.decoder-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  color: var(--ink);
}
.field legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0 4px;
}
.conditions {
  display: grid;
  gap: 8px;
}
.conditions button {
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.conditions button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--wear-bg);
  color: var(--accent);
  font-weight: 600;
}
.decoder-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.result {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 160px;
}
.result-empty {
  color: var(--muted);
  margin: 0;
}
.result h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.verdict {
  display: inline-block;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin: 4px 0 10px;
}
.verdict-wear { background: var(--wear-bg); color: var(--wear); }
.verdict-gray { background: var(--gray-bg); color: var(--gray); }
.verdict-damage { background: var(--damage-bg); color: var(--damage); }
.result p { margin: 8px 0; color: var(--ink); }
.result .reasoning { color: var(--muted); }

.docs-prompts {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.docs-prompts h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.docs-prompts ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.docs-prompts li { margin: 4px 0; }

.saved {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.saved h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.saved ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}
.saved li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.saved li button {
  background: transparent;
  border: 0;
  color: var(--damage);
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
}

/* Rooms */
.rooms { padding: 32px 0; }
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.room-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.room-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.room-card dl {
  margin: 0;
  display: grid;
  gap: 10px;
}
.room-card dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.room-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.room-card dt { font-weight: 600; }
.room-card dd { margin: 0; color: var(--muted); text-align: right; max-width: 50%; }

/* Reference table */
.reference { padding: 32px 0; }
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}
.ref-table caption {
  text-align: left;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}
.ref-table thead th {
  background: #f0f2f3;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
}
.ref-table tbody td {
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.ref-table tbody tr:last-child td { border-bottom: 0; }
.ref-table tbody tr:hover { background: #fafafa; }

/* Print sheet */
.print-sheet {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.print-sheet h3 { margin: 0 0 8px; font-size: 17px; }
.print-sheet p { color: var(--muted); margin: 0 0 14px; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* Mistakes */
.mistakes { padding: 32px 0; }
.mistake-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  counter-reset: mistakes;
}
.mistake-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
.mistake-list h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.mistake-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* About */
.about { padding: 32px 0; }
.about p { max-width: 70ch; color: var(--ink); }
.about .meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 32px 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.footer-grid a { color: var(--ink); }
.footer-small {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* Print */
@media print {
  .site-header, .site-footer, .decoder-controls, .hero-actions, .hero-points, .btn, .about, #saved, .print-sheet .btn, .section-head p { display: none !important; }
  body { background: #fff; }
  .container { max-width: 100%; padding: 0; }
  .result, .room-card, .ref-table { box-shadow: none; break-inside: avoid; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .decoder-grid { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: 1fr 1fr; }
  .mistake-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .site-nav { gap: 12px; }
}

@media (max-width: 560px) {
  .room-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 26px; }
  .site-header .container { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav { gap: 10px; }
}



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