/* ============================================================
   SmartPetLife — pet health & smart pet products
   Design system: "veterinary field notebook" (兽医野外记录单)
   Voice: clinical-data-meets-field-guide. Hard edges, ink stamps,
   perforated tickets, ruled paper, tape labels. NOT a soft-UI card grid.
   Type: Bricolage Grotesque (display) · Manrope (body)
   ============================================================ */

:root {
  /* Palette — forest green ink + coral stamp on true white */
  --bg: #FFFFFF;
  --paper: #F7F5EF;          /* ruled-paper section tint */
  --ink: #15211B;
  --text: #26332B;
  --muted: #59665E;
  --line: #DDE3DE;
  --line-strong: #BFC9C1;

  --brand: #2E5D46;
  --brand-600: #264D3A;
  --brand-700: #1B3A2B;      /* deep green full-bleed band */
  --brand-soft: #E6EFE9;

  --accent: #E4573D;
  --accent-600: #C8442C;
  --accent-soft: #FCEBE5;

  --amber: #D99A2B;
  --amber-soft: #FBF0DB;

  --red: #C2432F;
  --red-soft: #FAE9E5;

  --maxw: 1160px;
  --r: 6px;                   /* sharp, not pill-soft */
  --r-sm: 4px;
  --r-lg: 10px;

  --shadow: 4px 4px 0 rgba(21, 33, 27, 0.14);   /* hard offset "sticker" shadow */
  --shadow-sm: 2px 2px 0 rgba(21, 33, 27, 0.10);

  --font-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Self-hosted variable fonts (latin subset) */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/bricolage-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.68;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img { max-width: 100%; display: block; }
svg.ico { flex: 0 0 auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Reusable ink-stamp motif ---------- */
.stamp {
  position: relative;
  display: inline-grid;
  place-items: center;
  text-align: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
  transform: rotate(-6deg);
  color: var(--accent);
  opacity: 0.9;
  padding: 12px;
}
.stamp::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px dashed currentColor;
  border-radius: 50%;
  opacity: 0.75;
}
.stamp--green { color: var(--brand); }
.stamp--amber { color: var(--amber); }

/* Perforation / ticket tear */
.perf {
  border: none;
  height: 0;
  border-top: 2px dashed var(--line-strong);
  margin: 0;
}
.perf--coral { border-top-color: var(--accent); }

/* Ruled paper background */
.ruled {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(21, 33, 27, 0.07) 31px,
    rgba(21, 33, 27, 0.07) 32px
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Masking-tape strip */
.tape {
  position: absolute;
  width: 118px;
  height: 30px;
  background: rgba(217, 154, 43, 0.72);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transform: rotate(-4deg);
}

/* Square checklist tick */
.check { list-style: none; }
.check li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
}
.check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--brand);
  border-radius: 3px;
  background: var(--bg);
}
.check li.is-done::before {
  background: var(--brand);
  background-image: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%),
                    linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  background-size: 11px 11px;
  background-position: 1px 1px;
  background-repeat: no-repeat;
}

