/* PetCostWise — US pet-health cost guides and calculators */
:root {
  --bg: #f4efe6;
  --bg-tint: #eef4ef;
  --paper: #fffdf8;
  --ink: #17251f;
  --ink-soft: #2c3f37;
  --muted: #5b6b64;
  --line: #ddd4c6;
  --line-strong: #c9bead;
  --brand: #165c44;
  --brand-dark: #0c3a2b;
  --brand-mid: #1e7a59;
  --brand-soft: #e6f3ed;
  --accent: #c34e16;
  --accent-dark: #9a3b10;
  --accent-soft: #f8ece4;
  --gold: #c9a227;
  --warn-bg: #fbf3e6;
  --ok: #165c44;
  --shadow: 0 12px 40px rgba(23, 37, 31, 0.08);
  --shadow-sm: 0 2px 10px rgba(23, 37, 31, 0.06);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1120px;
  --prose: 42rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "Source Code Pro", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-top: 1.8em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; font-weight: 600; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin: 0.25em 0; }
figure { margin: 1.4em 0; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5em; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.logo svg { width: 38px; height: 38px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--serif);
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.logo-tag {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}
.nav a, .nav-drop > button {
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.nav a:hover, .nav-drop > button:hover,
.nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.nav-drop { position: relative; }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 16.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.45rem;
  z-index: 20;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--brand);
  color: #fff !important;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.98rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset;
}
.btn:hover { background: var(--brand-dark); color: #fff !important; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  color: var(--brand-dark) !important;
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--brand-soft); }
.btn-lg { padding: 0.85rem 1.3rem; font-size: 1.05rem; }
.nav-cta { margin-left: 0.4rem; }
.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem 1rem;
    gap: 0.15rem;
    margin: 0;
  }
  body.nav-open .nav { display: flex; }
  .nav-drop-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 0.6rem; display: block; }
  .nav-cta { margin: 0.5rem 0 0; }
  .nav .btn { width: 100%; }
}

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem; }
.prose { max-width: var(--prose); }
.hero {
  padding: 3.2rem 0 2.4rem;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(22, 92, 68, 0.1), transparent 60%),
    radial-gradient(800px 300px at 90% 0%, rgba(195, 78, 22, 0.08), transparent 55%),
    var(--bg);
}
.hero h1 { margin-bottom: 0.5em; }
.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 40rem;
  margin-bottom: 1.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.7rem;
}
.crumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--brand); }
.meta-line { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

/* Cards */
.grid {
  display: grid;
  gap: 1.1rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
}
a.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .more {
  font-weight: 700;
  color: var(--brand);
  margin-top: 0.8rem;
  display: inline-block;
}
.icon-pill {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.5em; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--brand-soft); font-weight: 650; color: var(--brand-dark); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sources, .note, .callout, .disclaimer-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin: 1.3em 0;
}
.callout { border-left: 4px solid var(--brand); }
.callout.warn { border-left-color: var(--accent); background: var(--accent-soft); }
.callout.info { background: var(--brand-soft); }
.disclaimer-box { font-size: 0.92rem; color: var(--ink-soft); background: var(--warn-bg); }
.sources { font-size: 0.92rem; }
.sources ol { margin-bottom: 0; }
.aff-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  margin-left: 0.25rem;
  vertical-align: 0.08em;
}

/* Calculator UI */
.calc-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem;
  align-items: start;
  margin: 1.2rem 0 2rem;
}
@media (max-width: 900px) {
  .calc-shell { grid-template-columns: 1fr; }
}
.calc-panel, .result-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.result-panel { position: sticky; top: 5.2rem; }
@media (max-width: 900px) {
  .result-panel { position: static; }
}
label, .label {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin: 0.85rem 0 0.3rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
input[type="text"], input[type="number"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand-mid);
  outline-offset: 1px;
  border-color: var(--brand);
}
.help { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0; }
.proc-list { max-height: 28rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 0.5rem; }
.proc-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.proc-item:last-child { border-bottom: 0; }
.proc-item label { margin: 0; font-weight: 600; }
.proc-meta { font-size: 0.85rem; color: var(--muted); }
.big-number {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.result-row:last-of-type { border-bottom: 0; }
.result-row .k { color: var(--muted); }
.verdict {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--brand-soft);
  font-weight: 600;
}
.verdict.lean-no { background: var(--accent-soft); }

/* Article extras */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.3rem 0 1.6rem;
}
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 650;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}
.stat span { color: var(--muted); font-size: 0.9rem; }
.cta-band {
  background: var(--brand-dark);
  color: #f4efe6;
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin: 2rem 0;
}
.cta-band h2, .cta-band h3 { color: #fff; margin-top: 0; }
.cta-band p { color: #d7e4de; }
.cta-band .btn { background: #fff; color: var(--brand-dark) !important; }
.cta-band .btn:hover { background: var(--brand-soft); }
.section { padding: 2.4rem 0; }
.section.alt { background: var(--bg-tint); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; }

footer.site-footer {
  background: var(--brand-dark);
  color: #d5e0db;
  padding: 2.6rem 0 1.4rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer a { color: #f4efe6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.3rem 0; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.8rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #b7c6c0;
}
.footer-brand { font-family: var(--serif); color: #fff; font-size: 1.25rem; margin-bottom: 0.4rem; }

.page { padding: 2.2rem 0 3rem; }
.page-hero { padding-bottom: 0.2rem; }

.related { margin-top: 2.5rem; }

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin: 0.55rem 0;
}
.faq summary { font-weight: 650; cursor: pointer; }
.faq details p { margin: 0.6rem 0 0.2rem; }

.toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin: 1.2rem 0 1.6rem;
}
.toc strong { display: block; margin-bottom: 0.4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.site-disclaimer {
  background: #f3d7a4;
  color: #1a140c;
  border-top: 4px solid #9a3b10;
  padding: 1.2rem 0;
  margin-top: 3rem;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.5;
}
.site-disclaimer p { margin: 0; max-width: none; }
.site-disclaimer a {
  color: #7c2d12;
  font-weight: 700;
  text-decoration: underline;
}
.site-disclaimer a:hover { color: #9a3b10; }
.page-advice-notice {
  font-size: 1.02rem;
  font-weight: 550;
  margin: 0 0 1.6rem;
  border-left-width: 5px;
}
.page-advice-notice p { margin: 0; }
.disclaimer-box {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--warn-bg);
  border: 1px solid #e2c48a;
}
.guide-disclaimer { margin: 1.4rem 0 1.6rem; }

