/* חבר על ארבע - 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: #5A6977;      /* 4.5:1 or more on every background - IS 5568 / WCAG AA */
  --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 { max-width: 100%; }
.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; flex-wrap: wrap; align-items: center; gap: .3rem 1.25rem; min-height: var(--head-h); position: relative; padding-block: .3rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; min-width: 0; }
.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.1; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-only-mobile { display: none; }
.nav { display: flex; flex-wrap: wrap; gap: .2rem; margin-inline-start: .75rem; }
.nav a { padding: .5em .9em; border-radius: 999px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.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: 46ch; }

/* quick search (opens the catalog filtered) */
.finder {
  margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 22px; padding: .7rem;
  box-shadow: 0 24px 44px -30px rgba(21, 48, 74, .45);
}
.finder-field { flex: 1 1 7.5rem; display: flex; flex-direction: column; gap: .15rem; padding: .25rem .6rem .1rem; border-inline-end: 1px solid var(--line); min-width: 0; }
.finder-field:nth-child(3) { border-inline-end: 0; }
.finder-field span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.finder-field select { border: 0; padding: .15rem 0; min-height: 34px; background: transparent; font-weight: 600; box-shadow: none; }
.finder-field select:focus { box-shadow: none; }
.finder-field:focus-within { background: var(--bg); border-radius: 12px; }
.finder-go { flex: 0 0 auto; min-height: 56px; border-radius: 16px; padding-inline: 1.4em; }
.hero-alt { margin: 1rem 0 0; color: var(--ink-2); font-size: .97rem; }
.hero-alt a { font-weight: 600; color: var(--ink); }

/* wall of dogs: the dogs are the first thing you see */
.wall {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: .7rem; aspect-ratio: 1 / 1; width: 100%;
}
.tile {
  position: relative; overflow: hidden; border-radius: 20px; background: var(--sky);
  text-decoration: none; color: #fff; isolation: isolate;
  animation: tile-in .7s cubic-bezier(.2, .8, .2, 1) backwards;
}
.tile img, .tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 28% 0 0; background: linear-gradient(to top, rgba(12, 30, 47, .9) 0%, rgba(12, 30, 47, .8) 50%, rgba(12, 30, 47, 0) 100%); z-index: 1; }
.tile-cap { position: absolute; inset-inline: .8rem; bottom: .7rem; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.tile-name { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; line-height: 1.05; }
.tile-meta { font-size: .8rem; }
.tile-wait { margin-top: .4rem; background: var(--ball); color: var(--ink); border-radius: 999px; padding: .2em .75em; font-size: .82rem; font-weight: 600; text-shadow: none; }
.tile-1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.tile-1 .tile-name { font-size: 2.1rem; }
.tile-1 .tile-meta { font-size: .95rem; }
.tile-1 .tile-cap { inset-inline: 1.1rem; bottom: 1rem; }
.tile-2 { animation-delay: .08s; } .tile-3 { animation-delay: .16s; } .tile-4 { animation-delay: .24s; }
.tile-5 { animation-delay: .32s; } .tile-more { animation-delay: .4s; }
.tile-more { background: var(--ball); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; text-align: center; border: 2px solid var(--ball-2); }
.tile-more::after { display: none; }
.tile-more-ic { width: 34px; height: 34px; margin-bottom: .2rem; }
.tile-more-n { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1; }
.tile-more-t { font-size: .85rem; font-weight: 600; }
.tile-more:hover { background: var(--ball-2); }
@keyframes tile-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }

/* ---------- 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; }
.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-match { padding-top: 0; }
.match-promo { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(1.8rem, 4vw, 3.4rem); }
.match-promo h2 { color: #fff; }
.match-promo :focus-visible { outline-color: var(--ball); }
.mp-text p { color: #C9D6E1; font-size: 1.08rem; }
.mp-steps { list-style: none; counter-reset: mp; padding: 0; margin: 1.2rem 0 1.8rem; display: flex; flex-direction: column; gap: .7rem; }
.mp-steps li { counter-increment: mp; display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.mp-steps li::before { content: counter(mp); flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--ball); color: var(--ink); font-family: var(--f-display); font-weight: 600; }
.mp-visual { display: flex; justify-content: center; }
.mp-card { position: relative; width: min(100%, 400px); background: var(--paper); color: var(--ink); border-radius: 22px; padding: 1rem; display: grid; grid-template-columns: 112px 1fr; gap: 1rem; transform: rotate(-2deg); box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .6); }
.mp-photo { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--sky); display: block; }
.mp-photo img, .mp-photo .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mp-name { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1.1; }
.mp-meta { font-size: .85rem; color: var(--ink-2); margin-bottom: .45rem; }
.mp-body ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; }
.mp-body li { display: flex; align-items: center; gap: .4rem; }
.mp-ring { position: absolute; top: -26px; inset-inline-end: -18px; width: 74px; height: 74px; border-radius: 50%; background: var(--paper); border: 7px solid var(--ball); display: grid; place-items: center; color: var(--ink); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }
.mp-ring .i { width: 30px; height: 30px; }

.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 h2 { font-size: 1.22rem; 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: .6rem 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters-open { display: none; }
.sort { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .93rem; margin-inline-start: auto; min-width: 0; max-width: 100%; }
.sort select { width: auto; min-width: min(200px, 100%); max-width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(248px, 100%), 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: minmax(0, 1.22fr) minmax(0, 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: minmax(0, 1fr) minmax(0, 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; }
.know-title { font-size: 1.15rem; margin: 0 0 .6rem; }
.know { list-style: none; padding: 0; margin: 0 0 1.1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.know li { display: flex; align-items: center; gap: .55rem; min-width: 0; padding: .62rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 500; line-height: 1.25; }
.know .k-unknown { color: var(--ink-3); }
@media (max-width: 340px) { .know { grid-template-columns: minmax(0, 1fr); } }
.kennel-wait { display: flex; align-items: center; gap: .45rem; color: var(--ink-2); margin: 0 0 1rem; }
.kennel-cta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.kennel-cta .btn { padding-inline: .9em; }
.cta-note { margin: .6rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 430px) { .cta-long { display: none; } }
.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: minmax(0, 1.22fr) minmax(0, 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(min(175px, 100%), 1fr)); gap: .75rem; }
.q-opts-many { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 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: repeat(auto-fit, minmax(min(8.5rem, 100%), 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(min(280px, 100%), 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: minmax(0, 1fr); }
  .wall { max-width: 620px; margin-inline: auto; }
  .match-promo { grid-template-columns: minmax(0, 1fr); }
  .row-scroll { grid-auto-columns: calc((100% - 2 * 1.1rem) / 2.6); }
  .catalog { grid-template-columns: minmax(0, 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: minmax(0, 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; }
  .finder { padding: .6rem; }
  .finder-field { flex-basis: calc(50% - .25rem); border-inline-end: 0; background: var(--bg); border-radius: 12px; padding: .35rem .7rem .15rem; }
  .finder-field:nth-child(3) { flex-basis: 100%; }
  .finder-go { flex: 1 1 100%; min-height: 50px; }
  .wall { grid-template-columns: 1fr 1fr; grid-template-rows: none; aspect-ratio: auto; grid-auto-rows: 150px; }
  .tile-1 { grid-column: 1 / -1; grid-row: span 2; }
  .tile-1 .tile-name { font-size: 1.7rem; }
  .tile-more { grid-column: 1 / -1; grid-row: auto; flex-direction: row; gap: .6rem; height: 64px; }
  .tile-more-ic { margin: 0; width: 26px; height: 26px; }
  .mp-card { grid-template-columns: 88px 1fr; transform: none; }
  .row-scroll { grid-auto-columns: 80%; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .match { grid-template-columns: 104px minmax(0, 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: minmax(0, 1fr); }
  .steps li::after { display: none; }
  .adopted-row { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .sort select { min-width: 0; }
  .kennel-actions { flex-wrap: wrap; }
  .kennel-cta .btn-lg { font-size: 1rem; }
}
@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; }
}


/* ---------- accessibility (IS 5568 / WCAG 2.1 AA) ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#main:focus { outline: none; }

.a11y { position: fixed; left: 1rem; bottom: 1rem; z-index: 55; }
.a11y-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); color: #fff;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(21, 48, 74, .35);
}
.a11y-btn .i { width: 30px; height: 30px; }
.a11y-btn.is-on { background: #0B5CAD; }
.a11y-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.a11y-panel {
  position: absolute; left: 0; bottom: calc(100% + .7rem); width: min(350px, calc(100vw - 2rem));
  max-height: calc(100vh - 7rem); overflow-y: auto; background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 18px; padding: 1rem; box-shadow: 0 18px 44px rgba(21, 48, 74, .28);
}
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.a11y-head h2 { font-size: 1.35rem; margin: 0; }
.a11y-head h2:focus { outline: none; }
.a11y-head h2:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.a11y-x { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.a11y-size { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: .6rem; font-weight: 600; }
.a11y-size > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }
.a11y-steps { display: inline-flex; align-items: center; gap: .35rem; }
.a11y-steps button { min-width: 44px; height: 40px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 1rem var(--f-body); cursor: pointer; }
.a11y-steps button:disabled { opacity: .45; cursor: default; }
.a11y-steps output { min-width: 3.4em; text-align: center; font-variant-numeric: tabular-nums; }
.a11y-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.a11y-grid button {
  min-height: 76px; padding: .5rem .3rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  font: 500 .86rem/1.25 var(--f-body); text-align: center; cursor: pointer;
}
.a11y-grid button .i { width: 24px; height: 24px; }
.a11y-grid button:hover { border-color: var(--ink); }
.a11y-grid button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.a11y-foot button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; color: var(--ink); font: 600 .95rem var(--f-body); cursor: pointer; padding: .4rem 0; text-decoration: underline; text-underline-offset: 3px; }
.a11y-foot a { font-weight: 600; }
@media (max-width: 520px) { .a11y { left: .6rem; bottom: .6rem; } .a11y-btn { width: 48px; height: 48px; } }
@media print { .a11y { display: none; } }

/* high contrast: black background, white text, yellow links */
html.a11y-contrast, html.a11y-contrast body { background: #000 !important; }
html.a11y-contrast body *:not(svg):not(svg *):not(img) {
  background-color: #000 !important; color: #fff !important; border-color: #fff !important;
  box-shadow: none !important; text-shadow: none !important;
}
html.a11y-contrast a, html.a11y-contrast a *:not(svg):not(svg *):not(img) { color: #FFE600 !important; }
html.a11y-contrast .btn, html.a11y-contrast button { border: 2px solid #FFE600 !important; }
html.a11y-contrast input, html.a11y-contrast select, html.a11y-contrast textarea { border: 2px solid #fff !important; }
html.a11y-contrast ::placeholder { color: #ccc !important; }
html.a11y-contrast :focus-visible { outline: 3px solid #FFE600 !important; }
html.a11y-contrast .tile-cap, html.a11y-contrast .tile::after { background: rgba(0, 0, 0, .85) !important; }

/* grayscale (on the root element, so fixed elements keep working) */
html.a11y-gray { filter: grayscale(1); }

/* highlighted links */
html.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important; outline: 2px solid currentColor; outline-offset: 2px; }
html.a11y-links:not(.a11y-contrast) a { background-color: #FFF3A3 !important; color: #000 !important; }

/* highlighted headings */
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3, html.a11y-headings h4 {
  outline: 3px solid #E0A800 !important; outline-offset: 4px; border-radius: 4px;
}

/* readable font */
html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) { font-family: Arial, "Segoe UI", Tahoma, sans-serif !important; }

/* text spacing (the values WCAG 1.4.12 tests with) */
html.a11y-spacing body *:not(svg):not(svg *) { line-height: 1.8 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html.a11y-spacing p { margin-bottom: 2em !important; }

/* no animation */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* big cursor */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M9 4l29 19-12.5 2.6 7.4 14.6-6.1 3.1-7.4-14.6L10 37.5z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 9 4, auto !important;
}

/* strong focus for keyboard users */
html.a11y-focus *:focus-visible, html.a11y-focus *:focus {
  outline: 4px solid #FFE600 !important; outline-offset: 2px !important; box-shadow: 0 0 0 8px #000 !important;
}

/* ---------- legal pages ---------- */
.legal { padding-block: 2.2rem 4rem; }
.legal-head { max-width: 66ch; margin-bottom: 1.6rem; }
.legal-head p { color: var(--ink-2); }
.legal-doc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.2rem, 3vw, 2.4rem); max-width: 860px; }
.legal-doc h2 { font-size: 1.4rem; margin-top: 1.8rem; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc ul { padding-inline-start: 1.3rem; margin: 0 0 1em; max-width: 66ch; }
.legal-doc li { margin-bottom: .45em; }
.legal-doc .key { background: #F6FBDD; border: 1.5px solid var(--ball-2); border-radius: 14px; padding: 1rem 1.2rem; max-width: none; }
.legal-doc .key strong { display: block; margin-bottom: .3rem; }
.legal-doc dl.contact { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0 0 1em; }
.legal-doc dl.contact dt { font-weight: 600; }
.legal-doc dl.contact dd { margin: 0; }
.legal-updated { color: var(--ink-2); font-size: .95rem; margin-top: 1.6rem; }
.agree { display: flex; align-items: flex-start; gap: .6rem; font-size: .95rem; line-height: 1.5; cursor: pointer; }
.agree input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--ink); flex: none; }
.agree.has-error { color: var(--alert); }
.adopt-note { font-size: .92rem; color: var(--ink-2); margin: 0 0 1rem; }
.form-alert { background: var(--alert-bg); color: #85261A; border: 1.5px solid #E9B4AA; border-radius: 12px; padding: .65rem .9rem; font-weight: 600; margin: 0 0 1rem; max-width: none; }
.agree a { font-weight: 600; }

/* long words and big text wrap instead of overflowing */
h1, h2, h3, p, li, dd, dt, label, legend { overflow-wrap: break-word; }
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; }
  .sort select { flex: 1; }
}
kbd { direction: ltr; unicode-bidi: isolate; display: inline-block; font: 600 .85em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: .05em .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); }

/* ---------- about ---------- */
.about-head .lede { max-width: 54ch; margin-bottom: .7rem; }
.about-now { color: var(--ink-2); margin: 0; }
.about-now strong { color: var(--ink); font-weight: 700; }
.about-sec { padding-block: clamp(2rem, 5vw, 3.6rem); }
.about-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem clamp(2rem, 5vw, 4rem); align-items: start; }
.about-prose p { font-size: 1.1rem; }
.about-prose p:last-child { margin-bottom: 0; }
.about-what { background: var(--paper); border-block: 1px solid var(--line); }
.about-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem); }
.about-list li { display: flex; gap: 1rem; align-items: flex-start; }
.about-ic { flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--ball); display: grid; place-items: center; }
.about-ic .i { width: 1.45rem; height: 1.45rem; }
.about-list h3 { margin-bottom: .3rem; }
.about-list p { margin: 0; color: var(--ink-2); }
.about-note { background: #F6FBDD; border: 1.5px solid var(--ball-2); border-radius: var(--r-card); padding: clamp(1.2rem, 3vw, 2rem); max-width: 860px; }
.about-note h2 { font-size: 1.5rem; }
.about-note p:last-child { margin-bottom: 0; }
.about-join-sec { padding-top: 0; }
.about-join {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "text list" "cta list";
  gap: 1rem clamp(2rem, 5vw, 4rem); align-items: start; background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(1.6rem, 4vw, 3.2rem);
}
.about-join-text { grid-area: text; }
.about-join-list { grid-area: list; align-self: center; }
.about-join-cta { grid-area: cta; justify-self: start; }
.about-join h2 { color: #fff; }
.about-join-text p { color: #C9D6E1; font-size: 1.08rem; margin: 0; }
.about-join :focus-visible { outline-color: var(--ball); }
.about-join-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; font-size: 1.05rem; }
.about-join-list li { display: flex; gap: .75rem; align-items: flex-start; }
.about-join-list .i { color: var(--ball); margin-top: .2em; }
.about-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.about-end h2 { margin: 0; }
.about-end-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 900px) {
  .about-split, .about-join { grid-template-columns: minmax(0, 1fr); }
  .about-join { grid-template-areas: "text" "list" "cta"; }
}
@media (max-width: 640px) {
  .about-list { grid-template-columns: minmax(0, 1fr); }
}
.shelter-item .shelter-kind { order: -1; margin: 0 0 -.2rem; font-size: .8rem; font-weight: 600; color: var(--ink-3); }