/* ---------- Masthead ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.52rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand .logo-mark svg { width: 25px; height: 25px; }
.brand em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: inline-block;
  padding: 8px 13px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--r-sm);
}
.nav a:hover { background: var(--brand-soft); text-decoration: none; color: var(--brand); }
.nav a.active {
  color: var(--brand);
  border-bottom: 3px solid var(--accent);
  border-radius: 0;
  font-weight: 700;
}
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
}

/* ---------- Hero (asymmetric field-note) ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  background:
    linear-gradient(90deg, rgba(43, 78, 61, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(43, 78, 61, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  border-bottom: 3px solid var(--ink);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 10px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.eyebrow--plain { color: var(--brand); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.6vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 22px;
  text-wrap: balance;
  color: var(--ink);
}
.hero h1 .hero-accent {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 .hero-accent::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 0.34em;
  background: var(--amber-soft);
  z-index: -1;
  transform: rotate(-1deg);
}
.hero p.lead {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 30px;
  line-height: 1.66;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 5px 5px 0 rgba(21, 33, 27, 0.14); }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.hero-media {
  position: relative;
}
.hero-media .photo {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.1;
  box-shadow: 10px 10px 0 rgba(43, 78, 61, 0.14);
}
.hero-media .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .tape.t1 { top: -14px; left: 24px; }
.hero-media .tape.t2 { bottom: 22px; right: -10px; transform: rotate(5deg); width: 90px; background: rgba(46, 93, 70, 0.55); }
.hero-media .stamp {
  position: absolute;
  top: -22px;
  right: -14px;
  width: 108px;
  height: 108px;
  font-size: 0.62rem;
  background: rgba(255,255,255,0.55);
}
.hero-media .float-badge {
  position: absolute;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 7px 13px;
  border-radius: var(--r-sm);
}
.hero-media .float-badge.b1 { bottom: -13px; left: 20px; }
.hero-media .float-badge.b2 { top: -12px; left: -8px; background: var(--accent); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 3px solid var(--ink);
  flex-wrap: wrap;
}
.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-stat span {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0;
  color: var(--muted);
}

/* ---------- Section scaffolding ---------- */
.section { padding: 64px 0; }
.section--surface { background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.section--green { background: var(--brand-700); color: #DCEAE2; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
}
.section--green .section-head h2 { color: #fff; }
.section-head p { color: var(--muted); max-width: 48em; }
.section--green .section-head p { color: #AEC9BA; }
.section-head .more {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
}
.section-head .more:hover { text-decoration: none; background: var(--brand); color: #fff; }
.section--green .section-head .more { color: #fff; border-color: #fff; }
.section--green .section-head .more:hover { background: #fff; color: var(--brand-700); }

/* ---------- Quick facts: warm paw-tag cards ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.fact {
  position: relative;
  background: #FFFDF8;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fact:hover { transform: translate(-3px, -3px) rotate(-0.6deg); box-shadow: var(--shadow); }
.fact:nth-child(2) { background: var(--amber-soft); }
.fact:nth-child(3) { background: var(--accent-soft); }
.fact:nth-child(4) { background: var(--brand-soft); }
.fact-paw { display: block; width: 34px; height: 34px; margin-bottom: 14px; }
.fact-paw svg { width: 100%; height: 100%; display: block; }
.fact-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.fact-label {
  display: block;
  margin-top: 9px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.32;
  color: var(--text);
}
.fact-note {
  margin: 12px 0 14px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--muted);
}
.fact-src {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
.fact-src:hover { color: var(--accent-600); }

/* ---------- Scoreboard: ticket stubs ---------- */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.score-card {
  position: relative;
  display: block;
  background: var(--bg);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.score-card:hover { text-decoration: none; transform: translate(-3px, -3px); box-shadow: 8px 8px 0 rgba(21, 33, 27, 0.16); }
.score-media {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.score-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.score-card:hover .score-media img { transform: scale(1.05); }
.score-body { padding: 22px 24px 24px; }
.score-card:first-child { border-color: var(--brand); }
.score-card:first-child::after {
  content: "TOP PICK";
  position: absolute;
  top: -13px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
}
.score-card .rank {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 1.5px rgba(21, 33, 27, 0.6);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.score-card:first-child .rank { -webkit-text-stroke: 1.5px var(--brand); }
.score-card .pick-flag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.pick-flag--alt { color: var(--accent-600); background: var(--accent-soft); }
.pick-flag--value { color: var(--amber); background: var(--amber-soft); }
.score-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; color: var(--ink); }
.score-card .model { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.score-badge {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.score-badge--neutral { background: var(--accent); }
.score-card .price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.score-card .best-for {
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 2px dashed var(--line-strong);
  padding-top: 14px;
  margin-top: 4px;
}

/* ---------- Article cards: index-card w/ featured lead ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); text-decoration: none; }
.card:first-child { grid-column: span 2; }
.card:first-child .card-media { aspect-ratio: 16 / 8; }
.card:first-child h3 { font-size: 1.55rem; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 3px;
  padding: 3px 8px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.card-tag--new { color: #fff; background: var(--accent); }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.card:hover h3 { color: var(--brand); }
.card p { font-size: 0.93rem; color: var(--muted); margin-bottom: 16px; }
.card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.card-meta .dot { width: 4px; height: 4px; background: var(--accent); }

/* ---------- Article layout ---------- */
.article-hero {
  padding: 54px 0 34px;
  border-bottom: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(43, 78, 61, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(43, 78, 61, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 30px 30px;
}
.breadcrumb { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 16px;
  text-wrap: balance;
  color: var(--ink);
}
.article-hero .dek { font-size: 1.15rem; color: var(--muted); max-width: 50em; margin-bottom: 22px; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 0.84rem; color: var(--muted); flex-wrap: wrap; }
.byline .avatar {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--brand);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em;
  border: 2px solid var(--ink);
}
.byline b { color: var(--text); }

.article-body {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 52px;
  padding: 44px 0 72px;
}
.prose { max-width: 740px; min-width: 0; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 38px 0 14px;
  color: var(--ink);
  padding-left: 14px;
  border-left: 5px solid var(--accent);
}
.prose h3 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; margin: 30px 0 10px; color: var(--ink); }
.prose p { margin-bottom: 18px; color: var(--text); max-width: 68ch; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: var(--text); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; }
.prose img { border: 2px solid var(--ink); border-radius: var(--r); margin: 24px 0; }
.prose blockquote {
  border-left: 5px solid var(--brand);
  background: var(--brand-soft);
  padding: 16px 20px;
  border-radius: 0 var(--r) var(--r) 0;
  margin: 22px 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}
.callout {
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 0.97rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.callout--warn { background: var(--amber-soft); }
.callout--tip { background: var(--brand-soft); }
.callout--vet { background: var(--red-soft); }
.callout b.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--brand);
  margin-bottom: 6px;
  font-weight: 700;
}
.callout--vet b.label { color: var(--red); }
.callout--warn b.label { color: var(--amber); }

/* ---------- Sidebar (TOC) ---------- */
.toc {
  position: sticky;
  top: 118px;
  align-self: start;
  font-size: 0.87rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.toc .toc-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--brand);
  margin-bottom: 12px;
  font-weight: 700;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { margin-bottom: 8px; counter-increment: toc; }
.toc a { color: var(--muted); display: block; padding: 3px 0; }
.toc a:hover { color: var(--brand); text-decoration: none; }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-right: 8px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 2px solid var(--ink);
  border-radius: var(--r);
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  text-align: left;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  padding: 13px 15px;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
tbody td, tbody th {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--paper); }
tbody th[scope="row"] { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tool-name { font-weight: 700; color: var(--ink); }
.price { font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.verdict-good { color: var(--brand); font-weight: 700; }
.verdict-bad { color: var(--red); font-weight: 700; }

/* ---------- Rating badge ---------- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.rating .score {
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-sm);
  padding: 3px 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

/* ---------- Sources ---------- */
.sources { margin-top: 44px; padding-top: 26px; border-top: 3px solid var(--ink); }
.sources h2 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 12px; color: var(--ink); }
.sources ol { padding-left: 20px; font-size: 0.84rem; color: var(--muted); }
.sources li { margin-bottom: 7px; overflow-wrap: anywhere; }
.sources li a { color: var(--brand); }

/* ---------- Vet's standing orders: prescription pad ---------- */
.rxpad {
  max-width: 740px;
  margin: 0 auto;
  background: var(--bg);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 10px 10px 0 rgba(43, 78, 61, 0.14);
  overflow: hidden;
}
.rxpad-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 2px dashed var(--line-strong);
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 30px, rgba(21, 33, 27, 0.05) 30px, rgba(21, 33, 27, 0.05) 31px),
    var(--paper);
}
.rx {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.rx-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.rx-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-top: 3px;
}
.rx-list { list-style: none; padding: 8px 26px 4px; }
.rx-list li {
  position: relative;
  padding: 15px 0 15px 40px;
  border-bottom: 2px dashed var(--line);
}
.rx-list li:last-child { border-bottom: none; }
.rx-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--brand);
  border-radius: 4px;
  background: var(--bg);
}
.rx-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  width: 10px;
  height: 5px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.rx-list li:hover::after { opacity: 1; }
.rx-list a { font-weight: 700; font-size: 1.04rem; color: var(--text); }
.rx-list a:hover { color: var(--brand); }
.rx-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 26px 24px;
  border-top: 2px solid var(--ink);
  background: var(--brand-700);
}
.rx-sig {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #F2B7A6;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}
.rx-refill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: #A9C5B6;
}

/* ---------- Disclaimer banner ---------- */
.disclaimer-banner {
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--text);
  margin: 8px 0 24px;
  box-shadow: var(--shadow-sm);
}
.disclaimer-banner b.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--accent-600);
  margin-bottom: 6px;
  font-weight: 700;
}
.disclaimer-banner p:last-child { margin-bottom: 0; }

/* ---------- Article list / roadmap: clipboard checklist ---------- */
.roadmap-list { display: flex; flex-direction: column; gap: 12px; }
.roadmap-item {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 16px 20px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.roadmap-item:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); border-color: var(--brand); }
.roadmap-item .idx {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
  font-size: 1.25rem;
  width: 34px;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 1px var(--accent-600);
}
.roadmap-item .title { flex: 1; font-weight: 700; color: var(--text); }
.roadmap-item .title a { color: var(--text); }
.roadmap-item .title a:hover { color: var(--brand); }
.status-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.status-published { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.status-draft { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.status-planned { background: var(--paper); color: var(--muted); border-color: var(--line-strong); }

/* ---------- Methodology: numbered protocol ---------- */
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.method {
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 26px 22px 22px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.method::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--accent);
}
.method:nth-child(2)::before { background: var(--amber); }
.method:nth-child(3)::before { background: var(--brand); }
.method:nth-child(4)::before { background: var(--accent-600); }
.method h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; color: var(--ink); }
.method p { font-size: 0.88rem; color: var(--muted); }

