/* ============================================================================
   BBC · Fundación — sistema de diseño
   Paleta: tinta + hueso + terracota. Retícula fina, mucho aire, cero ruido.
   ========================================================================== */

/* --- 0. Tipografía (self-hosted, sin Google Fonts en runtime) ------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* Color: base blanco, gris de sección, tinta casi negra. El acento
     terracota es lo único saturado del sistema. */
  --ink: #1d1d1f;
  --ink-2: #2c2c2e;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --paper: #ffffff;
  --surface: #ffffff;
  --sand: #f5f5f7;
  --sand-2: #e8e8ed;
  --line: #e8e8ed;
  --line-2: #d2d2d7;
  --accent: #c8452b;
  --accent-hi: #dc5537;
  --accent-lo: #a63520;
  --accent-soft: #fdf1ee;
  --moss: #5c6b4e;
  --ok: #3f7a54;
  --warn: #b5741d;

  /* Tipografía */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.5rem, 6vw, 4.7rem);
  --fs-h2: clamp(1.95rem, 3.9vw, 3.05rem);
  --fs-h3: clamp(1.2rem, 1.5vw, 1.45rem);
  --fs-body: clamp(1.0625rem, 0.32vw + 0.98rem, 1.1875rem);
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-micro: 0.6875rem;

  /* Ritmo */
  --w: 1200px;
  --w-wide: 1360px;
  --w-text: 46rem;
  --gap: clamp(20px, 2.4vw, 32px);
  --sec-y: clamp(88px, 11vw, 168px);
  --sec-y-sm: clamp(64px, 7.4vw, 112px);

  /* Forma */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Movimiento */
  --ease: cubic-bezier(0.22, 0.68, 0.16, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.55s;

  /* Sombra: mínima y fría. El sistema se apoya en líneas y espacios. */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-md: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px -14px rgba(0, 0, 0, 0.12);
  --sh-lg: 0 4px 14px rgba(0, 0, 0, 0.05), 0 30px 70px -30px rgba(0, 0, 0, 0.22);
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv05" 1, "ss03" 1, "tnum" 0;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
::selection { background: var(--ink); color: var(--paper); }

/* Lectores de pantalla y salto al contenido */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- 3. Tipografía ------------------------------------------------------- */
.display {
  font-size: var(--fs-display);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-wrap: balance;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.036em;
  font-weight: 700;
  text-wrap: balance;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.024em;
  font-weight: 600;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.12rem, 0.7vw + 1rem, 1.375rem);
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: -0.014em;
  text-wrap: pretty;
}
.muted { color: var(--muted); }
.mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* --- 4. Layout ----------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--w);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.4vw, 44px);
}
.wrap-wide { max-width: var(--w-wide); }
.wrap-text { max-width: var(--w-text); }

.section { padding-block: var(--sec-y); }
.section-sm { padding-block: var(--sec-y-sm); }

.sec-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 4.4vw, 60px);
}
.sec-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.grid { display: grid; gap: var(--gap); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* --- 5. Botones ---------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding-inline: 24px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn:active { transform: scale(0.985); }
.btn .ico { transition: transform 0.24s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }

.btn-ghost {
  --btn-bg: var(--sand);
  --btn-fg: var(--ink);
  --btn-bd: transparent;
}
.btn-ghost:hover { --btn-bg: var(--sand-2); --btn-bd: transparent; }

.btn-paper {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
}

.btn-accent {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-bd: var(--accent);
}
.btn-accent:hover { --btn-bg: var(--accent-hi); --btn-bd: var(--accent-hi); }

.btn-lg { height: 52px; padding-inline: 28px; font-size: 1.0625rem; font-weight: 500; }
.btn-sm { height: 38px; padding-inline: 15px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
  font-size: var(--fs-sm);
  color: var(--ink);
  border-bottom: 1.5px solid var(--line-2);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-link:hover { border-color: var(--accent); color: var(--accent); }

/* --- 6. Logo ------------------------------------------------------------- */
/* Tipografía pura: las letras reales de Inter Black 900, en curvas SVG.
   Sin cuadros: los cuadros son el ADN de BBC canal y esto es otra cosa. */
.logo-mark .lg-ink { fill: var(--ink); }
.ftr .logo-mark .lg-ink { fill: var(--ink); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.logo-mark {
  height: 26px;
  width: auto;
  flex: none;
}
.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1.06;
  min-width: 0;
}
.logo-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.028em;
}
.logo-tag {
  font-size: 0.605rem;
  font-weight: 550;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* --- 7. Header ----------------------------------------------------------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.hdr.is-stuck { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03); }
.hdr-in {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.hdr nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.hdr nav a {
  padding: 8px 12px;
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.18s;
}
.hdr nav a:hover { color: var(--ink); }
.hdr-cta { display: flex; align-items: center; gap: 10px; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.26s var(--ease), opacity 0.2s;
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding-block: 14px 22px;
  background: var(--paper);
}
.mobile-nav a {
  display: block;
  padding: 11px 2px;
  font-size: 1.05rem;
  font-weight: 550;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-of-type { border-bottom: 0; }

/* --- 8. Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(50px, 6vw, 96px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(30px, 4.4vw, 68px);
  align-items: center;
}
.hero-copy { display: grid; gap: 26px; }
.hero h1 { max-width: 17ch; }
/* El subrayado vive en cualquier titular grande, no solo en el hero viejo. */
.display .hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.display .hl::after {
  content: "";
  position: absolute;
  left: -1%;
  right: -1%;
  bottom: 0.06em;
  height: 0.1em;
  background: var(--accent);
  opacity: 0.85;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: rule-in 0.9s var(--ease-out) 0.5s forwards;
}
@keyframes rule-in { to { transform: scaleX(1); } }
.hero .lede { max-width: 34ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.11) translate3d(-1.4%, -1.2%, 0); }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(40px, 5vw, 68px);
  background: var(--line);
  border-block: 1px solid var(--line);
}
.hero-stats div {
  background: var(--paper);
  padding: 22px 4px;
  text-align: center;
}
.hero-stats dt {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-stats dd {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* --- 9. Chips y filtros -------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 36px;
  padding-inline: 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 550;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip .n {
  font-size: 0.68rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* --- 10. Tarjetas de mascota --------------------------------------------- */
.pets {
  display: grid;
  /* 4 columnas con la barra lateral al lado. El mínimo de 212px es lo que
     hace que quepan 4 en el hueco que queda: con 268 solo salían 2. */
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 14px;
}
.pet {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              border-color 0.3s var(--ease);
}
.pet:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: transparent;
}
.pet-open {
  display: block;
  width: 100%;
  padding: 0;
  cursor: pointer;
}
.pet-img {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--sand);
  overflow: hidden;
}
.pet-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.pet:hover .pet-img img { transform: scale(1.045); }
.pet-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(6px);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.pet-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  color: var(--ink);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.pet-fav:hover { transform: scale(1.08); }
.pet-fav[aria-pressed="true"] { background: var(--accent); color: #fff; }
.pet-body {
  padding: 15px 17px 17px;
  display: grid;
  gap: 8px;
  flex: 1;
}
.pet-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pet-name {
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -0.024em;
}
/* El color del retrato de estudio. Un punto junto al nombre ata la ficha al
   fondo de su foto, y le pone color a una página que es toda blanca.
   Solo las mascotas de la fundación lo tienen: --pet-color se define
   únicamente cuando el valor pasa el patrón estricto. */
.pet.has-tint .pet-name { display: inline-flex; align-items: center; gap: 8px; }
.pet.has-tint .pet-name::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--pet-color);
}
.pet.has-tint .pet-go { color: var(--pet-color); }
.pet.has-tint:hover { border-color: var(--pet-color); }
.pet-age {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pet-desc {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pet-meta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.pet-place { display: inline-flex; align-items: center; gap: 5px; }
.pet-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--ink);
}
.pet:hover .pet-go { color: var(--accent); }

.pets-empty {
  grid-column: 1 / -1;
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  color: var(--muted);
  display: grid;
  gap: 8px;
}

/* --- 11. El agente ------------------------------------------------------- */
.agent-band {
  background: var(--sand);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.agent-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 78% at 78% 8%, rgba(200, 69, 43, 0.08), transparent 58%),
              radial-gradient(90% 60% at 10% 100%, rgba(92, 107, 78, 0.08), transparent 62%);
  pointer-events: none;
}
.agent-band .wrap { position: relative; }
.agent-band .eyebrow { color: var(--muted); }
.agent-band .eyebrow::before { background: var(--accent-hi); }
.agent-band .lede { color: var(--muted); }
.agent-band .h2 { color: var(--ink); }

.agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: start;
}

.chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: min(560px, 74vh);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
.chat-hd {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-hd .who { display: grid; gap: 1px; }
.chat-hd .who b { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.015em; }
.chat-hd .who span {
  font-size: var(--fs-micro);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-hd .who span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55c98a;
  box-shadow: 0 0 0 3px rgba(85, 201, 138, 0.18);
}
.chat-hd .reset {
  margin-left: auto;
  font-size: var(--fs-micro);
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  padding: 5px 10px;
  transition: all 0.18s;
}
.chat-hd .reset:hover { color: var(--ink); border-color: var(--ink); }

.orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(from 210deg, var(--accent-hi), #e8b23a, var(--moss), var(--accent-hi));
  animation: spin 7s linear infinite;
  position: relative;
}
.orb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--surface);
}
@keyframes spin { to { transform: rotate(360deg); } }

.chat-log {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.msg { display: flex; gap: 10px; max-width: 90%; }
.msg.bot { flex-direction: column; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg-av {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  flex: none;
  background: linear-gradient(135deg, var(--accent), #e8b23a);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}
.bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: var(--fs-sm);
  line-height: 1.56;
  background: var(--sand);
  color: var(--ink);
}
.msg.me .bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.bot .bubble { border-bottom-left-radius: 4px; }
.bubble strong { font-weight: 600; }
.bubble code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  background: var(--sand-2);
  padding: 1px 5px;
  border-radius: 4px;
}
.bubble em { font-style: normal; color: var(--accent); }
.msg.me .bubble em { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.bubble ul { margin-top: 7px; display: grid; gap: 5px; }
.bubble li { padding-left: 15px; position: relative; }
.bubble li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-hi);
}
.msg.me .bubble li::before { background: #fff; }

.mini-pets { display: grid; gap: 7px; margin-top: 10px; }
.mini-pet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  border-radius: 10px;
  background: var(--sand);
  border: 1px solid var(--line);
  text-align: left;
  width: 100%;
  transition: background 0.18s, border-color 0.18s, transform 0.18s var(--ease);
}
.mini-pet:hover {
  background: var(--sand-2);
  border-color: var(--line-2);
  transform: translateX(3px);
}
.mini-pet img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.mini-pet .mp-thumb {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--sand-2);
  color: var(--muted);
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.04em;
}
.mini-pet .mp-name { font-weight: 600; font-size: var(--fs-xs); }
.mini-pet .mp-meta { font-size: var(--fs-micro); color: var(--muted); }
.mini-pet .mp-go { margin-left: auto; color: var(--muted-2); }

.tool {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}
.tool summary {
  cursor: pointer;
  padding: 7px 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  transition: background 0.18s;
}
.tool summary::-webkit-details-marker { display: none; }
.tool summary:hover { background: var(--sand); }
.tool summary::before {
  content: "▸";
  color: var(--accent-hi);
  transition: transform 0.2s var(--ease);
}
.tool[open] summary::before { transform: rotate(90deg); }
.tool pre {
  padding: 9px 11px 11px;
  margin: 0;
  background: var(--sand);
  color: var(--ink-soft);
  overflow-x: auto;
  line-height: 1.5;
  border-top: 1px solid var(--line);
}
.tool .ok { color: var(--ok); margin-left: auto; }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: blink 1.25s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0.28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-sug {
  display: flex;
  gap: 7px;
  padding: 0 14px 11px;
  flex-wrap: wrap;
}
.chat-sug button {
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  font-size: var(--fs-xs);
  color: var(--muted);
  transition: all 0.18s;
}
.chat-sug button:hover {
  background: var(--sand);
  border-color: var(--line-2);
  color: var(--ink);
}

.chat-in {
  display: flex;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--sand);
}
.chat-in input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: var(--fs-sm);
  transition: border-color 0.2s, background 0.2s;
}
.chat-in input::placeholder { color: var(--muted-2); }
.chat-in input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
}
.chat-in button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.chat-in button:hover { background: var(--accent-hi); transform: scale(1.05); }


/* --- 12. Cómo funciona --------------------------------------------------- */
.steps { counter-reset: s; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  counter-increment: s;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
  padding-block: clamp(26px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.step:hover { background: linear-gradient(90deg, var(--sand) 0%, transparent 62%); }
.step-n {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  padding-top: 5px;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--muted); font-size: var(--fs-sm); max-width: 42ch; }
.step-fig {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--sand);
}
.step-fig img { width: 100%; height: 100%; object-fit: cover; }
.step-fig.empty {
  display: grid;
  place-items: center;
  background: var(--sand);
  position: relative;
}
.step-fig.empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/texture-paper.webp");
  background-size: cover;
  opacity: 0.5;
}

/* --- 13. Donar ----------------------------------------------------------- */
.donate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(30px, 4.4vw, 72px);
  align-items: center;
}
.donate-fig {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand);
  box-shadow: var(--sh-lg);
}
.donate-fig img { width: 100%; height: 100%; object-fit: cover; }

