/* Pets With What — one stylesheet.
   Family standards: Playfair Display / DM Sans / DM Mono, cream ground, one
   accent injected per page as --accent. No dark-mode toggle, per family rule.

   The chrome block (.masthead / .site-header / .breadcrumbs / .site-footer) is
   the family shell and matches Exercise With What class-for-class, so a change
   made there ports across by copy. Everything below "Encyclopedia" is this
   site's own, carried over from the pre-build single-page version. */

:root {
  --cream: #f5f0e8;
  --warm-white: #faf7f2;
  --card-bg: #ffffff;
  --ink: #1a1612;
  --brown: #3d2b1f;
  --muted: #8a7968;
  --border: #d9cfc0;
  --accent: #6B7F3A;
  --good: #4a7c59;
  --warn: #a8552f;
  --measure: 40rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

main { max-width: 900px; margin: 0 auto; padding: 0 24px 80px; }

/* ── Chrome ────────────────────────────────────────────────────────────── */

.masthead {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
}
.masthead a { color: var(--cream); text-decoration: none; }
.masthead a:hover { text-decoration: underline; }
.masthead em { font-style: italic; }

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown);
  text-decoration: none;
}
.wordmark em { color: var(--accent); font-style: italic; }
.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

.breadcrumbs {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 26px 0 0;
}
.breadcrumbs a { color: var(--muted); }
.crumb-sep { margin: 0 0.5rem; opacity: 0.5; }

.site-footer {
  border-top: 1px solid var(--border);
  margin: 3rem auto 0;
  padding: 2rem 1.25rem 3rem;
  max-width: 900px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-line { font-family: "Playfair Display", Georgia, serif; font-size: 1.05rem; color: var(--ink); }
.footer-note { max-width: var(--measure); }
.footer-links a { color: var(--muted); }

/* ── Encyclopedia ──────────────────────────────────────────────────────── */

.page-head { padding: 22px 0 34px; display: flex; gap: 48px; align-items: flex-end; flex-wrap: wrap; }
.page-head-main { flex: 1 1 320px; }
.eyebrow {
  font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
h1 {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05;
  color: var(--brown); margin: 0;
}
h1 em { color: var(--accent); font-style: italic; }
.binomial { font-family: "Playfair Display", Georgia, serif; font-style: italic;
            font-size: 17px; color: var(--muted); margin-top: 6px; }
.page-head-sub { flex: 0 1 300px; font-size: 13.5px; line-height: 1.6;
                 color: var(--muted); text-wrap: pretty; }

.lead { font-size: 16px; line-height: 1.7; max-width: var(--measure);
        text-wrap: pretty; margin-bottom: 32px; }

.card { background: var(--card-bg); border: 1px solid var(--border);
        border-radius: 12px; padding: 24px; margin-bottom: 32px; }
.card-label {
  font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.section-label {
  font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 1.65px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.section-note { font-size: 13px; line-height: 1.55; color: var(--muted);
                margin-bottom: 16px; max-width: var(--measure); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-family: "DM Mono", monospace; font-size: 9.5px;
              letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: "Playfair Display", Georgia, serif; font-size: 20px;
              font-weight: 700; color: var(--brown); margin: 0; }
.card-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid #efe8dc;
             font-size: 12px; line-height: 1.55; color: var(--muted); }

.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
             gap: 14px; margin-bottom: 34px; }
.type-card { background: var(--card-bg); border: 1px solid var(--border);
             border-radius: 12px; padding: 20px; display: block;
             text-decoration: none; color: inherit; }
.type-card:hover { border-color: var(--accent); box-shadow: rgba(107,127,58,.12) 0 0 0 3px; }
.type-card.is-not-a-breed { background: var(--warm-white); border-style: dashed; }
.type-name { font-family: "Playfair Display", Georgia, serif; font-size: 18px;
             font-weight: 700; color: var(--brown); margin-bottom: 5px; }
.type-line { font-size: 13px; line-height: 1.55; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chip { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .8px;
        text-transform: uppercase; color: var(--muted);
        border: 1px solid var(--border); border-radius: 20px; padding: 4px 9px; }

.variety-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 12px; margin-bottom: 34px; list-style: none; padding: 0; }
.variety { background: var(--card-bg); border: 1px solid var(--border);
           border-radius: 12px; padding: 14px; display: flex;
           flex-direction: column; gap: 10px; }
.swatch { height: 44px; border-radius: 8px; }
.variety-name { font-family: "Playfair Display", Georgia, serif; font-size: 15px;
                font-weight: 700; color: var(--brown); }
.variety.text-only { justify-content: center; min-height: 64px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
         gap: 14px; margin-bottom: 26px; }
.split .card { margin-bottom: 0; padding: 22px; }
.list { display: flex; flex-direction: column; gap: 10px;
        font-size: 13.5px; line-height: 1.55; list-style: none; padding: 0; margin: 0; }
.label-good { color: var(--good); }
.label-warn { color: var(--warn); }

.panel { background: var(--warm-white); border: 1px solid var(--border);
         border-radius: 12px; padding: 24px 28px; margin-bottom: 26px; }
.panel .list { font-size: 14px; line-height: 1.6; gap: 12px; }

.notice { font-size: 11.5px; line-height: 1.55; color: var(--muted);
          border-top: 1px solid var(--border); padding-top: 16px; max-width: var(--measure); }

.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
              gap: 14px; margin: 30px 0 34px; }
.group-card { background: var(--card-bg); border: 1px solid var(--border);
              border-radius: 12px; padding: 22px; display: block;
              text-decoration: none; color: inherit; }
.group-card:hover { border-color: var(--accent); box-shadow: rgba(107,127,58,.12) 0 0 0 3px; }
.group-card h2 { font-family: "Playfair Display", Georgia, serif; font-size: 20px;
                 font-weight: 700; color: var(--brown); margin: 0 0 6px; }
.group-card p { font-size: 13px; line-height: 1.55; color: var(--ink); margin: 0 0 12px; }
.count { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 1.1px;
         text-transform: uppercase; color: var(--muted); }

.hero { padding: 2.4rem 0 0.5rem; }
.hero h1 { max-width: 16ch; }
.lede { font-size: 1.05rem; line-height: 1.7; max-width: var(--measure);
        color: var(--ink); text-wrap: pretty; }

@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-grid, .split, .group-grid { grid-template-columns: 1fr; }
  .variety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { gap: 20px; }
  .site-header { padding-bottom: 0.7rem; }
}

