/* BCGA house style – see docs/STYLE.md
   Modern layout (November 2026): system font, rounded cards with a soft
   shadow, sticky header with search, automatic dark mode. */
:root {
  --paper: #f7f6f1;
  --surface: #ffffff;
  --surface-2: #f1f5f3;
  --ink: #1f2e34;
  --muted: #56666c;
  --line: #e1e7e4;
  --line-strong: #b9c6c9;
  --accent: #087e83;
  --accent-dark: #075758;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ef;
  --link: #076b70;
  --tint: #f1f5f3;
  --brand-cream: #fff5e4;
  --warn-ink: #71470e;
  --orange: #f89b1b;
  --severe: #e5533d;
  --ok: #dff1ea;   --ok-ink: #1f6b4c;
  --mid: #fff1cf;  --mid-ink: #7a5600;
  --bad: #fbd9d2;  --bad-ink: #8f2f1d;
  --eye-red: #fde4e0;    --eye-red-ink: #8f2f1d;
  --eye-orange: #fdebd3; --eye-orange-ink: #7a4300;
  --eye-yellow: #fdf7d6; --eye-yellow-ink: #625200;
  --male: #3f6f9a;
  --female: #a24d72;
  --focus: #a65d05;
  --shadow: 0 1px 2px rgba(25,40,45,.05), 0 6px 20px rgba(25,40,45,.06);
  --radius: 14px;
  --logo-filter: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111a1d; --surface: #182327; --surface-2: #1f2d32; --tint: #1f2d32;
    --ink: #e6eeee; --muted: #9db0b3; --line: #2a3a3f; --line-strong: #3d5056;
    --accent: #2fb3b0; --accent-dark: #5fcfca; --accent-ink: #062224; --accent-soft: #163b3c; --link: #5fcfca;
    --brand-cream: #3a3017; --warn-ink: #f3cf7c;
    --ok: #173a2e; --ok-ink: #8fdcb9; --mid: #3a3017; --mid-ink: #f3cf7c; --bad: #45231c; --bad-ink: #f5a594;
    --eye-red: #3f2420; --eye-red-ink: #f5a594; --eye-orange: #3d2c17; --eye-orange-ink: #f4c58a;
    --eye-yellow: #35321a; --eye-yellow-ink: #ece08f;
    --male: #8db8e0; --female: #e49bbd; --focus: #f3a64a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --logo-filter: invert(1) hue-rotate(180deg) brightness(1.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; }
h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 750; letter-spacing: -0.025em; margin: 6px 0 12px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 14px; }
h3 { font-size: 16px; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 80; }
.logo { filter: var(--logo-filter); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ header */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--accent) 0 70%, var(--orange) 70% 100%); }
.nav { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 52px; height: 32px; object-fit: contain; }
.brand strong { display: block; color: var(--accent); font-size: 19px; letter-spacing: -.03em; line-height: 1; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.siteNav { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.navlinks { display: flex; align-items: center; gap: 2px; }
.navlinks a, .navlinks summary {
  display: flex; align-items: center; min-height: 40px; padding: 8px 12px;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 999px; white-space: nowrap; cursor: pointer;
}
.navlinks a:hover, .navlinks summary:hover { background: var(--surface-2); color: var(--ink); }
.navlinks a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.navlinks details { position: relative; }
.navlinks summary { list-style: none; gap: 6px; }
.navlinks summary::-webkit-details-marker { display: none; }
.navlinks summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.navlinks details[open] summary { background: var(--surface-2); }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.dropdown a { border-radius: 8px; white-space: normal; }
.hsearch { position: relative; flex: 1; max-width: 320px; margin-left: auto; }
.hsearch input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); padding: 0 14px 0 38px; font: inherit; font-size: 14px; }
.hsearch svg { position: absolute; left: 13px; top: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.navcta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.navcta:hover { border-color: var(--accent); color: var(--accent); }
.langswitch { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.langswitch span, .langswitch button { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 700; border: 0; background: none; color: var(--muted); cursor: pointer; }
.langswitch span { background: var(--ink); color: var(--paper); cursor: default; }
.langswitch button:hover { color: var(--ink); }
.menuToggle { display: none; min-height: 42px; padding: 0 16px; margin-left: auto; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

/* ------------------------------------------------------------ layout */
main { padding: 26px 0 56px; }
main.flush { padding-top: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-transform: uppercase;
  letter-spacing: .08em; font-size: 12.5px; font-weight: 650; margin: 0; }
.kicker::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--orange); }
.lead { font-size: 17px; color: var(--muted); max-width: 720px; }
.rule { width: 56px; height: 3px; background: var(--orange); border: 0; border-radius: 3px; margin: 22px 0 0; }
.section { border-top: 1px solid var(--line); padding: 26px 0; }
.section:first-child { border-top: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid2 { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 20px 22px; border-radius: var(--radius); box-shadow: var(--shadow); }
.card.white { background: var(--surface); }
.notice { background: var(--brand-cream); color: var(--warn-ink); padding: 14px 18px; border-radius: 12px; }
.linkcard { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  padding: 20px 22px; border-radius: var(--radius); box-shadow: var(--shadow); min-height: 64px; transition: transform .15s, border-color .15s; }
.linkcard:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); }
.linkcard strong { display: block; color: var(--accent); font-size: 16px; margin-bottom: 4px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow); margin-bottom: 22px; }
.panel > h2 { font-size: 19px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel > h2 a { font-size: 13.5px; font-weight: 600; letter-spacing: 0; }

/* ------------------------------------------------------------ figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; margin: 0; padding: 22px 0 8px; }
.figures div { margin: 0; }
.figures dt { color: var(--muted); font-size: 13px; }
.figures dd { margin: 2px 0 0; font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.figures dd a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------ forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.input, select.input {
  width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--accent-ink); }
.searchbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-top: 12px; }
.filters details summary { cursor: pointer; color: var(--link); min-height: 44px; display: flex; align-items: center; }
.formrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.ac-list li { padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--surface-2); }

/* ------------------------------------------------------------ tables */
.tableWrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; min-width: 640px; border-collapse: collapse; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table thead th { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 16px; }

/* ------------------------------------------------------------ pills */
.pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
a.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.ok { background: var(--ok); color: var(--ok-ink); }
.pill.mid { background: var(--mid); color: var(--mid-ink); }
.pill.bad { background: var(--bad); color: var(--bad-ink); }
.sex-M { color: var(--male); }
.sex-F { color: var(--female); }
.coi { font-weight: 600; font-variant-numeric: tabular-nums; }
.coi.low { color: var(--ok-ink); }
.coi.moderate { color: var(--mid-ink); }
.coi.high, .coi.very-high { color: var(--bad-ink); }

/* ------------------------------------------------------------ dog page */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 13.5px; }
.healthResult { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.healthResult header { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.details { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.details span { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 12px; background: var(--surface); color: var(--ink); }
.litter { padding: 12px 0; border-top: 1px solid var(--line); }
.litter:first-child { border-top: 0; padding-top: 0; }
.namelist { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; list-style: none; }

.profile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.profile-top { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; padding: 26px 28px; align-items: center; }
.avatar { width: 92px; height: 92px; border-radius: 22px; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 70px; height: auto; }
.avatar img.photo-img { width: 100%; height: 100%; object-fit: cover; }
.profile h1 { margin: 6px 0 4px; font-size: clamp(26px, 3.2vw, 38px); }
.profile .aka { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2);
  font-size: 13px; color: var(--ink); text-decoration: none; }
.tag.id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.tag.sex-M, .tag.sex-F { font-weight: 650; }
.tag.stud { background: var(--ok); color: var(--ok-ink); font-weight: 650; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.subnav { display: flex; gap: 4px; border-top: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.subnav a { padding: 13px 12px; color: var(--muted); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent;
  white-space: nowrap; text-decoration: none; }
.subnav a:hover { color: var(--ink); border-color: var(--line-strong); }
.subnav .count { background: var(--surface-2); border-radius: 999px; padding: 1px 7px; font-size: 12px; margin-left: 4px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 22px; align-items: start; }
.side dl { margin: 0; display: grid; gap: 12px; }
.side dt { font-size: 12.5px; color: var(--muted); }
.side dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.side dd a { font-weight: 600; }
.meter { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; max-width: 100%; background: var(--accent); border-radius: 8px; }
.fix { background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; }
.fix strong { display: block; margin-bottom: 4px; }
.fix .button { width: 100%; margin-top: 8px; min-height: 40px; font-size: 13.5px; white-space: normal; text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ht { border-radius: 12px; padding: 14px 16px; background: var(--surface-2); color: var(--muted); }
.ht small { display: block; font-size: 12.5px; }
.ht b { display: block; font-size: 22px; font-weight: 750; margin: 2px 0; color: var(--ink); overflow-wrap: anywhere; line-height: 1.2; }
.ht.ok { background: var(--ok); color: var(--ok-ink); } .ht.ok b { color: var(--ok-ink); }
.ht.mid { background: var(--mid); color: var(--mid-ink); } .ht.mid b { color: var(--mid-ink); }
.ht.bad { background: var(--bad); color: var(--bad-ink); } .ht.bad b { color: var(--bad-ink); }
.ht .details span { font-size: 11.5px; }

/* ------------------------------------------------------------ pedigree */
.pedigree { border-collapse: separate; border-spacing: 6px; width: 100%; min-width: 720px; table-layout: fixed; }
.pedigree td { vertical-align: middle; padding: 0; }
.pedigree .cell { display: block; height: 100%; padding: 7px 10px; background: var(--surface-2); border: 0;
  border-left: 3px solid var(--line-strong); border-radius: 10px; font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.pedigree .cell.M { border-left-color: var(--male); }
.pedigree .cell.F { border-left-color: var(--female); }
.pedigree .cell.unknown { color: var(--muted); background: transparent; border: 1px dashed var(--line-strong); }
.pedigree .cell.repeat { background: var(--mid); }
.pedigree .cell a { font-weight: 650; text-decoration: none; color: var(--ink); }
.pedigree .cell a:hover { color: var(--accent); text-decoration: underline; }
.pedigree .cell .meta { display: block; color: var(--muted); font-size: 11.5px; margin: 0; }
.pedigree.g6 .cell { font-size: 11.5px; padding: 3px 6px; }
.panel .tableWrap, .card .tableWrap { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* ------------------------------------------------------------ charts */
.stackbar { display: flex; height: 22px; min-width: 160px; border-radius: 999px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.stackbar span { display: block; min-width: 2px; }
.g-A { background: #2f8f83; } .g-B { background: #8cc7b9; } .g-C { background: #f6c66a; }
.g-D { background: #f08c5a; } .g-E { background: #c8452f; }
.bigcoi { font-size: 34px; font-weight: 700; line-height: 1; }

/* ------------------------------------------------------------ home */
.hero { background:
    radial-gradient(1200px 400px at 85% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(600px 300px at 0% 110%, color-mix(in srgb, var(--orange) 14%, transparent), transparent 70%);
  padding: 56px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); margin: 14px 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; margin: 0 0 26px; }
.bigsearch { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: var(--shadow); max-width: 660px; }
.bigsearch input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; padding: 0 12px; min-width: 0; }
.bigsearch input:focus-visible { outline: 0; }
.bigsearch:focus-within { border-color: var(--accent); }
.bigsearch select { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; padding: 0 10px; }
.bigsearch .button { min-height: 48px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13.5px; align-items: center; }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.heroart { aspect-ratio: 1; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; }
.heroart img { width: 78%; height: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin: 44px 0 0; }
.stats > div { padding: 20px 24px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { color: var(--muted); font-size: 13.5px; }
.stats dd { margin: 0 0 2px; font-size: 30px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; order: -1; }
.stats > div { display: flex; flex-direction: column; }
.stats dd a { color: var(--ink); text-decoration: none; }
.stats dd a:hover { color: var(--accent); }
.block { padding: 52px 0 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.block-head h2 { font-size: 26px; margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; display: flex; flex-direction: column; gap: 10px; }
.feature:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin: 0; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feature .go { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14px; }
.community { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); text-decoration: none; }
.tile:hover { background: var(--accent-soft); color: var(--ink); }
.tile strong { display: block; margin-bottom: 2px; }
.tile span { color: var(--muted); font-size: 13.5px; }
.cta { margin: 52px 0 0; background: var(--ink); color: var(--paper); border-radius: 20px; padding: 30px 36px; display: flex;
  justify-content: space-between; align-items: center; gap: 24px; }
.cta h2 { color: var(--paper); font-size: 23px; margin: 0 0 6px; }
.cta p { margin: 0; opacity: .8; }
.cta .button { background: var(--orange); border-color: var(--orange); color: #2b1a00; }
.cta .button:hover { filter: brightness(1.06); color: #2b1a00; }

/* ------------------------------------------------------------ footer */
.footer { margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); padding: 36px 0; font-size: 13.5px; }
.footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
.footer strong { color: var(--ink); display: block; margin-bottom: 8px; }
.footer .cols a { color: var(--muted); display: block; padding: 2px 0; text-decoration: none; }
.footer .cols a:hover { color: var(--accent); }
.footer .grid { gap: 10px 30px; }

/* ------------------------------------------------------------ content (phase 3) */
.cardimg { display: block; width: calc(100% + 44px); margin: -20px -22px 12px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); }
.cardimg.placeholder { background: var(--surface-2) url("../img/bearded-collie-trot-line-logo.a685e5e9c1e9.png") center / 50% no-repeat; opacity: .8; }
.studcard strong { margin-top: 2px; }
.heroimg { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 0 0 18px; }
.photo { margin: 0 0 14px; }
.photo img { display: block; width: 100%; height: auto; border-radius: 12px; }
.prose { max-width: 760px; font-size: 16px; line-height: 1.7; }
.prose h2 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose table { border-collapse: collapse; margin: 12px 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose blockquote { margin: 14px 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.badge-stud { display: inline-flex; align-items: center; gap: 6px; background: var(--ok); color: var(--ok-ink); padding: 4px 10px;
  border-radius: 999px; font-weight: 600; font-size: 13px; text-decoration: none; }

/* ------------------------------------------------------------ contribution forms (phase 4) */
.submitform { max-width: 720px; }
.fieldrow { margin-bottom: 16px; }
.fieldrow textarea.input { min-height: 120px; resize: vertical; }
.fieldrow.check label { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 14px; }
.fieldrow.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.fieldrow input[type=file] { font: inherit; }
.error { color: var(--bad-ink); font-weight: 600; margin: 4px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.comptable { border-collapse: collapse; }
.comptable th, .comptable td { padding: 3px 12px 3px 0; text-align: left; font-variant-numeric: tabular-nums; }
.comptable th { color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 1180px) {
  .hsearch { display: none; }
  .siteNav .navlinks { margin-left: auto; }
}
@media (max-width: 1000px) {
  .menuToggle { display: inline-flex; align-items: center; }
  .nav { flex-wrap: wrap; }
  .siteNav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 10px; padding: 4px 0 16px; }
  .siteNav.open { display: flex; }
  .siteNav .hsearch { display: block; max-width: none; margin: 0; order: -1; }
  .navlinks { flex-direction: column; align-items: stretch; margin: 0 !important; }
  .navlinks a, .navlinks summary { border-radius: 10px; }
  .navlinks details { position: static; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; background: transparent; }
  .navcta { justify-content: center; }
  .langswitch { align-self: flex-start; }
  .grid2, .hero-grid, .layout { grid-template-columns: minmax(0, 1fr); }
  .heroart { display: none; }
  .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .profile-top { grid-template-columns: auto 1fr; }
  .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .cta { flex-direction: column; align-items: flex-start; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand small { display: none; }
  .searchbar { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .figures dd { font-size: 21px; }
  .hero { padding-top: 32px; }
  .bigsearch { flex-wrap: wrap; }
  .bigsearch input { min-height: 44px; }
  .bigsearch select { display: none; }
  .bigsearch .button { width: 100%; }
  .stats dd { font-size: 24px; }
  .stats > div { padding: 16px 18px; }
  .avatar { width: 64px; height: 64px; border-radius: 16px; }
  .avatar img { width: 48px; }
  .profile-top { padding: 20px; gap: 16px; }
  .panel { padding: 18px; }
  .footer .cols { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ COI and eye findings */
/* COI values are shown neutrally; only a pedigree under 90% complete is marked. */
.coi.uncertain { background: var(--mid); color: var(--mid-ink); border-radius: 6px; padding: 0 6px; }
.bigcoi.coi.uncertain { display: inline-block; padding: 4px 10px; border-radius: 10px; }
/* Eye findings in three light levels (see dogs/eyes.py severity):
   red = not for breeding under the ECVO scheme, orange = relevant, yellow = incidental / note. */
.eye-breeding { --eye-bg: var(--eye-red); --eye-ink: var(--eye-red-ink); }
.eye-relevant { --eye-bg: var(--eye-orange); --eye-ink: var(--eye-orange-ink); }
.eye-minor { --eye-bg: var(--eye-yellow); --eye-ink: var(--eye-yellow-ink); }
.ht.eye-breeding, .ht.eye-relevant, .ht.eye-minor { background: var(--surface-2); color: var(--muted);
  box-shadow: inset 4px 0 0 var(--eye-bg), inset 5px 0 0 color-mix(in srgb, var(--eye-ink) 30%, transparent); }
.ht.eye-breeding b, .ht.eye-relevant b, .ht.eye-minor b { color: var(--eye-ink); font-size: 18px; }
.details span.eye-breeding, .details span.eye-relevant, .details span.eye-minor {
  background: var(--eye-bg); border-color: color-mix(in srgb, var(--eye-ink) 25%, transparent); color: var(--eye-ink); }
.swatch.eye-breeding, .swatch.eye-relevant, .swatch.eye-minor { background: var(--eye-bg); border: 1px solid color-mix(in srgb, var(--eye-ink) 35%, transparent); }
.tierpill { display: inline-block; min-width: 2.2em; text-align: center; padding: 1px 8px; border-radius: 999px;
  background: var(--eye-bg); color: var(--eye-ink); font-variant-numeric: tabular-nums; }
.pill.eye-breeding, .pill.eye-relevant, .pill.eye-minor { background: var(--eye-bg); color: var(--eye-ink); }

/* ------------------------------------------------------------ knowledge base news feed */
.kbfilter { margin: 18px 0 14px; max-width: 760px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); margin-bottom: 12px; }
.segmented a { padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.segmented a:hover { color: var(--ink); }
.segmented a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.block-tight { padding: 26px 0 0; }
.newsgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.newsgrid.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.newstile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.newstile:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.newsimg { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.newsimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.newsimg img.placeholder { object-fit: contain; padding: 14% 22%; opacity: .55; }
.newsimg .badge { position: absolute; left: 12px; top: 12px; background: var(--orange); color: #2b1a00; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; }
.newsbody { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.newsmeta { font-size: 12.5px; color: var(--muted); }
.newstile strong { font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.newssum { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.newstile.big { grid-column: span 2; flex-direction: row; }
.newstile.big .newsimg { aspect-ratio: auto; flex: 0 0 55%; min-height: 260px; }
.newstile.big .newsbody { justify-content: center; padding: 24px 26px; }
.newstile.big strong { font-size: 24px; }
@media (max-width: 1000px) {
  .newsgrid.featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .newsgrid.featured { grid-template-columns: minmax(0, 1fr); }
  .newstile.big { grid-column: auto; flex-direction: column; }
  .newstile.big .newsimg { flex: none; }
  .newstile.big .newsimg { aspect-ratio: 16 / 9; min-height: 0; }
  .newstile.big strong { font-size: 19px; }
}

/* ------------------------------------------------------------ population charts */
.tabs a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.colchart { display: flex; align-items: flex-end; gap: 2px; height: 220px; margin: 14px 0 30px; padding-top: 8px;
  border-bottom: 1px solid var(--line-strong); position: relative; }
.colchart.short { height: 150px; }
.colchart .col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.colchart .col span { display: block; width: 100%; min-height: 1px; background: var(--accent); border-radius: 3px 3px 0 0; }
.colchart .col:hover span { background: var(--accent-dark); }
.colchart .col i { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; font-style: normal;
  font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.colchart .col:hover::after { content: attr(data-tip); position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%);
  background: var(--ink); color: var(--paper); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 5; pointer-events: none; }
.colchart .col:nth-child(-n+6):hover::after { left: 0; transform: translate(0, -100%); }
.colchart .col:nth-last-child(-n+6):hover::after { left: auto; right: 0; transform: translate(0, -100%); }
.colchart.sizes { gap: 8px; max-width: 640px; }
.yeartable summary { cursor: pointer; font-weight: 600; color: var(--link); }
.yeartable .tableWrap { margin-top: 12px; }

/* ------------------------------------------------------------ donation (Ko-fi), in the hero */
/* The Ko-fi widget is shown scaled down (--s). Its first step (amount, name, message, button,
   "Powered by Ko-fi") is about 560px high; --h shows exactly that, so there is no empty space.
   Later steps (monthly, payment) are taller; the frame can scroll then. */
.kofi { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: 14px 14px 10px; max-width: 360px; justify-self: end; width: 100%; }
.kofi h2 { font-size: 15px; margin: 2px 4px 10px; }
.kofi p { margin: 8px 4px 0; font-size: 12px; }
.kofi-frame { --s: .72; --h: 580px; height: calc(var(--h) * var(--s)); overflow: hidden; border-radius: 12px; background: #fff; }
.kofi-frame iframe { display: block; border: 0; width: calc(100% / var(--s)); height: var(--h);
  transform: scale(var(--s)); transform-origin: 0 0; }
@media (max-width: 900px) { .kofi { justify-self: center; max-width: 340px; } .kofi-frame { --s: .74; } }

/* ------------------------------------------------------------ litters: pups as a tidy grid */
.litterhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0 0 10px; font-size: 14px; }
.litterhead strong { font-size: 15px; }
.pups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pups a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.pups a:hover { border-color: var(--accent); background: var(--accent-soft); }
.pups a:hover .nm { color: var(--accent-dark); }
.sexbadge { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-size: 15px; font-weight: 700; line-height: 1; color: var(--muted); background: var(--surface-2); }
.sexbadge.sex-M { color: var(--male); background: color-mix(in srgb, var(--male) 14%, var(--surface)); }
.sexbadge.sex-F { color: var(--female); background: color-mix(in srgb, var(--female) 14%, var(--surface)); }
.pupname { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pupname .nm { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pupname small { color: var(--muted); font-size: 12px; }
.litter .pups { margin-bottom: 4px; }