.impact {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.impact-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.impact-row:last-child { border-bottom: 0; }
.impact-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
.impact-row .amt { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.impact-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.donate-note {
  margin-top: 18px;
  font-size: var(--fs-xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* --- 13b. Nuestra historia --------------------------------------------- */
.founders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.founder {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.founder:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.founder-photo {
  aspect-ratio: 1;
  background: var(--sand);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-photo.is-empty {
  background:
    radial-gradient(60% 60% at 50% 40%, var(--sand-2), transparent 70%),
    var(--sand);
}
.founder-initial {
  font-size: clamp(3.4rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--line-2);
  line-height: 1;
}
.founder-body { padding: 18px 20px 22px; display: grid; gap: 4px; }
.founder-role {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.founder-body p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; margin-top: 4px; }

.facts-real .fact { background: var(--paper); }
.facts-real dd { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.facts-real dt { line-height: 1.45; }

.street-note {
  margin-top: clamp(20px, 2.4vw, 30px);
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  max-width: 62ch;
  line-height: 1.55;
}
.street-note a {
  color: var(--accent-lo);
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Respaldo del ecosistema */
.backers {
  margin-top: clamp(34px, 4vw, 54px);
  padding-top: clamp(26px, 3vw, 38px);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}
.backers-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.backers-lede {
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 16px;
}
.backers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.backers-list a {
  display: grid;
  gap: 1px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.backers-list a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.backers-list b {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.022em;
}
.backers-list span {
  font-size: var(--fs-micro);
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
}
.backers-list em {
  font-size: var(--fs-micro);
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

/* --- 13c. Casas voluntarias --------------------------------------------- */
.volunteer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(30px, 4.4vw, 68px);
  align-items: start;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.check input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.fact { background: var(--paper); padding: 26px 22px; display: grid; gap: 6px; }
.fact dt { font-size: var(--fs-xs); color: var(--muted); }
.fact dd {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

/* --- 15. Footer ---------------------------------------------------------- */
.ftr {
  background: var(--sand);
  color: var(--muted);
  padding-block: clamp(48px, 6vw, 78px) clamp(74px, 8vw, 104px);
  font-size: var(--fs-sm);
}
.ftr .logo-mark { height: 28px; }
.ftr .logo-name { color: var(--ink); }
.ftr .logo-tag { color: var(--muted-2); }
.ftr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 52px);
  padding-bottom: clamp(38px, 4.6vw, 58px);
  border-bottom: 1px solid var(--line-2);
}
.ftr h4 {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted-2);
  margin-bottom: 15px;
  font-weight: 600;
}
.ftr li + li { margin-top: 9px; }
.ftr a { transition: color 0.18s; }
.ftr a:hover { color: var(--ink); }
.ftr-bot {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--muted-2);
}
.ftr-bot .social { display: flex; gap: 8px; }
.ftr-bot .social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.ftr-bot .social a:hover { background: var(--sand-2); border-color: var(--line-2); color: var(--ink); }

/* --- 16. Modales --------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(560px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.32s var(--ease-out);
}
.modal.is-open .modal-card { transform: none; }
.modal-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.modal-hd h3 { font-size: 1.1rem; }
.modal-x {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  color: var(--muted);
  flex: none;
  transition: all 0.2s;
}
.modal-x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.modal-bd { padding: 20px; display: grid; gap: 16px; }

.form-row { display: grid; gap: 6px; }
.form-row label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); }
.form-row input,
.form-row select,
.form-row textarea {
  height: 44px;
  padding-inline: 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: var(--fs-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}
.form-row textarea { height: auto; padding: 11px 13px; resize: vertical; min-height: 84px; line-height: 1.5; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 11, 12, 0.07);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: var(--fs-micro); color: var(--muted); line-height: 1.5; }

.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 9px; }
.amount {
  height: 52px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: all 0.18s var(--ease);
  position: relative;
}
.amount:hover { border-color: var(--ink); }
.amount[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.amount small {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: 1px;
}
.custom-amount { position: relative; }
.custom-amount input {
  height: 52px;
  width: 100%;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  padding-left: 30px;
  font-weight: 650;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}
.custom-amount input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 11, 12, 0.07); }
.custom-amount::before {
  content: "$";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
}

.pet-hero-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.pet-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.specs div { background: var(--surface); padding: 12px 14px; }
.specs dt { font-size: var(--fs-micro); color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.specs dd { font-size: var(--fs-sm); font-weight: 600; margin-top: 2px; }

/* --- 17. Toast ----------------------------------------------------------- */
.toasts {
  position: fixed;
  z-index: 120;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 9px;
  max-width: min(370px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  box-shadow: var(--sh-lg);
  animation: toast-in 0.35s var(--ease-out);
}
.toast .t-ok { color: var(--ok); flex: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
}

/* --- 18. Dock del agente ------------------------------------------------- */
.dock-btn {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 20px;
  height: 54px;
  padding-inline: 20px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  font-weight: 550;
  box-shadow: 0 14px 34px -14px rgba(11, 11, 12, 0.6);
  transition: transform 0.22s var(--ease), background 0.22s;
}
.dock-btn:hover { transform: translateY(-2px); background: var(--sand); }
.dock-btn .orb { width: 24px; height: 24px; }
.dock-btn .orb::after { inset: 2.5px; background: var(--surface); }
.dock-btn.is-hidden { transform: translateY(90px); opacity: 0; pointer-events: none; }

.dock {
  position: fixed;
  z-index: 110;
  right: 20px;
  bottom: 20px;
  width: min(400px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 40px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease-out);
}
.dock.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dock .chat-in { border-radius: 0; }

/* --- 19. Revelado al hacer scroll --------------------------------------- */
/* Solo se oculta si hay JS para volver a mostrarlo. Sin JS, todo el sitio
   se ve igual: la animación es un extra, nunca un requisito. */
html.js [data-rv] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.js [data-rv].in { opacity: 1; transform: none; }

/* --- 20. Responsive ------------------------------------------------------ */
@media (max-width: 1080px) {
  /* Con cinco entradas el nav de escritorio ya no cabe en una linea: se
     parte en dos y se ve desordenado. A partir de aqui va el menu hamburguesa. */
  .hdr nav, .hdr-cta .btn-ghost { display: none; }
  .burger { display: flex; }
  /* El boton de accion se va a la derecha, junto al burger: antes quedaba
     pegado al logo con un hueco vacio en el medio. */
  .hdr-cta .btn { margin-left: auto; }
  .burger { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
  .hero-fig { aspect-ratio: 16 / 10; }
  .agent-grid, .donate, .volunteer { grid-template-columns: 1fr; }
  .step { grid-template-columns: 48px minmax(0, 1fr); }
  .step-fig { grid-column: 2; aspect-ratio: 16 / 9; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .logo-tag { display: none; }
  .hdr-in { height: 62px; }
  .g-3, .g-4 { grid-template-columns: 1fr; }
  .g-2 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { padding: 16px 4px; text-align: left; display: flex; justify-content: space-between; align-items: baseline; }
  .hero-stats dd { margin-top: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
  .ftr-grid { grid-template-columns: 1fr; gap: 30px; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
  .dock { right: 12px; left: 12px; width: auto; bottom: 12px; height: min(600px, calc(100vh - 24px)); }
  .dock-btn { right: 12px; bottom: 12px; }
  .dock-btn .lbl { display: none; }
  .dock-btn { padding-inline: 16px; }
  .toasts { left: 12px; right: 12px; bottom: 78px; max-width: none; }
}

/* --- 21. Cara corporativa (/empresas.html) ------------------------------ */
.corp-badge {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--line-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.corp-hero {
  padding-block: clamp(44px, 5.4vw, 84px) clamp(40px, 5vw, 72px);
}
.corp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.corp-hero h1 { margin: 18px 0 0; max-width: 16ch; }
.corp-hero .lede { margin-top: 20px; max-width: 46ch; }
.corp-hero .hero-actions { margin-top: 28px; }
.corp-hero .donate-note { margin-top: 20px; }
.corp-chat-wrap .chat { height: min(540px, 72vh); }

.three-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.three-up article { background: var(--surface); padding: 26px 24px 28px; display: grid; gap: 7px; align-content: start; }
.three-up p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.tu-tag {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

/* El reporte: la pieza que se vende */
.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.rp-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
.rp-period { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rp-title { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.032em; line-height: 1.1; margin: 10px 0 6px; }
.rp-sub { font-size: var(--fs-sm); color: var(--muted); max-width: 48ch; }
.rp-stamp {
  margin-left: auto;
  flex: none;
  padding: 10px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.35;
  transform: rotate(-3deg);
}
.rp-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; }
.rp-rows { padding: clamp(18px, 2.2vw, 26px); display: grid; align-content: start; }
.rp-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.rp-row:last-child { border-bottom: 0; }
.rp-val { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.rp-row b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.rp-row em { display: block; font-size: var(--fs-xs); font-style: normal; color: var(--muted); margin-top: 1px; }
.rp-sample {
  padding: clamp(18px, 2.2vw, 26px);
  border-left: 1px solid var(--line);
  background: var(--sand);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-content: center;
}
.rp-sample figure { margin: 0; }
.rp-sample img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r-sm); background: var(--sand-2); }
/* El reporte que se muestra es un ejemplo. Si no lo decimos, sus números
   se leen como resultados reales y ese es justo el problema del sector. */
.rp-flag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.rp-sample figcaption { font-size: var(--fs-micro); color: var(--muted); margin-top: 6px; text-align: center; font-weight: 600; }
.rp-note {
  padding: 16px clamp(18px, 2.2vw, 26px);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.55;
  background: var(--sand);
}

/* Programas */
.progs { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: clamp(16px, 2vw, 24px); }
.prog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 24px 26px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}
.prog:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.prog-funds { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.prog-gets { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.5; }
.prog-gets span {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
.prog-api {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
  color: var(--muted-2);
  background: var(--sand);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  justify-self: start;
  margin-top: 2px;
}

/* Formulario */
.corp-form { display: grid; gap: 18px; }
.corp-form .form-row > label { display: block; }
.corp-done {
  display: grid;
  gap: 8px;
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ok);
  text-align: center;
  justify-items: center;
}
.corp-done h3 { color: var(--ink); }
.corp-done p { color: var(--ink-soft); }

@media (max-width: 1080px) {
  .corp-hero-grid, .rp-body { grid-template-columns: 1fr; }
  .rp-sample { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .corp-badge { display: none; }
  .rp-row { grid-template-columns: 68px 1fr; gap: 12px; }
  .rp-val { font-size: 1.3rem; }
  .rp-stamp { display: none; }
}

/* --- 22. Rediseño 2026: páginas separadas ------------------------------- */
.hdr nav a.is-active { color: var(--ink); background: var(--sand); }

/* Cabecera de página interior */
.page-head {
  padding-block: clamp(38px, 4.6vw, 68px) clamp(8px, 1.4vw, 20px);
}
.page-head h1 { margin: 16px 0 0; max-width: 17ch; }
.page-head .lede { margin-top: 18px; max-width: 50ch; }

/* El recorrido en 3 pasos */
.journey {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.journey article {
  background: var(--paper);
  padding: clamp(20px, 2.4vw, 30px) clamp(18px, 2.2vw, 26px);
  display: grid;
  gap: 7px;
  align-content: start;
}
.journey .j-n {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.journey p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }

/* Salidas por audiencia: la home deja de hablar con todos a la vez */
.exits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
.exit {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), border-color 0.28s;
}
.exit:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.exit-tag {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.exit p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.exit-go {
  margin-top: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.22s var(--ease);
}
.exit:hover .exit-go { gap: 11px; }

/* Directorio + agente */
/* Directorio: barra lateral a la izquierda, grilla de 4 columnas a la
   derecha, y el agente al final de la página. */
.adopt-layout {
  display: grid;
  grid-template-columns: minmax(212px, 244px) minmax(0, 1fr);
  gap: clamp(22px, 2.6vw, 36px);
  align-items: start;
}
.adopt-main { display: grid; gap: 18px; }
.adopt-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 22px;
}
.side-block { display: grid; gap: 11px; }
.side-title {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.side-count { font-size: var(--fs-xs); color: var(--muted); }
.side-note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; }
.side-note a { color: var(--accent); font-weight: 600; }
.side-cta { padding-top: 18px; border-top: 1px solid var(--line); }

/* Los filtros en la barra lateral son filas, no píldoras. */
.chips-side { display: grid; gap: 1px; }
.chips-side .chip {
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  justify-content: space-between;
  border-color: transparent;
  background: transparent;
  font-size: var(--fs-sm);
}
.chips-side .chip:hover { background: var(--sand); border-color: transparent; color: var(--ink); }
.chips-side .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips-side .chip .n { opacity: 0.55; }

/* El agente, al final: dos columnas y el chat con ancho de lectura. */
.agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(28px, 4.4vw, 72px);
  align-items: center;
}
.agent-tips { display: grid; gap: 9px; margin-top: 4px; }
.agent-tips li {
  position: relative;
  padding-left: 24px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
}
.agent-tips li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 980px) {
  /* Sin barra lateral: los filtros vuelven a ser una fila que se desliza. */
  .adopt-layout { grid-template-columns: 1fr; }
  .adopt-side { position: static; gap: 16px; }
  .chips-side {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .chips-side::-webkit-scrollbar { display: none; }
  .chips-side .chip {
    width: auto;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: var(--r-pill);
    border-color: var(--line-2);
  }
  .side-cta { padding-top: 0; border-top: 0; }
  .agent-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Requisitos */
.req-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.req-list li {
  background: var(--surface);
  padding: 16px 20px;
  font-size: var(--fs-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.req-list li::before {
  content: "";
  width: 17px; height: 17px;
  border-radius: 4px;
  border: 1.5px solid var(--accent);
  flex: none;
  margin-top: 3px;
  position: relative;
}
.req-list li::after {
  content: "";
  position: absolute;
  margin: 6px 0 0 4px;
  width: 6px; height: 3px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

/* Donar: dos columnas de texto */
.give-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.give-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; }
.give-grid p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; margin-top: 6px; }

/* Banda de voluntarios */

/* --- 23. Panel de albergues -------------------------------------------- */
.tut { display: grid; gap: 14px; counter-reset: none; }
.tut-step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.tut-step.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tut-n {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.tut-step.is-current .tut-n { background: var(--accent); }
.tut-body { display: grid; gap: 7px; }
.tut-body p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; max-width: 58ch; }
.tut-body code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.86em;
  background: var(--sand);
  padding: 1px 5px;
  border-radius: 4px;
}
.tut-hint { font-size: var(--fs-micro); color: var(--muted-2); font-weight: 600; }
.tut-do { align-self: center; }

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.6vw, 30px);
}
.panel-aside {
  background: var(--sand);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.4vw, 28px);
}
.panel-notes { display: grid; gap: 13px; margin-top: 14px; }
.panel-notes li {
  position: relative;
  padding-left: 18px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.55;
}
.panel-notes li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.panel-notes b { color: var(--ink); }

.shelter-done {
  display: grid;
  gap: 7px;
  justify-items: start;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ok);
}
.shelter-done h3 { color: var(--ink); }
.shelter-done p { color: var(--muted); }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); align-items: start; }
.format-note {
  background: var(--sand);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}
.format-note b { font-size: var(--fs-xs); }
.format-note code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.74rem;
  color: var(--ink-soft);
  word-break: break-word;
  line-height: 1.5;
}
.bulk-preview {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-xs);
}
.bulk-preview ul { margin-top: 8px; display: grid; gap: 4px; }
.bulk-preview li { color: var(--muted); }
.bulk-preview .warn { color: var(--accent); }

.publish-bar {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 44px);
  flex-wrap: wrap;
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.2vw, 26px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.pb-stat { display: grid; gap: 1px; }
.pb-stat b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.pb-stat span { font-size: var(--fs-micro); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.pb-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.pb-actions .btn-ghost { --btn-fg: var(--ink); --btn-bd: var(--line-2); --btn-bg: var(--sand); }
.pb-actions .btn-ghost:hover { --btn-bg: var(--sand-2); --btn-bd: var(--line-2); }

.catalog-list { display: grid; }
.cat-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cat-item:last-child { border-bottom: 0; }
.cat-thumb {
  width: 76px; height: 76px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--sand);
  display: grid;
  place-items: center;
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-initial { font-size: 1.9rem; font-weight: 700; color: var(--line-2); letter-spacing: -0.04em; }
.cat-info h4 { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.022em; margin-bottom: 2px; }
.cat-info p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

/* Mismo placeholder en la tarjeta pública: sin foto no inventamos una */
.pet-img.no-photo {
  display: grid;
  place-items: center;
  background: var(--sand);
}
/* Solo el monograma. Antes esta regla era `.pet-img.no-photo span`, y se
   comía el estilo de los badges de edad y de refugio: quedaban gigantes. */
.pet-img.no-photo .pet-initial {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--line-2);
  letter-spacing: -0.04em;
}
.pet-from {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 4px 9px;
  border-radius: var(--r-xs);
  background: rgba(11, 11, 12, 0.72);
  color: var(--paper);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* --- 24. Vista previa ---------------------------------------------------- */
.preview-banner {
  background: var(--accent);
  color: #fff;
  padding: 11px 20px;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.preview-banner a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1080px) {
  .adopt-layout, .panel-grid, .upload-grid, .give-grid { grid-template-columns: 1fr; }
  .adopt-agent { position: static; }
  .tut-step { grid-template-columns: 40px minmax(0, 1fr); }
  .tut-do { grid-column: 2; }
}
@media (max-width: 760px) {
  .pb-actions { margin-left: 0; width: 100%; }
  .cat-item { grid-template-columns: 56px minmax(0, 1fr); }
  .cat-thumb { width: 56px; height: 56px; }
  .cat-actions { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-rv] { opacity: 1; transform: none; }
  .hero h1 .hl::after { transform: scaleX(1); }
}
@media print {
  .hdr, .dock, .dock-btn, .ftr, .agent-band { display: none; }
}
/* --- 25. Vista previa: comparativo de precios y directorio --------------- */
.prev-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.55;
}
.prev-note b { color: var(--ink); font-weight: 600; }

/* Tabla de rangos */
.range-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.range-table th {
  text-align: left;
  font-size: var(--fs-micro);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
.range-table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.range-table tr:last-child td { border-bottom: 0; }
.rt-name { font-weight: 600; }
.rt-note { display: block; font-size: var(--fs-micro); color: var(--muted); margin-top: 3px; line-height: 1.45; }
.rt-price { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.rt-bar { width: 100%; min-width: 130px; }

/* La barra: el rango real dibujado sobre la escala completa */
.bar-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: var(--sand);
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.85;
}
.bar-tick {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 1px;
  background: var(--ink);
  opacity: 0.28;
}

/* Directorio de clínicas */
.vet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 14px; }
.vet-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.vet-card h3 { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.022em; line-height: 1.3; }
.vet-where { font-size: var(--fs-micro); color: var(--muted); letter-spacing: 0.02em; }
.vet-rows { display: grid; gap: 5px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.vet-rows b { color: var(--ink); font-weight: 500; }
.vet-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }
.vet-tag {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--sand);
  color: var(--muted);
}
.vet-tag.is-24 { background: var(--accent); color: #fff; }
.vet-src { font-size: 0.62rem; color: var(--line-2); letter-spacing: 0.02em; margin-top: 2px; }

/* Marketplace */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.prod-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prod-brand { font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.prod-card h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.prod-size { font-size: var(--fs-xs); color: var(--muted); }
.prod-offers { display: grid; gap: 6px; margin-top: 2px; }
.offer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: var(--fs-xs);
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.offer:last-child { border-bottom: 0; padding-bottom: 0; }
.offer-store { color: var(--muted); }
.offer-price { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.offer-price small { font-weight: 500; color: var(--muted); }
.prod-range {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding-top: 4px;
}
.prod-range b { font-size: 1.12rem; color: var(--ink); font-weight: 700; letter-spacing: -0.03em; }
.prod-note { font-size: var(--fs-micro); color: var(--muted); line-height: 1.5; }

.store-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.store-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface); }
.store-item b { display: block; font-size: var(--fs-sm); font-weight: 650; margin-bottom: 3px; }
.store-item span { display: block; font-size: var(--fs-micro); color: var(--muted); line-height: 1.5; }
.store-item em { display: block; font-size: var(--fs-micro); color: var(--line-2); font-style: normal; margin-top: 3px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.filter-row .lbl { font-size: var(--fs-micro); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 4px; }

@media (max-width: 760px) {
  .range-table thead { display: none; }
  .range-table tr { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .range-table td { border: 0; padding: 0; }
}

/* Con el chat completo en la página, el botón flotante estorba y tapa. */
@media (min-width: 1081px) {
  body.has-inline-chat .dock-btn { display: none; }
}

/* El botón flotante tapa lo último de la página al hacer scroll al final.
   Este espacio deja que todo el contenido se pueda leer. */
@media (max-width: 760px) {
  body:has(.dock-btn) main { padding-bottom: 92px; }
  body:has(.dock-btn) .ftr { padding-bottom: 92px; }
}

/* --- 26. El comedero: video de fondo, fotos y guía de medidas ------------ */
/* El video vive dentro de un bloque .showcase, a su propio tamaño. Antes
   estaba detrás de un H1 y por eso era absoluto; aquí es un hijo en flujo. */
.vol-bg {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 10;
  object-fit: cover;
  object-position: 62% center;
  background: var(--sand);
}

/* Pausa del video de fondo: el movimiento automático y perpetuo tiene que
   poderlo cortar cualquiera. */
.vol-pause {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 10px;
  border-radius: 99px;
  border: 1px solid rgba(251, 250, 247, 0.24);
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(8px);
  color: rgba(251, 250, 247, 0.82);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.vol-pause:hover { background: rgba(11, 11, 12, 0.8); color: var(--paper); border-color: rgba(251, 250, 247, 0.45); }
.vol-pause svg { width: 11px; height: 11px; }
.vol-pause .ico-play { display: none; }
.vol-pause.is-paused .ico-play { display: block; }
.vol-pause.is-paused .ico-pause { display: none; }

/* Las fotos del kit */
.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.kit-fig { margin: 0; }
.kit-fig:nth-child(1),
.kit-fig:nth-child(4) { grid-column: span 2; }
.kit-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--sand);
  height: auto;
}
.kit-fig figcaption {
  margin-top: 11px;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  max-width: 44ch;
}
.kit-fig figcaption b { color: var(--ink); font-weight: 600; }

/* Guía de medidas */
.med-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(26px, 4vw, 58px); align-items: start; }
.spec-list { margin: 24px 0 0; border-top: 1px solid var(--line); }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 22px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list dt { font-size: var(--fs-sm); color: var(--muted); }
.spec-list dd { margin: 0; font-size: var(--fs-sm); font-weight: 650; text-align: right; letter-spacing: -0.01em; }
.spec-list dd span { font-weight: 400; color: var(--muted); }

.dg {
  margin: 26px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 18px 14px;
}
.dg svg { display: block; width: 100%; height: auto; }
.dg-cap {
  margin: 8px 0 0;
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.5;
}
.dg .dg-plate { fill: #3b4046; }
.dg .dg-hole { fill: var(--surface); }
.dg .dg-wall { fill: var(--sand); }
.dg .dg-wall-line { stroke: var(--line-2); stroke-width: 1.4; }
.dg .dg-steel { fill: url(#dgSteel); }
.dg .dg-bowl-line { fill: none; stroke: #9aa1a8; stroke-width: 1.2; }
.dg .dg-dim { stroke: var(--line-2); stroke-width: 1.2; }
.dg .dg-dim-text { fill: var(--ink); font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.dg .dg-dim-sub { fill: var(--muted); font-size: 11px; font-weight: 500; }
.dg .dg-label { fill: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }

.med-photo { margin: 0; }
.med-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--sand);
  height: auto;
}
.med-photo figcaption { margin-top: 11px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

@media (max-width: 1080px) {
  .kit-grid { grid-template-columns: repeat(2, 1fr); }
  .kit-fig:nth-child(1),
  .kit-fig:nth-child(4) { grid-column: span 2; }
  .med-grid { grid-template-columns: 1fr; }
  .med-photo img { aspect-ratio: 16 / 10; }
}
@media (max-width: 620px) {
  .kit-grid { grid-template-columns: 1fr; }
  .kit-fig:nth-child(1),
  .kit-fig:nth-child(4) { grid-column: span 1; }
  .vol-bg { object-position: 74% center; }
}
@media (prefers-reduced-motion: reduce) {
  .vol-bg { display: none; }
  .showcase.is-video { background: var(--sand) url("../img/comedero-hero.webp") 62% center / cover no-repeat; }
  .vol-pause { display: none; }
}

/* --- 27. Sistema de módulos ---------------------------------------------- */
/* El contenido va en tarjetas sobre blanco o gris, no en bloques oscuros.
   Cada módulo es una idea, y los módulos se leen en rejilla. */
.section-alt { background: var(--sand); }
.section-line { border-top: 1px solid var(--line); }

.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}
.mod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.5vw, 30px);
  display: grid;
  gap: 9px;
  align-content: start;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.mod:hover, .mod.is-link:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.mod h3 { font-size: 1.16rem; font-weight: 600; letter-spacing: -0.024em; line-height: 1.28; }
.mod p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.58; }
.mod .j-n,
.mod .mod-n {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.mod .mod-go { margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
.mod .mod-tag {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}
.mod .mod-tag.is-quiet { color: var(--muted-2); }

/* Un módulo con imagen arriba. La imagen es parte del módulo, no un bloque suelto. */
.mod-media {
  margin: -6px 0 4px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--sand);
}
.mod-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; height: auto; }
.mod-media.is-wide img { aspect-ratio: 16 / 9; }

/* Módulo que es un enlace. */
a.mod { color: inherit; text-decoration: none; }
a.mod .mod-go { display: inline-flex; align-items: center; gap: 7px; }
a.mod:hover .mod-go { gap: 11px; }
.mod-go { transition: gap 0.25s var(--ease); }

/* Dos columnas: el encabezado a la izquierda, el contenido a la derecha.
   Sirve para que una sección no quede flotando en el centro de la página. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.4vw, 72px);
  align-items: start;
}
.split .sec-head { margin-bottom: 0; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split .sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
}

/* La banda de retratos: seis fotos de estudio, y el color que cada una trae.
   Es la única parte del sitio que no es blanca, y a propósito. */
.portraits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.portrait {
  display: grid;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}
.portrait-img {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--sand);
  aspect-ratio: 3 / 4;
}
.portrait-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}
.portrait:hover .portrait-img img { transform: scale(1.05); }
.portrait-cap {
  display: grid;
  gap: 1px;
  padding-left: 2px;
}
.portrait-name {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.022em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.portrait.has-tint .portrait-name::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pet-color);
}
.portrait-age {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.portraits-cta { margin-top: 30px; }
@media (max-width: 1000px) {
  .portraits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; }
}
@media (max-width: 560px) {
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- 28. El registro de refugios ----------------------------------------- */
/* Las fichas sin reclamar son datos de terceros: solo lo que esa
   organización publica de sí misma. Nunca animales, nunca retratos. */
.shelter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 16px;
}
/* La tarjeta tiene grupos, no un solo gap: identidad, contacto y accion se
   separan con distancia distinta. Un unico gap para todo la deja desordenada. */
.shelter {
  position: relative;
  display: grid;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
/* La miniatura de la portada: hace que el directorio se lea como un
   conjunto de paginas, no como una tabla de fichas. */
.shelter-cover {
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--sand);
}
.shelter-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  display: block;
  transition: transform 0.7s var(--ease-out);
}
.shelter:hover { border-color: var(--line-2); }
.shelter:hover .shelter-cover img { transform: scale(1.04); }
.shelter:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.shelter-body { padding: 20px; }

/* El enlace se estira sobre toda la ficha: se hace clic en la portada, en
   el nombre o en la descripción, y siempre se entra al perfil del refugio.
   Por eso la ficha no lleva botones. */
.shelter-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.shelter-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  color: inherit;
  text-decoration: none;
}
.shelter-link:hover .shelter-name { color: var(--accent); }
.shelter-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 9px;
  min-width: 0;
}
.shelter-name {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.024em;
  line-height: 1.25;
}
.shelter-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border: 3px solid var(--surface);
  box-shadow: var(--sh-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}
/* El estado va junto al nombre, no flotando: asi nunca se encima con el
   texto ni depende de como de largo sea. */
.shelter-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--sand);
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.shelter-badge.is-claimed {
  background: var(--accent-soft);
  color: var(--accent);
}
.shelter-place {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.shelter-what {
  grid-column: 1 / -1;
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
}
.shelter-fix {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
}
.shelter-fix:hover { color: var(--ink); }
.shelter-src { font-size: var(--fs-micro); color: var(--muted-2); margin: 11px 0 0; }

/* El reclamo, paso a paso. */
.claim-lead { font-size: var(--fs-sm); color: var(--ink-soft); }
.claim-steps { display: grid; gap: 10px; margin: 16px 0 20px; padding-left: 0; list-style: none; counter-reset: cs; }
.claim-steps li {
  position: relative;
  padding-left: 30px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
  counter-increment: cs;
}
.claim-steps li::before {
  content: counter(cs);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.claim-steps b { color: var(--ink); }
.claim-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.claim-code { display: grid; gap: 8px; }
.claim-code label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.claim-code-row { display: flex; gap: 8px; flex-wrap: wrap; }
.claim-code-row input {
  flex: 1;
  min-width: 160px;
  height: 42px;
  padding-inline: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.claim-code-row input:focus { outline: none; border-color: var(--ink); }
.form-note.is-warn { color: var(--accent); }

/* El aviso de ficha reclamada, en el panel. */
.claim-ok {
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.5;
  max-width: 52ch;
}

/* --- 29. La fan page de cada organización ------------------------------- */
/* Es una página de perfil, no una ficha: portada, avatar, pestañas y un
   sidebar con la información y el reclamo. */
.fp-crumb { margin-bottom: 18px; font-size: var(--fs-sm); }
.fp-crumb a { color: var(--muted); }
.fp-crumb a:hover { color: var(--ink); }

/* Un solo eje vertical para toda la pagina: el nombre, las pestañas y el
   contenido arrancan en el mismo punto. Asi el ojo no salta de columna.
   Las variables van en :root porque .fp-body es hermano de .fp-page: si
   vivieran en .fp-page, el padding del cuerpo seria invalido y no se
   aplicaria — y la pagina se veria desordenada sin saber por que. */
:root {
  --fp-pad: 22px;
  --fp-avatar: 92px;
  --fp-gap: 18px;
  --fp-axis: calc(var(--fp-pad) + var(--fp-avatar) + var(--fp-gap));
}
.fp-page {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
}
.fp-cover {
  position: relative;
  height: clamp(132px, 16vw, 200px);
  overflow: hidden;
  background: var(--sand);
}
.fp-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* La foto es 21:9 y la caja es mas baja: se recorta la banda central,
     donde esta el animal. */
  object-position: center 26%;
  display: block;
}
.fp-cover-in { position: absolute; inset: 0; display: grid; place-items: center; }
/* La inicial va en un tono de la misma familia que la portada: asi se lee
   igual de bien sobre un amarillo claro que sobre un verde azulado. */
.fp-cover-mark {
  font-size: clamp(3.6rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(29, 29, 31, 0.07);
  line-height: 1;
  transform: translateY(6%);
}

.fp-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: var(--fp-gap);
  padding: 16px var(--fp-pad) 20px;
  background: var(--paper);
}
/* El avatar se sube sobre la portada, como en una pagina de verdad. */
.fp-avatar {
  flex: none;
  /* Con align-items: flex-end el margen negativo no mueve el item: hay que
     desplazarlo a proposito. relative + top lo sube sin tocar el flujo. */
  position: relative;
  top: -46px;
  width: var(--fp-avatar); height: var(--fp-avatar);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  border: 4px solid var(--paper);
  box-shadow: var(--sh-md);
}
.fp-head-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 4px;
  min-width: 0;
}
.fp-id { display: grid; gap: 5px; min-width: 0; }
.fp-name {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.fp-kind { font-size: var(--fs-sm); color: var(--muted); }
.fp-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.fp-claimed {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.fp-tabs {
  display: flex;
  gap: 2px;
  padding: 0 var(--fp-pad) 0 var(--fp-axis);
  border-top: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
  scrollbar-width: none;
}
.fp-tabs::-webkit-scrollbar { display: none; }
.fp-tab {
  position: relative;
  border: 0;
  background: none;
  padding: 12px 16px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.fp-tab:hover { color: var(--ink); }
.fp-tab.is-on { color: var(--ink); }
.fp-tab.is-on::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.fp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: clamp(28px, 3.4vw, 48px);
  padding: 32px var(--fp-pad) 88px;
  align-items: start;
}
.fp-main { display: grid; gap: 22px; }
.fp-panel { display: none; }
.fp-panel.is-on { display: grid; gap: 14px; }
.fp-about { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.62; max-width: 62ch; }
.fp-src { font-size: var(--fs-xs); color: var(--muted); }
.fp-empty {
  display: grid;
  gap: 10px;
  padding: clamp(24px, 3vw, 40px);
  background: var(--sand);
  border-radius: var(--r-md);
}
.fp-empty p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; max-width: 60ch; }
.fp-empty a { color: var(--accent); font-weight: 600; }
.fp-cta {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--sand);
  border-radius: var(--r-md);
}
.fp-cta p { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; max-width: 58ch; }

.fp-side { display: grid; gap: 14px; }
.fp-side-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.fp-side-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fp-side-card--claim { background: var(--sand); border-color: transparent; }
.fp-side-text { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.fp-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-xs);
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.fp-info-row:last-child { border-bottom: 0; }
.fp-info-row > span:first-child { color: var(--muted-2); flex: none; }
.fp-info-row a { color: var(--ink); overflow-wrap: break-word; text-align: right; }
.fp-info-row a:hover { color: var(--accent); }
.fp-ok { color: var(--ok); font-weight: 600; text-align: right; }
.fp-pending { color: var(--muted); font-weight: 600; text-align: right; }
.fp-none { font-size: var(--fs-xs); color: var(--muted-2); }
.fp-fix {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
  justify-self: start;
}
.fp-fix:hover { color: var(--ink); }

/* El reclamo de la portada: un enlace, para no competir con el boton del
   sidebar. El boton esta arriba. */
/* Los tres pasos de lo que pasa al reclamar. */
.fp-what {
  display: grid;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.fp-what .h3 { margin: 0; }
.fp-steps { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; counter-reset: fs; }
.fp-steps li {
  position: relative;
  padding-left: 30px;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.55;
  counter-increment: fs;
}
.fp-steps li::before {
  content: counter(fs);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.fp-steps b { color: var(--ink); }

.fp-claim-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}
.fp-claim-link:hover { border-color: var(--accent); }

.fp-pets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}
.fp-pet { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.fp-pet-img {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--sand);
}
.fp-pet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-pet-img--mono {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--line-2);
}
.fp-pet-name { font-size: var(--fs-sm); font-weight: 600; }