/* ── Citations ─────────────────────────────────────────────────────────────
   Health claims are cited or they are not made. The superscript is a link to
   the page's own source list; an unresolved id fails the build rather than
   rendering, so a number here always resolves to a real entry below. */

.cite { font-size: 0.7em; line-height: 0; vertical-align: super; }
.cite a {
  text-decoration: none; font-family: "DM Mono", monospace;
  padding: 0 1px; color: var(--accent);
}
.cite a:hover { text-decoration: underline; }

.sources { margin: 34px 0 26px; max-width: var(--measure); }
.sources h2 {
  font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 1.65px;
  text-transform: uppercase; color: var(--accent); font-weight: 400;
  margin: 0 0 14px; border-top: 1px solid var(--border); padding-top: 18px;
}
.source-list { margin: 0; padding-left: 1.4em; font-size: 13px; line-height: 1.55; }
.source-list li { margin-bottom: 14px; }
.source-list li:target { background: var(--warm-white); border-radius: 6px; }
.src-cite { display: block; color: var(--ink); }
.src-where { display: block; color: var(--muted); }
.src-ids { display: block; font-family: "DM Mono", monospace; font-size: 11.5px; }
.src-ids a { margin-right: 10px; }
.src-note {
  display: block; color: var(--muted); font-size: 12.5px;
  margin-top: 5px; padding-left: 10px; border-left: 2px solid var(--border);
}
.source-note { font-size: 12px; line-height: 1.55; color: var(--muted); margin-top: 18px; }

/* Jurisdiction chip. The site is read everywhere, so a national breed scheme
   must never read as though it were universal — "the Kennel Club recommends"
   means nothing in Adelaide unless you are told it is the UK's. Biology gets
   "International" and is deliberately quieter, because it needs no caveat. */
.src-juris {
  display: inline-block; font-family: "DM Mono", monospace;
  font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--warn); border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 8px; margin-left: 4px; white-space: nowrap;
}
.src-juris.is-intl { color: var(--muted); }

/* ── Breed chart ───────────────────────────────────────────────────────────
   The poster-style grid on each group hub. Markup, not a generated image, so
   it stays readable by crawlers and screen readers and cannot drift from the
   records. The portrait slot is ready for per-breed art; until a record has
   one it shows a monogram, which asserts nothing about what the animal looks
   like. */

.type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.type-card { padding: 0 0 16px; overflow: hidden; }

.type-portrait {
  display: block; width: 100%; height: 150px; object-fit: cover;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
  background: var(--warm-white);
}
.type-portrait.is-placeholder {
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--warm-white), #eee7d9);
}
.type-portrait.is-placeholder span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 46px; font-weight: 700; color: var(--accent); opacity: .28;
}
.type-card .type-name,
.type-card .chips,
.type-card .type-line { padding: 0 18px; }
.type-card .type-name { font-size: 19px; margin-bottom: 8px; }
.type-card .chips { margin-bottom: 10px; }
.type-card .type-line { font-size: 12.5px; color: var(--muted); margin-bottom: 0; }
.type-card.is-not-a-breed .type-portrait { border-bottom-style: dashed; }

@media (max-width: 900px) { .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .type-grid { grid-template-columns: 1fr; } }
