/* חבר על ארבע - public site
   Palette: kennel-ink navy + tennis-ball lime, on a cool sage-white.
   Type: Fredoka (display, dog names) + IBM Plex Sans Hebrew (text, data). */

:root {
  --ink: #15304A;
  --ink-2: #4A5D70;
  --ink-3: #7B8A99;
  --bg: #F2F5F3;
  --paper: #FFFFFF;
  --sky: #E3EDF4;
  --line: #D5DEE4;
  --ball: #D7EF4A;
  --ball-2: #BFD92E;
  --alert: #C23B2B;
  --alert-bg: #FBE7E3;
  --f-display: "Fredoka", "Rubik", "Arial Hebrew", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Hebrew", "Rubik", "Arial Hebrew", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --r-card: 20px;
  --head-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--f-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--ball-2); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; z-index: 100; background: var(--ball); padding: .6em 1em; border-radius: 8px; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1.1 var(--f-body);
  padding: .82em 1.4em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn .i { width: 1.15em; height: 1.15em; }
.btn:active { transform: translateY(1px); }
.btn-ball { background: var(--ball); color: var(--ink); border-color: var(--ball-2); }
.btn-ball:hover { background: var(--ball-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #0E2436; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { font-size: 1.08rem; padding: 1em 1.8em; }
.btn-block { width: 100%; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--bg); }

.field { display: flex; flex-direction: column; gap: .35rem; }
.field-label { font-weight: 600; font-size: .93rem; }
.optional { font-weight: 400; color: var(--ink-3); }
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: .62em .8em;
  width: 100%;
  min-height: 46px;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(215, 239, 74, .75); }