@media (max-width: 820px) {
  .fp-body { grid-template-columns: 1fr; }
  .fp-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .fp-head-in { grid-template-columns: 1fr; gap: 14px; width: 100%; }
  .fp-actions { justify-content: flex-start; }
  .fp-avatar { width: 76px; height: 76px; font-size: 2rem; top: -38px; }
  .fp-tabs { padding-left: var(--fp-pad); }
  .fp-body { padding-bottom: 96px; }
}

/* La nota que enlaza al registro, debajo de la rejilla de la portada. */
.shelter-note {
  margin-top: 26px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.shelter-note a { color: var(--accent); font-weight: 600; border-bottom: 1px solid var(--accent-soft); }
.shelter-note a:hover { border-color: var(--accent); }
.shelter-note svg { vertical-align: -2px; margin-right: 4px; }

/* El bloque con la ley. */
.law-note {
  margin-top: clamp(30px, 3.6vw, 52px);
  padding: clamp(22px, 2.6vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.law-note h3 { margin: 0 0 12px; }
.law-note p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.62; }
.law-note p + p { margin-top: 12px; }

/* --- 30. La app en el celular ------------------------------------------- */
/* Lo que hace que una web se sienta como app no es el color: es la
   estructura. Barra de pestanas abajo, hojas que suben, respuesta al toque
   y respeto por la zona segura del telefono. */

/* La barra de pestanas: la senal de que esto se usa con el pulgar. */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: none;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 6px 0 4px;
  color: var(--muted-2);
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--ink); }
.tab.is-on svg { stroke-width: 2.1; }
.tab:active { transform: scale(0.9); }

