/* Toxic to Dogs — minimal, fast, mobile-first.
   System fonts only. No external requests. Subtle motion only. */

:root {
  --bg: #fdfdfa;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --faint: #78716c;
  --line: #e7e5e4;
  --accent: #166534;
  --accent-soft: #f0fdf4;
  --accent-hover: #14532d;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-line: #fecaca;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --green-line: #bbf7d0;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-line: #fde68a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.75rem; padding-top: 0.4rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1080px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 253, 250, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}
.main-nav a:hover { color: var(--ink); background: #f5f5f4; text-decoration: none; }
.header-search { position: relative; }
.header-search input {
  width: 190px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: var(--font);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, width 0.2s ease;
}
.header-search input:focus { border-color: var(--accent); width: 230px; }
.search-results {
  position: absolute;
  top: 44px;
  right: 0;
  width: 320px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 60;
}
.search-results.open { display: block; }
.search-results a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 0.93rem;
  border-bottom: 1px solid #f5f5f4;
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--accent-soft); text-decoration: none; }
.search-results .none { padding: 12px 14px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Verdict badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.toxic { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-line); }
.badge.safe { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-line); }
.badge.caution { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); }

/* ---------- Verdict box ---------- */
.verdict {
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 1.4rem 0 1.6rem;
  border: 1px solid;
  animation: verdict-in 0.5s ease both;
}
.verdict.toxic { background: var(--red-bg); border-color: var(--red-line); }
.verdict.safe { background: var(--green-bg); border-color: var(--green-line); }
.verdict.caution { background: var(--amber-bg); border-color: var(--amber-line); }
.verdict .verdict-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.verdict.toxic .verdict-label { color: var(--red); }
.verdict.safe .verdict-label { color: var(--green); }
.verdict.caution .verdict-label { color: var(--amber); }
.verdict h2, .verdict .verdict-headline {
  font-size: 1.5rem;
  margin: 0 0 6px;
  padding: 0;
}
.verdict p { margin: 0; color: #44403c; }
@keyframes verdict-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 52px 20px 40px;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 0.6rem; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 auto 1.6rem; }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-family: var(--font);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color 0.15s ease;
}
.hero-search input:focus { border-color: var(--accent); }
.hero-search .search-results { top: 60px; left: 0; right: 0; width: auto; text-align: left; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Cards & grids ---------- */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; padding: 0; }
.section-head a { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.07), 0 10px 26px rgba(0,0,0,0.06); }
.card:hover a.card-title { text-decoration: underline; }
.card img { width: 100%; height: 160px; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; color: var(--ink); font-size: 1.02rem; line-height: 1.35; }
.card-text { font-size: 0.9rem; color: var(--muted); margin: 0; flex: 1; }
.card .badge { align-self: flex-start; }

/* ---------- Article ---------- */
.article { padding: 26px 0 10px; }
.breadcrumb { font-size: 0.86rem; color: var(--faint); margin-bottom: 14px; }
.breadcrumb a { color: var(--faint); }
.article h1 { font-size: 2.05rem; }
.article .byline { font-size: 0.88rem; color: var(--faint); margin: 6px 0 0; }
.article figure { margin: 1.4rem 0; }
.article figure img { border-radius: var(--radius); width: 100%; max-height: 440px; object-fit: cover; }
.article figcaption { font-size: 0.83rem; color: var(--faint); margin-top: 8px; line-height: 1.5; }
.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.facts dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 1.4rem 0;
}
.callout.warn { border-left-color: var(--red); background: var(--red-bg); }
.callout p { margin: 0; }
.callout p + p { margin-top: 0.5rem; }
.dont-list li::marker { content: "✕  "; color: var(--red); font-weight: 700; }
.do-list li::marker { color: var(--accent); font-weight: 700; }
details.faq { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: " +"; color: var(--accent); float: right; }
details.faq[open ] summary::after { content: " −"; }
details.faq p { margin: 0.6rem 0 0; }
.sources { font-size: 0.92rem; }
.sources li { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.disclaimer-box {
  border: 1px solid var(--amber-line);
  background: var(--amber-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 2rem 0 1rem;
  font-size: 0.92rem;
}
.disclaimer-box strong { color: var(--amber); }
.related { margin-top: 2.2rem; }

/* ---------- Tools ---------- */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 1.4rem 0;
}
.tool-card label { display: block; font-weight: 700; font-size: 0.94rem; margin: 14px 0 6px; }
.tool-card label:first-of-type { margin-top: 0; }
.tool-card input[type="number"], .tool-card input[type="text"], .tool-card select {
  width: 100%;
  padding: 11px 13px;
  font-size: 1rem;
  font-family: var(--font);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.tool-card input:focus, .tool-card select:focus { border-color: var(--accent); }
.unit-row { display: flex; gap: 8px; margin-bottom: 4px; }
.unit-row button {
  flex: 1;
  padding: 9px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.unit-row button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn {
  display: inline-block;
  width: 100%;
  padding: 13px;
  margin-top: 18px;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.result {
  display: none;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 18px;
  border: 1px solid;
}
.result.show { display: block; animation: verdict-in 0.4s ease both; }
.result.low { background: var(--green-bg); border-color: var(--green-line); }
.result.moderate { background: var(--amber-bg); border-color: var(--amber-line); }
.result.high { background: var(--red-bg); border-color: var(--red-line); }
.result h3 { margin: 0 0 6px; padding: 0; }
.result .big-number { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.result p { margin: 0 0 0.5rem; }
.result p:last-child { margin-bottom: 0; }
.checker-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.checker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.15s ease;
}
.checker-item:hover { border-color: var(--accent); }
.checker-item a { color: var(--ink); font-weight: 700; }
.checker-item a:hover { color: var(--accent); }
.checker-item p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 1rem 0; }
.ref-table th, .ref-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.ref-table th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- Ad slots (placeholders only — no ads loaded) ---------- */
.ad-slot {
  border: 1.5px dashed #d6d3d1;
  border-radius: 10px;
  background: #fafaf9;
  color: #a8a29e;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 22px 10px;
  margin: 1.8rem 0;
}
.ad-slot.leaderboard { min-height: 90px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 44px; padding: 34px 0 40px; background: #fafaf9; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { margin: 0 0 10px; font-size: 0.95rem; }
.site-footer p, .site-footer a { font-size: 0.9rem; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { max-width: 1080px; margin: 26px auto 0; padding: 16px 20px 0; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--faint); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .verdict, .result.show { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .header-search { display: none; }
  .main-nav a { padding: 6px 7px; font-size: 0.86rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero { padding: 36px 20px 28px; }
  .hero h1 { font-size: 1.9rem; }
  .facts dl { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
}
