/* Honest Pet Picks — minimal, mobile-first, no frameworks */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e5e2dc;
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --warn-bg: #fff8e6;
  --warn-border: #e6c35c;
  --todo-bg: #f0f4ff;
  --todo-border: #7b8fd4;
  --max: 42rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--accent); }

/* Main */
main { padding: 1.75rem 0 3rem; }

h1 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.65rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.35rem; }

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Disclosure banners */
.disclosure {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.925rem;
  margin: 0 0 1.5rem;
}

.disclosure strong { display: block; margin-bottom: 0.25rem; }

.todo {
  background: var(--todo-bg);
  border: 1px dashed var(--todo-border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  color: #2a3a6e;
}

/* Cards / lists */
.card-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
}

.card h2, .card h3 { margin-top: 0; }
.card .meta { margin-bottom: 0.5rem; }

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 36rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: #f3f1ed;
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #e8f5ef;
  color: var(--accent);
}

.tag-todo {
  background: var(--todo-bg);
  color: #2a3a6e;
}

/* Split lists */
.split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .split { grid-template-columns: 1fr 1fr; }
}

.split .card { margin: 0; }
.split ul { margin-bottom: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap > p:first-child {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

.site-footer small { display: block; margin-top: 0.5rem; }

/* Product images in comparison tables & cards */
.col-img {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

a:has(.product-img) {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.product-img {
  display: block;
  width: 140px;
  height: 140px;
  max-width: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.card-thumb {
  display: block;
  margin: 0 0 0.75rem;
}

.card-thumb .product-img {
  width: 96px;
  height: 96px;
  max-width: 96px;
}

@media (max-width: 559px) {
  .product-img {
    width: 96px;
    height: 96px;
    max-width: 96px;
  }

  table {
    min-width: 32rem;
  }

  .col-img {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Amazon-style swappable product card (Associates template) */
.amz-card {
  max-width: 22rem;
  margin: 1.25rem auto;
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  overflow: hidden;
  font-family: "Amazon Ember", Arial, sans-serif;
}
.amz-card-top {
  background: #232f3e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.85rem;
}
.amz-card-body {
  padding: 1rem 1rem 1.15rem;
  text-align: center;
}
.amz-card-body img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0.25rem auto 0.85rem;
  display: block;
}
.amz-card h2 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  color: #0f1111;
  font-weight: 700;
  text-align: left;
}
.amz-card .amz-blurb {
  font-size: 0.9rem;
  color: #565959;
  text-align: left;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.amz-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #ffd814;
  border: 1px solid #fcd200;
  border-radius: 20px;
  padding: 0.65rem 1rem;
  color: #0f1111 !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  box-sizing: border-box;
}
.amz-btn:hover { background: #f7ca00; color: #0f1111 !important; }
.amz-card-foot {
  border-top: 1px solid #eee;
  padding: 0.55rem 1rem 0.75rem;
  font-size: 0.72rem;
  color: #565959;
  text-align: left;
  line-height: 1.4;
}
.amz-card-foot a { color: #007185; }

.builder-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  margin: 1.25rem 0;
}
.builder-panel label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.75rem 0 0.35rem;
}
.builder-panel input,
.builder-panel textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.builder-panel textarea { min-height: 4.5rem; resize: vertical; }
.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.builder-actions button {
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}
.builder-actions button.secondary {
  background: #fff;
  color: var(--text);
}
.builder-preview-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 720px) {
  .builder-preview-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.builder-code {
  width: 100%;
  min-height: 14rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-sizing: border-box;
}