/* Al ocultar la barra, el dock del agente sube para no quedar debajo. */
@media (max-width: 760px) {
  .tabbar { display: flex; }
  .hdr .burger { display: none; }
  .dock-btn { display: none; }
  .dock { bottom: calc(66px + env(safe-area-inset-bottom)); }
  /* El contenido no puede quedar tapado por la barra. */
  .ftr { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* El menu como hoja: sube desde abajo, con su tirador. */
body.sheet-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(11, 11, 12, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.24s var(--ease) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1080px) {
  /* El menu es una hoja que sube desde abajo en todo el rango del burger.
     Antes vivia dentro del header y caia como desplegable; al sacarlo del
     header se convertio en hoja, y asi se queda en los dos casos. */
  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 200;
    display: block;
    transform: translateY(101%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
    border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    background: var(--paper);
    padding: 8px 20px calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.16);
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.sheet-open .mobile-nav { transform: translateY(0); }
  .mobile-nav::before {
    content: "";
    display: block;
    width: 38px; height: 4px;
    margin: 4px auto 12px;
    border-radius: 99px;
    background: var(--line-2);
  }
  .mobile-nav a {
    padding: 14px 2px;
    font-size: 1.06rem;
  }
}

@media (max-width: 760px) {
  /* Los modales tambien son hojas: suben desde abajo. */
  .modal {
    place-items: end stretch;
    padding: 0;
    background: rgba(11, 11, 12, 0.42);
  }
  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal.is-open .modal-card { transform: translateY(0); }
  .modal-bd { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* Respuesta al toque: lo que se toca tiene que sentirse tocado. */
.btn, .tab, .chip, .pet, .shelter, .mod, .fp-pet, .m3, .m4 {
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .chip:active, .tab:active { transform: scale(0.96); }
.pet:active, .shelter:active, .mod:active, .fp-pet:active { opacity: 0.86; }
.pet, .shelter, .mod, .fp-pet { transition: opacity 0.16s var(--ease); }

/* El header se esconde al bajar y vuelve al subir, como en una app. */
.hdr {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.hdr.is-hidden { transform: translateY(-100%); }

/* --- 31. El ciclo de adopción -------------------------------------------- */
/* La cuenta de la adoptive, sus postulaciones, la fila de hitos y el panel
   del refugio. Todo con la misma escala que el resto del sitio. */

/* Buscador */
.search-form { display: grid; gap: 8px; }
.search-form .form-row { display: flex; gap: 6px; }
.search-form input,
.search-form select {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding-inline: 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
}
.search-form input:focus,
.search-form select:focus { outline: none; border-color: var(--ink); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* La tarjeta de la cuenta, en el sidebar */
.acct-name { font-size: 1rem; font-weight: 650; letter-spacing: -0.02em; }
.acct-mail { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.acct-facts { margin-top: 12px; display: grid; gap: 7px; }
.acct-facts > div { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-xs); }
.acct-facts dt { color: var(--muted-2); }
.acct-facts dd { color: var(--ink); text-align: right; }

/* Una postulacion */
.app-row,
.post-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: 10px;
}
.app-main, .post-main { display: grid; gap: 5px; min-width: 0; flex: 1; }
.app-top, .post-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-pet { font-weight: 650; letter-spacing: -0.02em; }
.app-estado {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.app-estado.es-espera { background: var(--sand); color: var(--muted); }
.app-estado.es-lista { background: var(--accent-soft); color: var(--accent); }
.app-estado.es-no { background: var(--sand); color: var(--muted-2); }
.app-ref, .post-quien { font-size: var(--fs-xs); color: var(--muted); }
.app-nota, .post-nota { font-size: var(--fs-xs); color: var(--muted-2); }
.app-id {
  flex: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--fs-micro);
  color: var(--muted-2);
  background: var(--sand);
  padding: 3px 7px;
  border-radius: var(--r-xs);
}
.post-acciones { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.post-seccion {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 26px 0 0;
}
.post-vacio { font-size: var(--fs-sm); color: var(--muted); margin-top: 18px; }

/* El impacto: cuatro numeros, arriba de las postulaciones */
.impact-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: 4px;
}
.impact-cell { background: var(--surface); padding: 20px 22px; display: grid; gap: 4px; }
.impact-cell b {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.impact-cell span { font-size: var(--fs-xs); color: var(--muted); }

/* Una adopcion con su linea de hitos */
.adopcion {
  margin-top: 12px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.adopcion-head { display: flex; align-items: center; gap: 13px; }
.adopcion-img {
  flex: none;
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--sand);
}
.adopcion-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adopcion-img--mono { display: grid; place-items: center; font-weight: 700; color: var(--line-2); }
.adopcion-id { flex: 1; min-width: 0; }
.adopcion-name { font-weight: 650; letter-spacing: -0.02em; }
.adopcion-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

.hitos { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.hito {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.hito-dia {
  flex: none;
  width: 42px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.hito-txt { color: var(--muted); }
.hito.hecho .hito-dia { color: var(--ok); }
.hito.hecho .hito-txt { color: var(--ink); }
.hito.hecho .hito-txt em { display: block; font-style: normal; font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; }
.hito.vencido .hito-dia { color: var(--accent); }
.hito.pendiente .hito-txt { color: var(--muted-2); }

/* La postulacion que pide cuenta */
.apply-account {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--sand);
  border-radius: var(--r-md);
}
.apply-account p { font-size: var(--fs-sm); color: var(--ink-soft); }

@media (max-width: 760px) {
  .impact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-row, .post-row { flex-direction: column; gap: 10px; }
  .post-acciones { width: 100%; }
  .post-acciones .btn { flex: 1; }
}

/* --- 32. El álbum de cada mascota --------------------------------------- */
/* Las fotos que sube el dueño. El retrato de estudio es la foto de
   perfil; el album es la vida real de la mascota. */
.pet-album { display: grid; gap: 12px; }
.pet-album .h3 { margin: 0; }
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.fp-fotos { display: flex; gap: 5px; align-items: center; margin-top: 8px; }
.fp-fotos .album-item { width: 46px; height: 46px; flex: none; }
.fp-fotos-mas {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-xs);
  background: var(--sand);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.fp-pet { display: grid; align-content: start; gap: 8px; }
.fp-pet-link { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.fp-pet-estado {
  justify-self: start;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.album-item {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--sand);
  cursor: pointer;
  aspect-ratio: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.album-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-item:hover { transform: translateY(-2px); border-color: var(--ink); }
.album-item:active { transform: scale(0.96); }

.modal-card--foto { position: relative; padding: 0; background: transparent; box-shadow: none; }
.modal-card--foto #foto-grande {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--r-lg);
  background: var(--ink);
}
.modal-x--flot {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

/* La vista previa de lo que se acaba de subir */
.foto-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.foto-strip img {
  width: 62px; height: 62px;
  object-fit: cover;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
}
.cat-estado {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.cat-fotos { font-size: var(--fs-xs); color: var(--muted-2); }

/* En el perfil de una organización no va el botón flotante del agente: es
   una página de perfil, y el botón terminaba encima del sidebar. */
.pagina-refugio .dock-btn { display: none; }

/* El agente en su propia sección: el chat va centrado y con ancho de lectura. */
.chat-panel { max-width: 560px; margin-inline: auto; }

/* Módulo con icono (emoji) y con precio. */.mod-ico {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--sand);
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 4px;
}
.mod-price {
  display: grid;
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.mod-price small {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 3px;
}

/* Hero minimalista: aire, un titular, una línea, una acción. */
.hero-simple { padding-block: clamp(64px, 9vw, 128px) clamp(40px, 5vw, 72px); }
.hero-simple-in { display: grid; gap: 22px; justify-items: start; }
.hero-simple .display { max-width: 17ch; }
.hero-simple .lede { max-width: 40ch; }
.hero-simple .hero-actions { margin-top: 8px; }
.hero-simple .donate-note { margin-top: 4px; }
/* Un hero más corto, para páginas que ya tienen mucho contenido arriba. */
.hero-simple.is-tight { padding-block: clamp(52px, 6vw, 84px) clamp(32px, 4vw, 56px); }
/* Centrado, para las portadas: el titular al medio y la imagen debajo. */
.hero-simple.is-center .hero-simple-in { justify-items: center; text-align: center; }
.hero-simple.is-center .display { max-width: 18ch; }
.hero-simple.is-center .lede { max-width: 46ch; }
.hero-simple.is-center .donate-note { justify-content: center; }

/* Bloque de medio a sangre: la imagen o el video se lucen solos. */
.showcase {
  margin: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--sh-lg);
}
.showcase img, .showcase video { width: 100%; display: block; }
/* El atributo height="…" del HTML se vuelve height:934px en la hoja de
   estilos y anula el aspect-ratio. Sin height:auto la imagen no se recorta
   a la banda 21:10 que queremos. */
.showcase img { aspect-ratio: 21 / 10; object-fit: cover; height: auto; }
.showcase figcaption {
  padding: 16px 4px 0;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.55;
}
.showcase.is-video { position: relative; }
.showcase.is-video video { aspect-ratio: 21 / 10; object-fit: cover; }
.showcase.is-video figcaption {
  position: absolute;
  left: 20px; bottom: 18px;
  right: 20px;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  font-size: var(--fs-xs);
}

/* Encabezado de sección: título y bajada, nada más. */
.sec-head.is-center { justify-items: center; text-align: center; }
.sec-head.is-center .lede { margin-inline: auto; }

/* Rejilla de cifras */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat-row > div { background: var(--surface); padding: clamp(24px, 3vw, 36px); }
.stat-row dt { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.stat-row dd {
  margin: 10px 0 0;
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

@media (max-width: 760px) {
  .mod-grid { grid-template-columns: 1fr; }
  .showcase { border-radius: var(--r-lg); }
}

/* --- 33. La banda de adoptados ------------------------------------------ */
/* Los que ya tienen hogar. Van mas chicos y con su propia banda: es la
   prueba de que el directorio funciona, no un catalogo mas. */
.portraits-adoptados {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 16px;
}
.portraits-adoptados .portrait {
  flex: none;
  width: 196px;
}
.portrait-flag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.2;
}
@media (max-width: 560px) {
  .portraits-adoptados .portrait { width: calc(50% - 8px); }
}
