/* CoverageForPets — v4 flagship design system. Light, bright, modern, trustworthy.
   Teal + warm sand + soft amber accents, layered shadows, strong type hierarchy.
   Preserves verified behavior: two-row header under 1150px with the language
   toggle pinned top right, hero side padding from .wrap, stacked aligned
   buttons under 720px, 20px mobile content edge. */

:root {
  --bg: #fbfcf9;
  --bg-alt: #edf5f0;
  --bg-tint: #f6f1e3;
  --card: #ffffff;
  --line: #d7e3db;
  --line-soft: #e4ede7;
  --text: #1b2921;
  --muted: #52645a;
  --teal: #0d7a5f;
  --teal-dark: #085c47;
  --teal-deep: #063f31;
  --teal-soft: #e2f1ea;
  --sand: #f3e9d2;
  --amber: #d98a1f;
  --amber-soft: #fdf3df;
  --danger: #b3402a;
  --danger-soft: #fbeae5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 52, 40, 0.06), 0 2px 8px rgba(16, 52, 40, 0.05);
  --shadow-md: 0 2px 6px rgba(16, 52, 40, 0.07), 0 10px 28px rgba(16, 52, 40, 0.09);
  --shadow-lg: 0 4px 10px rgba(16, 52, 40, 0.08), 0 20px 44px rgba(16, 52, 40, 0.13);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  font-size: 17px;
}