/* ---------- Category cards: photo + quick links ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.cat-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.cat-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.cat-card:hover .cat-media img { transform: scale(1.05); }
.cat-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.cat-body h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; }
.cat-body h3 a { color: var(--ink); }
.cat-body h3 a:hover { color: var(--brand); text-decoration: none; }
.cat-card:hover .cat-body h3 a { color: var(--brand); }
.cat-links { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cat-links a {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
}
.cat-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.cat-links a:nth-child(2)::before { background: var(--amber); }
.cat-links a:nth-child(3)::before { background: var(--brand); }
.cat-links a:hover { color: var(--brand); }
.cat-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand);
}
.cat-more:hover { color: var(--accent-600); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-700);
  color: #CBE0D4;
  padding: 60px 0 30px;
  border-top: 6px solid var(--accent);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand .logo-mark { background: #fff; color: var(--brand); border: none; }
.site-footer .brand em { color: #F3B8A8; }
.site-footer .brand .logo-mark svg g { fill: var(--brand); }
.site-footer p { font-size: 0.9rem; color: #A9C5B6; max-width: 34em; }
.site-footer h4 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #A9C5B6; font-size: 0.9rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 2px dashed rgba(255, 255, 255, 0.2);
  margin-top: 40px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8FB3A2;
}
.footer-contact { margin-top: 18px; font-size: 0.88rem; line-height: 1.6; }
.footer-contact a { color: #BFE3D3; }
.footer-contact a:hover { color: #fff; }
.footer-contact-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; }
.footer-contact-row:last-child { margin-bottom: 0; }
.footer-contact-row .ico { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 3px; color: #F3B8A8; }
.footer-contact address { font-style: normal; color: #A9C5B6; margin: 0; }
.footer-contact-row:first-child { color: #fff; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card:first-child { grid-column: span 2; grid-row: span 1; }
  .article-body { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .scoreboard { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px; left: 0; right: 0;
    background: #fff;
    border-bottom: 3px solid var(--ink);
    padding: 12px 24px 18px;
    align-items: stretch;
    box-shadow: var(--shadow);
  }
  .nav.open a { padding: 12px 8px; border-bottom: none; border-radius: var(--r-sm); }
  .nav-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .card:first-child { grid-column: span 1; }
  .fact-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 44px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .rxpad-head { padding: 20px 20px 18px; }
  .rx-list { padding-left: 20px; padding-right: 20px; }
  .rx-foot { padding-left: 20px; padding-right: 20px; }
  .hero-media .stamp { width: 86px; height: 86px; font-size: 0.54rem; }
}