.field-error { color: var(--alert); font-size: .88rem; font-weight: 500; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--alert); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.input-icon { position: relative; display: block; }
.input-icon .i { position: absolute; inset-inline-start: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-icon input { padding-inline-start: 2.5rem; }

/* tri-state marks: yes / no / unknown */
.mk { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; flex: none; }
.mk .i { width: .85rem; height: .85rem; }
.mk-yes { background: var(--ball); color: var(--ink); }
.mk-no { background: var(--alert-bg); color: var(--alert); }
.mk-unk { background: var(--sky); color: var(--ink-2); }

/* energy measured in tennis balls */
.balls { display: inline-flex; gap: 2px; vertical-align: middle; }
.ball { width: 1.3rem; height: 1.3rem; color: #B4C0CB; }
.ball.on { --ball-fill: var(--ball); color: var(--ink); }

/* ---------- header ---------- */
.demo-bar { margin: 0; max-width: none; background: var(--ink); color: #fff; text-align: center; font-size: .9rem; padding: .45em 1em; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.head-row { display: flex; align-items: center; gap: 1.25rem; min-height: var(--head-h); position: relative; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-tag { width: 42px; height: 42px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.nav-only-mobile { display: none; }
.nav { display: flex; gap: .2rem; margin-inline-start: .75rem; }
.nav a { padding: .5em .9em; border-radius: 999px; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current] { background: var(--sky); }
.head-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; }
.fav-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.fav-link:hover { background: var(--bg); }
.fav-count { position: absolute; top: 3px; inset-inline-end: 0; background: var(--alert); color: #fff; font-size: .7rem; line-height: 1; min-width: 1.45em; height: 1.45em; border-radius: 999px; display: grid; place-items: center; padding: 0 .3em; font-weight: 700; }
.fav-count[hidden] { display: none; }
.head-cta[aria-current] { border-color: var(--ink); }
.nav-toggle { display: none; }

.flashes { padding-top: 1rem; }
.flash { margin: 0 0 .5rem; max-width: none; padding: .85em 1.2em; border-radius: 14px; font-weight: 500; }
.flash-ok { background: #EEF8C6; border: 1px solid var(--ball-2); }
.flash-error { background: var(--alert-bg); border: 1px solid #EDB7AE; color: #85261A; }

/* ---------- home: hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.4rem + 4vw, 4.4rem); line-height: 1.02; margin-bottom: .35em; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 44ch; }
.quick-q { margin-top: 2rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: 24px; padding: 1.35rem; }
.quick-q-title { font-family: var(--f-display); font-size: 1.4rem; font-weight: 600; margin: 0 0 .9rem; }
.quick-q-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.qopt {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  text-align: start; font: inherit; color: inherit; cursor: pointer;
  background: var(--bg); border: 2px solid transparent; border-radius: 16px; padding: 1rem;
  transition: background-color .15s, border-color .15s;
}
.qopt:hover, .qopt:focus-visible { background: var(--ball); border-color: var(--ink); }
.qopt-ic { width: 38px; height: 38px; margin-bottom: .45rem; }
.qopt-label { font-weight: 600; line-height: 1.25; }
.qopt-sub { font-size: .84rem; color: var(--ink-2); line-height: 1.35; }
.quick-q-foot { margin: .95rem 0 0; font-size: .92rem; color: var(--ink-2); max-width: none; }

.hero-board { position: relative; height: 560px; }
.pin {
  --r: 0deg;
  position: absolute; width: 50%;
  display: flex; flex-direction: column; gap: .1rem;
  background: var(--paper); border-radius: 18px; padding: .7rem .7rem 1rem;
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 22px 44px -22px rgba(21, 48, 74, .45);
  transform: rotate(var(--r));
  transition: transform .25s ease;
  animation: pin-in .75s cubic-bezier(.2, .8, .2, 1) backwards;
}
.pin-photo { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--sky); margin-bottom: .55rem; }
.pin-photo img, .pin-photo .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.pin-name { font-family: var(--f-display); font-size: 1.55rem; font-weight: 600; line-height: 1.05; }
.pin-meta { font-size: .9rem; color: var(--ink-2); }
.pin-wait { margin-top: .45rem; align-self: flex-start; background: var(--ball); border-radius: 999px; padding: .2em .75em; font-size: .82rem; font-weight: 600; }
.pin-1 { --r: -3deg; inset-inline-start: 2%; top: 0; z-index: 3; animation-delay: .05s; }
.pin-2 { --r: 4deg; inset-inline-end: 1%; top: 104px; z-index: 2; animation-delay: .17s; }
.pin-3 { --r: -1.5deg; inset-inline-start: 9%; top: 236px; z-index: 1; animation-delay: .29s; }
.pin:hover, .pin:focus-visible { transform: rotate(0) translateY(-6px); z-index: 5; }
@keyframes pin-in {
  from { opacity: 0; transform: translateY(26px) rotate(0deg); }
}

/* ---------- home: sections ---------- */
.sec { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.sec-head h2 { margin-bottom: .2em; }
.sec-head p { color: var(--ink-2); margin: 0; }
.link-more { font-weight: 600; white-space: nowrap; }
.row-scroll {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 1.1rem) / 4);
  gap: 1.1rem; overflow-x: auto; padding-bottom: .8rem;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.row-scroll > * { scroll-snap-align: start; }

.sec-regions { background: var(--paper); border-block: 1px solid var(--line); }
.regions-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.regions-intro p { color: var(--ink-2); }
.join-box { margin-top: 2rem; padding: 1.15rem 1.3rem; border-radius: 16px; background: var(--bg); }
.join-box h3 { margin-bottom: .3rem; }
.join-box p { margin-bottom: .35rem; color: var(--ink-2); }
.join-box a { font-weight: 600; }
.line { list-style: none; margin: 0; padding: 0; position: relative; }
.line::before { content: ""; position: absolute; inset-block: 1.4rem; inset-inline-start: 11px; width: 4px; border-radius: 4px; background: var(--ink); }
.stop a { position: relative; display: grid; grid-template-columns: 26px auto 1fr auto; align-items: center; gap: .9rem; padding: .72rem 0; text-decoration: none; }
.stop-leader { border-bottom: 2px dotted #B7C4CF; transform: translateY(.35em); min-width: 1.5rem; }
.stop a::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--ball); border: 4px solid var(--ink); }
.stop-name { font-family: var(--f-display); font-size: 1.32rem; font-weight: 500; }
.stop-count { color: var(--ink-2); font-size: .93rem; text-align: end; }
.stop a:hover .stop-name { text-decoration: underline; text-decoration-color: var(--ball-2); text-decoration-thickness: 3px; }
.stop.is-empty a::before { background: var(--paper); }
.stop.is-empty .stop-name, .stop.is-empty .stop-count { color: var(--ink-3); }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; padding: 0; margin: 1.6rem 0 0; }
.steps li { counter-increment: step; position: relative; padding-top: 3.7rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; inset-inline-start: 0;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ball); border: 2px solid var(--ink);
  font-family: var(--f-display); font-weight: 600; font-size: 1.3rem;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.33rem; inset-inline-start: 3.3rem; inset-inline-end: -1rem; border-top: 2px dashed #AFBCC7; }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-2); margin: 0; }

.sec-adopted { background: var(--sky); }
.adopted-row { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.adopted-row li { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; }
.adopted-photo { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 5px solid var(--paper); background: var(--paper); margin-bottom: .45rem; }
.adopted-photo img, .adopted-photo .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.adopted-name { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; }
.adopted-when { font-size: .85rem; color: var(--ink-2); }

.faq-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 5vw, 4rem); }
.faq details { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-display); font-size: 1.6rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: .6rem 0 0; color: var(--ink-2); }

/* ---------- dog card (kennel card) ---------- */
.kcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.kcard-photo { position: relative; aspect-ratio: 4 / 3; background: var(--sky); }
.kcard-photo img, .kcard-photo .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.kcard:hover .kcard-name a { text-decoration: underline; text-decoration-color: var(--ball-2); text-decoration-thickness: 3px; }
.ph { display: grid; place-items: center; color: rgba(21, 48, 74, .22); background: var(--sky); }
.ph .i { width: 32%; height: 32%; }
.flag { position: absolute; top: .7rem; inset-inline-start: .7rem; padding: .28em .8em; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.flag-urgent { background: var(--alert); color: #fff; }
.flag-pending { background: var(--ink); color: #fff; }
.flag-home { background: var(--ball); color: var(--ink); }
.fav { position: absolute; top: .6rem; inset-inline-end: .6rem; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.fav:hover { color: var(--alert); }
[data-fav][aria-pressed="true"] { --heart-fill: var(--alert); color: var(--alert); }
.kcard-body { flex: 1; display: flex; flex-direction: column; gap: .55rem; padding: .95rem 1.05rem 1.05rem; }
.kcard-name { margin: 0; font-size: 1.6rem; line-height: 1.05; }
.kcard-name a { text-decoration: none; }
.kcard-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kcard-breed { margin: -.3rem 0 0; color: var(--ink-2); font-size: .95rem; }
.kcard-facts { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr) minmax(0, .95fr); margin: 0; border: 1px solid var(--line); border-radius: 12px; }
.kcard-facts div { padding: .42rem .6rem; border-inline-start: 1px solid var(--line); min-width: 0; }
.kcard-facts div:first-child { border-inline-start: 0; }
.kcard-facts dt { font-size: .74rem; color: var(--ink-3); line-height: 1.3; }
.kcard-facts dd { margin: 0; font-weight: 600; font-size: .92rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard-med { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; }
.kcard-med li { display: flex; align-items: center; gap: .35rem; }
.kcard-where, .kcard-wait { margin: 0; display: flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--ink-2); }
.kcard-where { margin-top: auto; padding-top: .15rem; }
.kcard-wait { color: var(--ink); font-weight: 500; }
.kcard.is-adopted .kcard-photo img { filter: saturate(.55); }

/* ---------- catalog ---------- */
.page-head { padding: 2.4rem 0 1.4rem; }
.page-head h1 { margin-bottom: .25rem; }
.page-sub { color: var(--ink-2); margin: 0; }
.catalog { display: grid; grid-template-columns: 272px 1fr; gap: 2rem; align-items: start; padding-bottom: 2rem; }
.filters {
  position: sticky; top: calc(var(--head-h) + 16px);
  max-height: calc(100vh - var(--head-h) - 32px); overflow: auto;
  display: flex; flex-direction: column; gap: 1.05rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem;
}
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { font-size: 1.3rem; margin: 0; }
.filters-close { display: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .93rem; margin-bottom: .45rem; padding: 0; }
.chips label { display: inline-block; margin: 0 0 .4rem .3rem; position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips input + span { display: inline-block; padding: .38em .85em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-size: .9rem; cursor: pointer; }
.chips label:hover input + span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.checks label { display: flex; align-items: center; gap: .55rem; padding: .22rem 0; cursor: pointer; font-size: .95rem; }
.checks input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: var(--ink); flex: none; }
.filters-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.js .filters-actions .btn-ink { display: none; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.filters-open { display: none; }
.sort { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .93rem; margin-inline-start: auto; }
.sort select { width: auto; min-width: 200px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 1.2rem; }
.pager { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 2rem 0 0; }
.pager a, .pager span { min-width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--ink); }
.pager span { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { text-align: center; padding: 3rem 1.25rem; background: var(--paper); border: 1.5px dashed var(--line); border-radius: 20px; }
.empty p { margin-inline: auto; color: var(--ink-2); }
.empty-ic { width: 54px; height: 54px; color: var(--ink-3); margin-bottom: .5rem; }

/* ---------- dog page ---------- */
.crumbs { display: flex; gap: .5rem; padding: 1.4rem 0 .9rem; font-size: .92rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.dog { display: grid; grid-template-columns: 1.22fr 1fr; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: start; }
.gallery-main { display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sky); cursor: zoom-in; }
.gallery-main img, .gallery-main .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: flex; gap: .6rem; margin-top: .8rem; overflow-x: auto; padding-bottom: .3rem; }
.thumb { flex: 0 0 96px; aspect-ratio: 4 / 3; padding: 0; border-radius: 12px; overflow: hidden; border: 3px solid transparent; background: var(--sky); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-current="true"] { border-color: var(--ink); }
.kennel { position: sticky; top: calc(var(--head-h) + 20px); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.2rem, 3vw, 1.75rem); }
.kennel-name { font-size: clamp(2.6rem, 1.7rem + 2.8vw, 3.8rem); line-height: 1; margin: 0; }
.kennel-sub { color: var(--ink-2); font-size: 1.12rem; margin: .35rem 0 1.15rem; }
.kennel-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kennel-facts div { padding: .62rem .85rem; border-top: 1px solid var(--line); min-width: 0; }
.kennel-facts div:nth-child(-n+2) { border-top: 0; }
.kennel-facts div:nth-child(even) { border-inline-start: 1px solid var(--line); }
.kennel-facts dt { font-size: .8rem; color: var(--ink-3); }
.kennel-facts dd { margin: .1rem 0 0; font-weight: 600; }
.energy { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.kennel-med { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; }
.kennel-med li { display: flex; align-items: center; gap: .45rem; font-weight: 500; }
.kennel-wait { display: flex; align-items: center; gap: .45rem; color: var(--ink-2); margin: 0 0 1rem; }
.kennel-actions { display: flex; gap: .6rem; margin-top: .75rem; }
.kennel-actions .btn { flex: 1; }
.kennel-actions [data-fav][aria-pressed="true"] { border-color: var(--alert); }
.status-note { display: inline-block; margin: 0 0 .8rem; padding: .5em .9em; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.status-pending { background: var(--sky); }
.status-home { background: var(--ball); }
.status-urgent { background: var(--alert); color: #fff; }

.dog-info { display: grid; grid-template-columns: 1.22fr 1fr; gap: clamp(1.5rem, 4vw, 2.75rem); margin-top: 3rem; }
.story p { font-size: 1.1rem; line-height: 1.8; }
.legal-note { margin-top: 1.5rem; background: #FFF5D6; border: 1px solid #E8CF84; border-radius: 16px; padding: 1rem 1.2rem; }
.legal-note h3 { display: flex; align-items: center; gap: .35rem; font-size: 1.05rem; margin-bottom: .35rem; font-family: var(--f-body); font-weight: 700; }
.legal-note p { font-size: .96rem; line-height: 1.6; margin: 0; }
.traits { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.trait { display: grid; grid-template-columns: auto 8.5rem 1fr; align-items: center; gap: .8rem; padding: .72rem 1rem; border-top: 1px solid var(--line); }
.trait:first-child { border-top: 0; }
.trait-label { font-weight: 600; }
.trait-text { color: var(--ink-2); }
.t-unknown .trait-text { color: var(--ink-3); }
.fit-hint { margin-top: 1rem; color: var(--ink-2); }

.shelter-card { margin-top: 3rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--sky); border-radius: 22px; padding: clamp(1.2rem, 3vw, 1.75rem); }
.shelter-kicker { margin: 0; color: var(--ink-2); }
.shelter-card h2 { margin: .1rem 0 .5rem; }
.shelter-addr, .shelter-hours { margin: .2rem 0; display: flex; align-items: center; gap: .4rem; color: var(--ink-2); }
.shelter-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.shelter-links .btn { background: var(--paper); }

.adopt { margin-top: 3rem; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 4vw, 2.75rem); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.3rem, 3vw, 2.4rem); scroll-margin-top: calc(var(--head-h) + 16px); }
.adopt-intro p { color: var(--ink-2); }
.adopt-form { display: flex; flex-direction: column; gap: 1rem; }
.adopt-form .btn { align-self: flex-start; }
.profile-attached { display: flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--ink-2); margin: 0; }
.adopt-done { grid-column: 1 / -1; text-align: center; padding: 1.5rem 1rem; }
.adopt-done p { margin-inline: auto; color: var(--ink-2); }
.adopt-done-ic { width: 58px; height: 58px; padding: 13px; border-radius: 50%; background: var(--ball); margin-bottom: .6rem; }
.more { margin-top: 4rem; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(9, 21, 33, .9); }
.lightbox img { display: block; max-width: 94vw; max-height: 88vh; border-radius: 12px; }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lb-close { top: 1rem; inset-inline-end: 1rem; }
.lb-prev { top: calc(50% - 24px); inset-inline-start: 1rem; }
.lb-next { top: calc(50% - 24px); inset-inline-end: 1rem; }

/* ---------- match calculator ---------- */
.quiz-wrap { max-width: 780px; padding: 2.4rem 0 3rem; }
.quiz-head p { color: var(--ink-2); }
.quiz { margin-top: 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: clamp(1.2rem, 4vw, 2.2rem); }
.quiz-progress { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--ball); border-radius: 999px; box-shadow: inset 0 0 0 2px var(--ink); transition: width .3s ease; }
html:not(.js) .quiz-progress, html:not(.js) .quiz-count { display: none; }
.quiz-count { font-size: .9rem; color: var(--ink-2); margin: .6rem 0 1.3rem; }
.q { margin: 0 0 1.6rem; }
.js .q { display: none; }
.js .q.is-active { display: block; }
.q-title { font-family: var(--f-display); font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 600; line-height: 1.12; margin-bottom: 1.1rem; padding: 0; }
.q-hint { color: var(--ink-2); margin-top: -.6rem; }
.q-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .75rem; }
.q-opts-many { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt { position: relative; cursor: pointer; display: block; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.opt-body { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem 1.1rem; border-radius: 16px; border: 2px solid var(--line); background: var(--paper); transition: border-color .15s, background-color .15s; }
.opt:hover .opt-body { border-color: var(--ink); }
.opt input:checked + .opt-body { background: var(--ball); border-color: var(--ink); }
.opt input:focus-visible + .opt-body { outline: 3px solid var(--ink); outline-offset: 2px; }
.opt-ic { width: 36px; height: 36px; margin-bottom: .35rem; }
.opt-label { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.opt-sub { font-size: .88rem; color: var(--ink-2); line-height: 1.35; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }
.js .quiz-nav [data-submit] { display: none; }
.js .quiz.is-last [data-submit] { display: inline-flex; }
.js .quiz.is-last [data-next] { display: none; }
.js .quiz.is-first [data-prev] { visibility: hidden; }
html:not(.js) [data-prev], html:not(.js) [data-next] { display: none; }

.results-head { padding: 2.4rem 0 1.4rem; }
.results-head p { color: var(--ink-2); margin: 0; }
.results-layout { display: grid; grid-template-columns: 345px 1fr; gap: 2rem; align-items: start; padding-bottom: 2rem; }
.profile { position: sticky; top: calc(var(--head-h) + 16px); background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; padding: 1.35rem; }
.profile h2 { font-size: 1.5rem; margin-bottom: .45rem; }
.profile h3 { font-size: 1.05rem; margin: 1.3rem 0 .55rem; }
.profile-sentence { font-size: 1.1rem; line-height: 1.55; font-weight: 500; }
.profile-traits { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
.profile-traits div { background: var(--bg); border-radius: 12px; padding: .5rem .7rem; }
.profile-traits dt { font-size: .78rem; color: var(--ink-3); }
.profile-traits dd { margin: 0; font-weight: 600; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; line-height: 1.35; }
.musts, .tips, .types { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.musts li { display: flex; align-items: center; gap: .5rem; }
.types li { display: flex; flex-direction: column; font-size: .92rem; color: var(--ink-2); line-height: 1.45; }
.types a { color: var(--ink); }
.types-note { font-size: .88rem; color: var(--ink-3); margin: .7rem 0 0; }
.tips li { position: relative; padding-inline-start: .95rem; font-size: .93rem; color: var(--ink-2); line-height: 1.5; }
.tips li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.profile .btn-block { margin-top: 1.3rem; }
.matches { display: flex; flex-direction: column; gap: 1rem; }
.match { display: grid; grid-template-columns: 190px 1fr auto; gap: 1.2rem; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: .9rem; }
.match-photo { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--sky); }
.match-photo img, .match-photo .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.match-body h3 { font-size: 1.55rem; margin: .1rem 0 0; }
.match-body h3 a { text-decoration: none; }
.match-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--ball-2); }
.match-meta { color: var(--ink-2); font-size: .95rem; margin: .1rem 0 .7rem; }
.reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.rs { display: flex; align-items: flex-start; gap: .5rem; font-size: .95rem; line-height: 1.45; }
.rs .mk { margin-top: .12rem; }
.match-score { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 100px; text-align: center; padding-top: .2rem; }
.ring { width: 86px; height: 86px; }
.ring-track { fill: none; stroke: var(--bg); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ball); stroke-width: 8; stroke-linecap: round; }
.ring-num { font-family: var(--f-display); font-weight: 600; font-size: 17px; fill: var(--ink); }
.tier { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.match.is-weak { opacity: .8; }
.excluded-note { display: flex; align-items: center; gap: .5rem; color: var(--ink-2); font-size: .93rem; margin-top: .5rem; }

/* ---------- shelters & contact ---------- */
.shelters { display: flex; flex-direction: column; gap: 2.5rem; padding-bottom: 2rem; }
.region h2 { font-size: 1.6rem; padding-bottom: .55rem; border-bottom: 3px solid var(--ink); margin-bottom: 0; }
.shelter-list { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.shelter-item { display: flex; flex-direction: column; gap: .35rem; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; }
.shelter-item h3 { margin: 0 0 .25rem; }
.shelter-item p { margin: 0; display: flex; align-items: center; gap: .45rem; color: var(--ink-2); font-size: .95rem; }
.shelter-dogs { margin-top: .6rem; font-weight: 600; }
.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: start; padding-bottom: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.2rem, 3vw, 2rem); }
.contact-form .btn { align-self: flex-start; }
.contact-grid .adopt-done { background: var(--paper); border-radius: 22px; border: 1px solid var(--line); }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.contact-list a { display: flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; }
.error-page { text-align: center; padding: 5rem 0; }
.error-page p { margin-inline: auto; color: var(--ink-2); }
.error-actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #D5E0E9; padding: 3rem 0 1.5rem; margin-top: 4rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.brand-foot { color: #fff; }
.foot-about p { color: #B6C5D2; max-width: 44ch; margin-top: .9rem; }
.foot-links, .foot-contact { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--ball); }
.foot-contact a { display: flex; align-items: center; gap: .5rem; }
.site-foot .foot-admin { margin-top: .8rem; font-size: .85rem; color: #9FB3C4; }
.foot-copy { margin-top: 2.5rem; font-size: .85rem; color: #9FB3C4; max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-board { height: 440px; width: 100%; max-width: 600px; margin-inline: auto; }
  .row-scroll { grid-auto-columns: calc((100% - 2 * 1.1rem) / 2.6); }
  .catalog { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: 0; z-index: 60; max-height: none; border-radius: 0; border: 0;
    padding: 1.2rem 1.25rem 2rem;
    transform: translateX(100%); visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .filters.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
  .js .filters-actions .btn-ink { display: inline-flex; }
  .filters-close, .filters-open { display: inline-flex; }
  .results-layout, .dog, .dog-info, .regions-grid, .faq-grid, .contact-grid, .adopt { grid-template-columns: 1fr; }
  .profile, .kennel { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
  .adopted-row { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 100%; inset-inline: -1.25rem; margin: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem; box-shadow: 0 16px 24px -18px rgba(21, 48, 74, .4); }
  .nav.is-open { display: flex; }
  .nav a { padding: .8em .6em; border-radius: 10px; }
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
  .head-cta { padding: .62em 1em; font-size: .9rem; }
}
@media (max-width: 520px) {
  .head-cta { display: none; }
  .nav-only-mobile { display: block; }
}
@media (max-width: 640px) {
  :root { --head-h: 64px; }
  .wrap { width: min(1200px, 100% - 1.6rem); }
  body { font-size: 1rem; }
  .brand-tag { width: 36px; height: 36px; }
  .brand-name { font-size: 1.2rem; }
  .lede { font-size: 1.08rem; }
  .quick-q { padding: 1rem; }
  .quick-q-opts { grid-template-columns: 1fr; }
  .qopt { display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; align-items: center; }
  .qopt-ic { grid-row: span 2; margin: 0; }
  .hero-board { height: 330px; }
  .pin { width: 55%; padding: .55rem .55rem .8rem; }
  .pin-1 { z-index: 1; top: 0; }
  .pin-2 { z-index: 2; top: 44px; }
  .pin-3 { display: none; }
  .pin-name { font-size: 1.25rem; }
  .pin-meta { font-size: .8rem; }
  .row-scroll { grid-auto-columns: 80%; }
  .form-row { grid-template-columns: 1fr; }
  .match { grid-template-columns: 104px 1fr; gap: .9rem; }
  .match-score { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: .7rem; border-top: 1px solid var(--line); padding-top: .7rem; }
  .ring { width: 60px; height: 60px; }
  .match-body h3 { font-size: 1.3rem; }
  .trait { grid-template-columns: auto 1fr; row-gap: .1rem; }
  .trait-text { grid-column: 2; }
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .adopted-row { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .sort select { min-width: 0; }
  .kennel-actions { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