a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header (verified layout, do not restructure) ---------- */
.site-header {
  background: rgba(251, 252, 249, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(16, 52, 40, 0.03);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wordmark {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.wordmark .accent { color: var(--teal); }
.main-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14.5px;
}
.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 9px 7px;
  margin: -4px 0;
  border-radius: 6px;
  display: inline-block;
}
.main-nav a:hover { color: var(--teal); }

/* ---------- Language toggle ---------- */
.lang-toggle {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle a { color: var(--teal-dark); text-decoration: none; }
.lang-toggle a:hover { text-decoration: underline; }
.lang-toggle .current { color: var(--text); }

/* ---------- Header two-row layout (narrower widths) ---------- */
@media (max-width: 1150px) {
  .brand { order: 1; }
  .lang-toggle { order: 2; margin-left: auto; }
  .main-nav { order: 3; flex-basis: 100%; margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 24px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--teal-dark); box-shadow: var(--shadow-md); }
.btn.secondary {
  background: #ffffff;
  color: var(--teal-dark);
  border: 2px solid var(--teal);
  margin-left: 8px;
  box-shadow: none;
}
.btn.secondary:hover { background: var(--teal-soft); }

/* ---------- Hero (homepage) ---------- */
.hero-band {
  background: linear-gradient(160deg, var(--teal-soft) 0%, var(--bg) 55%, var(--bg-tint) 130%);
  border-bottom: 1px solid var(--line-soft);
}
.hero {
  padding-top: 46px;
  padding-bottom: 40px;
  text-align: left;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.13;
  margin: 0 0 14px;
  letter-spacing: -0.6px;
}
.hero h1 .accent { color: var(--teal); }
.hero p.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 24px;
}
.hero::after { content: ""; display: block; clear: both; }
.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0 0 22px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 720px) {
  .hero-photo { float: right; width: 46%; margin: 6px 0 18px 28px; }
  .hero h1 { font-size: 47px; }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 26px 0 4px;
}
.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  font-size: 15.5px;
}
.trust-item .tic {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  margin-top: 1px;
}
.trust-item strong { display: block; font-size: 15.5px; }
.trust-item span { color: var(--muted); }
@media (min-width: 720px) {
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Sections & cards ---------- */
section { padding: 30px 0; }
section.alt { background: var(--bg-alt); }
section.tint { background: var(--bg-tint); }
h2 { font-size: 27px; margin: 0 0 14px; letter-spacing: -0.3px; line-height: 1.25; }
h3 { font-size: 19px; margin: 0 0 8px; line-height: 1.35; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.section-lede { color: var(--muted); font-size: 18px; max-width: 700px; margin: 0 0 20px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 16px; }
.card p:last-child { margin-bottom: 0; }
.card a.more { font-weight: 700; text-decoration: none; }
.card a.more:hover { text-decoration: underline; }
@media (min-width: 720px) {
  /* Tablet range: two columns, so cards get real room instead of a stretched phone layout. */
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.two { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Photos ---------- */
.card-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
}
.article-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 6px 0 22px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Breed cards (hub + featured) ---------- */
.breed-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.breed-card .card-photo { border-radius: 0; margin-bottom: 0; height: 200px; }
.breed-card .breed-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.breed-card h3 { margin: 0; font-size: 21px; }
.breed-card .breed-body p { margin: 0; }
.quick-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; padding: 0; list-style: none; }
.quick-facts li {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 13.5px;
  font-weight: 600;
}
.breed-card .top-q { font-size: 15.5px; color: var(--text); }
.breed-card .top-q strong { color: var(--teal-dark); }
.breed-card a.more { margin-top: auto; padding-top: 6px; }

/* ---------- Filter bar (breeds hub) ---------- */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin: 0 0 20px;
}
.filter-bar label { font-weight: 700; display: block; margin-bottom: 8px; font-size: 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-row input[type="search"] {
  flex: 1 1 220px;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.filter-row input[type="search"]:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 42px;
  cursor: pointer;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.filter-count { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.breed-card[hidden] { display: none; }
.no-match {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}
.step h3 { margin-top: 0; }
.step p { color: var(--muted); font-size: 16px; margin-bottom: 0; }
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .related { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Article pages ---------- */
.article { padding: 34px 0 16px; }
.article .wrap { max-width: 780px; }
.article h1 { font-size: 33px; line-height: 1.18; margin: 0 0 12px; letter-spacing: -0.5px; }
.article .lede { font-size: 19px; color: var(--muted); max-width: 700px; margin: 0 0 22px; }
.article h2 { margin-top: 38px; font-size: 26px; }
.article h2:first-of-type { margin-top: 0; }
.article h3 { margin-top: 22px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
@media (min-width: 720px) { .article h1 { font-size: 38px; } }

.breadcrumbs {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 16px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--teal); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 7px; color: var(--line); }

.article-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 14.5px; color: var(--muted);
  margin: 0 0 20px;
}
.article-meta strong { color: var(--text); }

.guide-hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 4px 0 24px;
}

/* Short answer / key takeaways */
.takeaways {
  background: linear-gradient(150deg, var(--teal-soft), #f2f8f4);
  border: 1px solid var(--teal);
  border-left: 6px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0 26px;
}
.takeaways h2, .takeaways h3 { margin-top: 0; font-size: 19px; }
.takeaways ul { margin-bottom: 0; }
.takeaways p:last-child { margin-bottom: 0; }

/* Table of contents: in-flow card on narrow screens, sticky side rail on wide screens */
.toc-rail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 12px;
  margin: 0 0 28px;
}
.toc { background: none; border: none; box-shadow: none; padding: 0; margin: 0; }
.toc h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: 0; padding: 0 6px; }
.toc ol, .toc ul { margin: 0; padding-left: 26px; }
.toc li { margin-bottom: 2px; font-size: 15.5px; }
.toc a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  line-height: 1.35;
  text-decoration: none;
  font-weight: 600;
}
.toc a:hover { background: var(--bg-alt); text-decoration: none; }
.toc a.is-active {
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: inset 3px 0 0 var(--teal);
}

/* Guide layout: sticky TOC rail beside the article on wide screens */
@media (min-width: 1024px) {
  .article .wrap.wrap-guide { max-width: 1180px; }
  .article-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 780px);
    gap: 36px;
    justify-content: start;
    align-items: start;
  }
  .toc-rail {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    margin: 0;
  }
  .article-body { min-width: 0; }
}

/* Data tables (snapshot, comparison, decision) */
.table-scroll { overflow-x: auto; margin: 0 0 22px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 16px;
  min-width: 520px;
}
table.data caption {
  text-align: left;
  font-weight: 700;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
table.data th, table.data td {
  border: 1px solid var(--line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}
table.data thead th { background: var(--teal-deep); color: #fff; font-size: 15px; letter-spacing: 0.2px; }
table.data tbody th { background: var(--bg-alt); font-weight: 700; width: 30%; }
table.data tbody tr:nth-child(even) td { background: #fcfdfa; }
table.snapshot { min-width: 0; }
table.snapshot tbody th { width: 34%; }

/* Condition profiles */
.condition-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin: 0 0 18px;
}
.condition-card h3 { margin-top: 0; font-size: 20px; }
.condition-card h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--teal-dark);
  margin: 16px 0 6px;
}
.condition-card h4:first-of-type { margin-top: 12px; }
.condition-card p, .condition-card ul { font-size: 16.5px; }
.condition-card .clause {
  background: var(--amber-soft);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 16px;
}
.condition-card .clause strong { color: #8a5a10; }
.urgent {
  background: var(--danger-soft);
  border-left: 4px solid var(--danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 16px;
}
.urgent strong { color: var(--danger); }

/* Callouts and legacy boxes */
.note {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
  font-size: 16px;
}
.note p:last-child { margin-bottom: 0; }
.keybox {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.keybox h3 { margin-top: 0; }
.keybox ul { margin-bottom: 0; }
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 16.5px;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* Claim walkthrough */
.walkthrough { counter-reset: wstep; margin: 0 0 20px; padding: 0; list-style: none; }
.walkthrough li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 18px 66px;
  margin-bottom: 12px;
}
.walkthrough li::before {
  counter-increment: wstep;
  content: counter(wstep);
  position: absolute;
  left: 18px; top: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.walkthrough h3 { margin: 0 0 6px; font-size: 18px; }
.walkthrough p { margin: 0; font-size: 16.5px; color: var(--text); }
.walkthrough p + p { margin-top: 8px; }

/* FAQ */
.faq { margin: 0 0 14px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  padding: 15px 18px;
  min-height: 52px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--teal); font-weight: 800; }
.faq details[open ] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; margin: 0; font-size: 16.5px; color: var(--text); }

/* Sources */
.sources {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 30px 0 8px;
  font-size: 15.5px;
}
.sources h2 { font-size: 19px; margin: 0 0 10px; }
.sources ul { margin-bottom: 0; }
.sources li { margin-bottom: 7px; }

/* Related guides */
.related { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.related .card { padding: 18px 20px; }
.related .card h3 { font-size: 18px; }

/* Checklist */
.checklist { list-style: none; padding-left: 0; }
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
}
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.term { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  margin-top: 44px;
  padding: 30px 0 36px;
  font-size: 15px;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 16px;
}
.footer-nav a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--teal); }
.site-footer p { margin: 0 0 10px; max-width: 760px; }
.site-footer .fineprint { font-size: 13px }

/* ---------- Device refinements (all-device pass) ---------- */
/* Anchored sections must not hide under the sticky header. */
.article h2[id], .article h3[id], section[id] { scroll-margin-top: 96px; }
/* Wide screens: give listing pages more room, keep article measure readable. */
@media (min-width: 1200px) {
  .wrap { max-width: 1060px; }
  .article .wrap { max-width: 780px; }
  .hero h1 { font-size: 50px; }
}
/* Tables on small screens: tighter padding, first column stays put while scrolling. */
@media (max-width: 560px) {
  table.data th, table.data td { padding: 9px 10px; }
  table.data tbody th { position: sticky; left: 0; }
}
/* Touch devices: no hover dependence, comfortable tap feedback. */
@media (hover: none) {
  .card:hover { box-shadow: var(--shadow-sm); }
  a, .btn, .chip, summary { -webkit-tap-highlight-color: rgba(13, 122, 95, 0.15); }
}
/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* ---------- Small screens: stacked buttons ---------- */
@media (max-width: 719px) {
  .btn { display: block; width: fit-content; }
  .btn.secondary { margin-left: 0; }
  .btn + .btn { margin-top: 10px; }
  .hero h1 { font-size: 34px; }
  .article h1 { font-size: 30px; }
  table.data { font-size: 15px; }
}
