/* ==========================================================================
   Mi Sano Precio — Design System "Agua & Mandarina" (liquid glass)
   Lean custom CSS (no Bootstrap). Documented in WebApp/DESIGN.md.
   Sections:
     1. Fonts            2. Tokens (light/dark)   3. Base & reset
     4. Layout           5. Ambient background    6. Glass surfaces
     7. Buttons & pills  8. Chips / tags / badges / segmented
     9. Inputs & search  10. Cards & bento         11. Skeleton, toasts, spinner
     12. Ads             13. Nav                   14. Footer & disclaimer
     15. Home            16. Search results        17. News / article / prose
     17b. Covers, in-feed ads, content/legal pages
     18. Breadcrumbs & pagination  19. Empty states  20. Motion & reveal
     21. Utilities       22. Accessibility & fallbacks
     23. Admin (private /admin/…: KPI tiles, cost chart, tables)
   ========================================================================== */

/* 1. Fonts (SIL OFL 1.1 — see /fonts/OFL-*.txt) ------------------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokens ------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Brand scales */
  --jade-50:  #E8F7F4;
  --jade-100: #C9EEE7;
  --jade-300: #7FD8CB;
  --jade-400: #3CC4B2;
  --jade-500: #14998D;
  --jade-600: #0E7C74;
  --jade-700: #0A6660;
  --jade-900: #0B2B2E;
  --tang-100: #FFE6D6;
  --tang-300: #FFB98F;
  --tang-400: #FF8A4C;
  --tang-500: #FF6A2B;
  --tang-700: #A8400F;
  --lilac-100: #ECE9FF;
  --lilac-300: #C3B9FF;
  --lilac-500: #7C6CF2;
  --lilac-700: #5240C8;
  --sand: #F4F1EA;

  /* Semantic colours (light — primary mode) */
  --bg: var(--sand);
  --surface-solid: #FFFFFF;
  --text: #0B2B2E;
  --text-2: #4A6366;
  --text-3: #56706F;
  --primary: #0E7C74;
  --primary-hover: #0B6B64;
  --on-primary: #FFFFFF;
  --link: #0A6660;
  --accent: #FF8A4C;
  --accent-2: #FFB05A;
  --on-accent: #2B1205;
  --accent-text: #A8400F;
  --ai: #5240C8;
  --ai-soft: rgba(124, 108, 242, .12);
  --ai-edge: rgba(124, 108, 242, .45);
  --danger: #B42318;
  --danger-soft: rgba(180, 35, 24, .08);
  --success: #0A6660;
  --success-soft: rgba(14, 124, 116, .10);
  --line: rgba(11, 43, 46, .10);
  --line-strong: rgba(11, 43, 46, .18);
  --focus: #0E7C74;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, .56);
  --glass-bg-strong: rgba(255, 255, 255, .78);
  --glass-bg-soft: rgba(255, 255, 255, .36);
  --glass-fallback: rgba(250, 248, 243, .96);
  --glass-edge-1: rgba(255, 255, 255, .95);
  --glass-edge-2: rgba(255, 255, 255, .18);
  --glass-blur: 22px;
  --glass-sat: 180%;
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(255, 255, 255, .25);
  --sheen: rgba(255, 255, 255, .55);

  /* Elevation */
  --shadow-color: 180 40% 15%;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / .06), 0 2px 6px hsl(var(--shadow-color) / .05);
  --shadow-md: 0 2px 4px hsl(var(--shadow-color) / .05), 0 12px 28px -8px hsl(var(--shadow-color) / .14);
  --shadow-lg: 0 4px 10px hsl(var(--shadow-color) / .05), 0 28px 60px -14px hsl(var(--shadow-color) / .24);
  --glow-primary: 0 10px 28px -8px rgba(14, 124, 116, .55);
  --glow-accent: 0 12px 32px -8px rgba(255, 106, 43, .5);

  /* Ambient mesh */
  --mesh-1: #9FE5DA;
  --mesh-2: #FFC6A1;
  --mesh-3: #D3CBFF;
  --mesh-4: #BDE6FF;
  --dot: rgba(11, 43, 46, .07);
  --skeleton: rgba(11, 43, 46, .07);

  /* Type */
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .78rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --fs-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  --fs-hero: clamp(2.6rem, 1.5rem + 4.6vw, 5.1rem);

  /* Shape */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Space */
  --s-1: .25rem;  --s-2: .5rem;  --s-3: .75rem; --s-4: 1rem;  --s-5: 1.5rem;
  --s-6: 2rem;    --s-7: 3rem;   --s-8: 4rem;   --s-9: 6rem;
  --container: 1200px;
  --gutter: clamp(1rem, .6rem + 2vw, 2rem);
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --nav-h: 60px;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 450ms;
  --dur-4: 800ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061719;
    --surface-solid: #133436;
    --text: #E7F4F1;
    --text-2: #A4BEBA;
    --text-3: #8BA7A3;
    --primary: #4FD1C1;
    --primary-hover: #74E0D3;
    --on-primary: #032321;
    --link: #74E0D3;
    --accent: #FF9A62;
    --accent-2: #FFC07A;
    --on-accent: #2B1205;
    --accent-text: #FFB089;
    --ai: #B3A8FF;
    --ai-soft: rgba(169, 156, 255, .14);
    --ai-edge: rgba(169, 156, 255, .45);
    --danger: #FF8A80;
    --danger-soft: rgba(255, 138, 128, .10);
    --success: #74E0D3;
    --success-soft: rgba(79, 209, 193, .12);
    --line: rgba(231, 244, 241, .10);
    --line-strong: rgba(231, 244, 241, .18);
    --focus: #74E0D3;

    --glass-bg: rgba(16, 46, 48, .55);
    --glass-bg-strong: rgba(12, 36, 38, .82);
    --glass-bg-soft: rgba(255, 255, 255, .05);
    --glass-fallback: rgba(10, 30, 32, .97);
    --glass-edge-1: rgba(255, 255, 255, .34);
    --glass-edge-2: rgba(255, 255, 255, .04);
    --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .25);
    --sheen: rgba(255, 255, 255, .12);

    --shadow-color: 190 70% 2%;
    --glow-primary: 0 10px 28px -8px rgba(79, 209, 193, .35);
    --glow-accent: 0 12px 32px -8px rgba(255, 138, 76, .35);

    --mesh-1: #0E5A53;
    --mesh-2: #5A2A12;
    --mesh-3: #2C2570;
    --mesh-4: #0B3B55;
    --dot: rgba(231, 244, 241, .05);
    --skeleton: rgba(231, 244, 241, .07);
  }
}

/* 3. Base & reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 32px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { flex: 1 0 auto; display: block; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text);
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(255, 138, 76, .35); color: var(--text); }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
hr { border: 0; height: 1px; background: var(--line); margin: var(--s-6) 0; }
code { font-size: .9em; padding: .1em .4em; border-radius: 6px; background: var(--glass-bg-soft); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-inline { display: inline-block; vertical-align: -.15em; }

/* 4. Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: calc(760px + var(--gutter) * 2); }
.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: calc(var(--section-y) * .6); }
.section-head { max-width: 680px; margin: 0 auto var(--s-7); text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head--split { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); text-align: left; }
.section-title { font-size: var(--fs-2xl); margin-bottom: .35em; }
.section-sub { color: var(--text-2); font-size: var(--fs-md); margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--link); margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, var(--s-3)); }
.cluster--center { justify-content: center; }
.grid { display: grid; gap: var(--grid-gap, var(--s-4)); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--grid-gap, var(--s-4)); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* 5. Ambient background (animated mesh) ---------------------------------- */
.bg-mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg-mesh .blob {
  position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent 72%);
  opacity: .9; will-change: transform;
  animation: drift-a 26s var(--ease-in-out) infinite alternate;
}
.bg-mesh .b1 { --c: var(--mesh-1); top: -24vmax; left: -18vmax; }
.bg-mesh .b2 { --c: var(--mesh-2); top: 4vh; right: -26vmax; animation-name: drift-b; animation-duration: 32s; }
.bg-mesh .b3 { --c: var(--mesh-3); bottom: -30vmax; left: 12vw; animation-name: drift-c; animation-duration: 38s; }
.bg-mesh .b4 { --c: var(--mesh-4); top: 38vh; left: -30vmax; width: 50vmax; height: 50vmax; opacity: .6; animation-duration: 44s; }
.bg-mesh::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 65%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 65%);
}
@keyframes drift-a { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-14vmax, 10vmax, 0) scale(.92); } }
@keyframes drift-c { to { transform: translate3d(10vmax, -12vmax, 0) scale(1.08); } }

/* 6. Glass surfaces ------------------------------------------------------ */
.glass, .glass-strong, .glass-soft {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-inner), var(--shadow-md);
  border-radius: var(--r-lg);
}
.glass-strong { background: var(--glass-bg-strong); }
.glass-soft { background: var(--glass-bg-soft); box-shadow: var(--glass-inner), var(--shadow-sm); }
/* Specular edge: gradient hairline that catches "light" top-left and bottom-right */
.glass::before, .glass-strong::before, .glass-soft::before, .edge::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(145deg, var(--glass-edge-1), var(--glass-edge-2) 35%, transparent 55%, var(--glass-edge-2) 75%, var(--glass-edge-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.edge { position: relative; }

/* Pointer-follow sheen (site.js sets --mx/--my on .sheen elements) */
.sheen { overflow: hidden; isolation: isolate; }
.sheen::after {
  content: ""; position: absolute; left: 0; top: 0; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--sheen), transparent);
  transform: translate3d(calc(var(--mx, -400px) - 130px), calc(var(--my, -400px) - 130px), 0);
  opacity: 0; transition: opacity var(--dur-3) var(--ease-out); pointer-events: none; z-index: -1;
}
.sheen:hover::after { opacity: 1; }

/* 7. Buttons & pills ----------------------------------------------------- */
.btn {
  --btn-bg: var(--glass-bg-strong);
  --btn-fg: var(--text);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.3rem;
  border: 0; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 650 var(--fs-sm)/1.1 var(--font-body); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: var(--glass-inner), var(--shadow-sm);
  transition: transform var(--dur-2) var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.btn::after { /* liquid highlight */
  content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: inherit; z-index: -1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0));
  opacity: .9; pointer-events: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0) scale(.96); transition-duration: 80ms; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform var(--dur-2) var(--ease-spring); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), var(--glow-primary); }
.btn-primary::after { opacity: .45; }
.btn-accent { --btn-bg: linear-gradient(135deg, var(--accent), var(--accent-2)); --btn-fg: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--glow-accent); }
.btn-glass { --btn-bg: var(--glass-bg); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
.btn-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-strong); pointer-events: none; }
.btn-ghost { --btn-bg: transparent; box-shadow: none; }
.btn-ghost::after { display: none; }
.btn-ghost:hover { --btn-bg: var(--glass-bg-soft); }
.btn-sm { min-height: 36px; padding: .5rem 1rem; font-size: var(--fs-xs); }
.btn-lg { min-height: 54px; padding: .9rem 1.7rem; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; min-height: 36px; }
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::before {
  content: ""; position: absolute; width: 18px; height: 18px; inset: 0; margin: auto;
  border: 2px solid var(--btn-fg); border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* 8. Chips / tags / badges / segmented ----------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 36px; padding: .4rem .95rem;
  border-radius: var(--r-pill); border: 0;
  background: var(--glass-bg); color: var(--text);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: var(--glass-inner), inset 0 0 0 1px var(--line), var(--shadow-sm);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: transform var(--dur-2) var(--ease-spring);
}
a.chip:hover, button.chip:hover { transform: translateY(-2px); text-decoration: none; }
a.chip:active, button.chip:active { transform: scale(.96); }
.chip small, .chip .chip-note { color: var(--text-2); font-weight: 500; }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--text); color: var(--bg); box-shadow: var(--shadow-sm); }
.chip--ai { background: var(--ai-soft); color: var(--ai); box-shadow: inset 0 0 0 1px var(--ai-edge); }
.chip--ai small { color: inherit; opacity: .85; }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .65rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; line-height: 1.4;
  background: var(--success-soft); color: var(--link);
}
a.tag { text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.tag--accent { background: rgba(255, 138, 76, .16); color: var(--accent-text); }
.tag--ai { background: var(--ai-soft); color: var(--ai); }
.tag--neutral { background: var(--glass-bg-soft); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); position: relative; flex: none; }
.dot-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s var(--ease-out) infinite; }

.badge-best {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .75rem; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), var(--glow-accent);
}
.badge-best .icon { width: 1em; height: 1em; fill: currentColor; stroke: none; }

.segmented {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill);
  background: var(--glass-bg-soft); box-shadow: inset 0 0 0 1px var(--line);
}
.segmented > button, .segmented > a {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 36px; min-width: 40px; padding: .35rem .85rem; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; text-decoration: none;
  transition: transform var(--dur-2) var(--ease-spring);
}
.segmented > button:active, .segmented > a:active { transform: scale(.94); }
.segmented > [aria-pressed="true"], .segmented > .active, .segmented > [aria-current="page"] {
  background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* 9. Inputs & search ----------------------------------------------------- */
.field { display: grid; gap: .4rem; }
.field label { font-size: var(--fs-sm); font-weight: 650; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: .75rem 1.1rem;
  border: 0; border-radius: var(--r-pill);
  background: var(--glass-bg-strong); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--glass-inner);
  transition: box-shadow var(--dur-2) var(--ease-out);
}
.textarea { border-radius: var(--r-md); min-height: 140px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus), 0 0 0 5px color-mix(in srgb, var(--focus) 18%, transparent); }

.search-bar {
  position: relative; display: flex; align-items: center; gap: .5rem;
  padding: 8px 8px 8px 22px; border-radius: var(--r-pill);
  transition: transform var(--dur-3) var(--ease-out);
}
.search-bar > .icon { color: var(--text-2); width: 22px; height: 22px; }
.search-bar input {
  flex: 1; min-width: 0; min-height: 48px; border: 0; background: transparent; color: var(--text);
  font-size: var(--fs-md); font-weight: 500; outline: none;
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar:focus-within { box-shadow: var(--glass-inner), 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent), var(--shadow-lg); }
.search-bar .btn { flex: none; }
@media (max-width: 479px) {
  .search-bar { padding-left: 16px; }
  .search-bar .btn-label { display: none; }
  .search-bar .btn { width: 48px; padding: 0; }
}

/* 10. Cards & bento ------------------------------------------------------ */
.card { padding: clamp(1.1rem, .9rem + 1vw, 1.75rem); border-radius: var(--r-lg); }
.card-title { font-size: var(--fs-lg); margin-bottom: .35em; }
.card-text { color: var(--text-2); margin: 0; }
.card-hover { transition: transform var(--dur-3) var(--ease-out); }
.card-hover:hover { transform: translateY(-4px); }
.card-hover:active { transform: translateY(-1px) scale(.99); }
.icon-bubble {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(145deg, var(--jade-100), rgba(255, 255, 255, .6)); color: var(--jade-700);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), var(--shadow-sm); margin-bottom: var(--s-4);
}
.icon-bubble .icon { width: 24px; height: 24px; }
.icon-bubble--accent { background: linear-gradient(145deg, var(--tang-100), rgba(255, 255, 255, .6)); color: var(--tang-700); }
.icon-bubble--ai { background: linear-gradient(145deg, var(--lilac-100), rgba(255, 255, 255, .6)); color: var(--lilac-700); }
@media (prefers-color-scheme: dark) {
  .icon-bubble { background: rgba(79, 209, 193, .14); color: var(--primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
  .icon-bubble--accent { background: rgba(255, 154, 98, .14); color: var(--accent); }
  .icon-bubble--ai { background: var(--ai-soft); color: var(--ai); }
}

.bento { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(190px, auto); }
  .bento-wide { grid-column: span 2; }
  .bento-tall { grid-row: span 2; }
}
.bento > * { display: flex; flex-direction: column; }

.logo-plate {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 5px; border-radius: 14px;
  background: #fff; box-shadow: 0 1px 2px rgba(11, 43, 46, .12), inset 0 0 0 1px rgba(11, 43, 46, .06);
  overflow: hidden;
}
.logo-plate img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-plate .img-fallback { color: var(--jade-700); }
.logo-plate--lg { width: 100%; height: 88px; padding: 12px 16px; border-radius: var(--r-md); }

/* 11. Skeleton, toasts, spinner ----------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--skeleton); border-radius: var(--r-sm); }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--sheen) 50%, transparent 80%);
  transform: translateX(-100%); animation: shimmer 1.5s var(--ease-in-out) infinite;
}
.skeleton-line { height: 12px; border-radius: var(--r-pill); }
.skeleton-line + .skeleton-line { margin-top: 10px; }
.skeleton-line.w-40 { width: 40%; } .skeleton-line.w-60 { width: 60%; } .skeleton-line.w-80 { width: 80%; } .skeleton-line.w-90 { width: 90%; }
.skeleton-circle { width: 44px; height: 44px; border-radius: 14px; }
.skeleton-price { height: 34px; width: 55%; border-radius: 10px; margin: 18px 0 14px; }
.skeleton-btn { height: 44px; border-radius: var(--r-pill); margin-top: 18px; }

.toast-region {
  position: fixed; z-index: 100; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem .8rem 1.1rem;
  border-radius: var(--r-pill); background: var(--glass-bg-strong); color: var(--text);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-inner), inset 0 0 0 1px var(--line), var(--shadow-lg);
  font-size: var(--fs-sm); font-weight: 600; pointer-events: auto;
  animation: toast-in var(--dur-3) var(--ease-spring) both;
}
.toast.is-leaving { animation: toast-out var(--dur-2) var(--ease-out) both; }
.toast .icon { color: var(--primary); }
.toast--warn .icon, .toast--error .icon { color: var(--danger); }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }

/* 12. Ads (fixed reserved heights → CLS ≈ 0) ----------------------------- */
.ad-slot { display: grid; justify-items: center; gap: 6px; margin: var(--s-5) auto; width: 100%; max-width: 100%; contain: layout; }
.ad-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.ad-slot ins.adsbygoogle, .ad-placeholder { display: block; width: 100%; overflow: hidden; border-radius: var(--r-md); }
.ad-slot ins.adsbygoogle { background: var(--glass-bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.ad-728x90 { max-width: 728px; height: 100px; }
@media (min-width: 768px) { .ad-728x90 { height: 90px; } }
.ad-336x280 { max-width: 336px; height: 280px; }
.ad-300x250 { max-width: 300px; height: 250px; }
.ad-placeholder {
  display: grid; place-items: center; text-align: center; padding: 1rem;
  background: repeating-linear-gradient(135deg, var(--glass-bg-soft) 0 12px, transparent 12px 24px);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--text-3); font-size: var(--fs-xs); font-weight: 600;
}
.ad-slot--header { margin-top: var(--s-4); margin-bottom: 0; padding-inline: var(--gutter); }
.ad-slot--sidebar { margin: 0 0 var(--s-5); }

/* 13. Navigation (floating glass pill) ----------------------------------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200; padding: .6rem 1rem; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none; transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus { transform: translateY(72px); }
.site-header { position: sticky; top: 0; z-index: 60; padding: 12px var(--gutter) 0; pointer-events: none; view-transition-name: site-header; }
.nav {
  pointer-events: auto; position: relative;
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: var(--s-3);
  min-height: var(--nav-h); padding: 8px 8px 8px 14px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
}
.nav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); pointer-events: none; z-index: -1; }
.site-header.is-scrolled .nav::after { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); flex: none; border-radius: var(--r-pill); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; transition: transform var(--dur-3) var(--ease-spring); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.06); }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.brand-word b { font-weight: 800; color: var(--link); }

.nav-menu { display: flex; align-items: center; gap: var(--s-3); flex: 1; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--glass-bg-soft); box-shadow: inset 0 0 0 1px var(--line); margin-inline: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 38px; padding: .4rem 1rem;
  border-radius: var(--r-pill); color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; text-decoration: none;
  transition: transform var(--dur-2) var(--ease-spring);
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link:active { transform: scale(.95); }
.nav-link[aria-current="page"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .7); }
.nav-link .icon { display: none; }
.nav-search { position: relative; display: flex; align-items: center; width: 250px; }
.nav-search .icon { position: absolute; left: 14px; color: var(--text-2); pointer-events: none; width: 18px; height: 18px; }
.nav-search input { min-height: 44px; padding-left: 40px; padding-right: 1rem; font-size: var(--fs-sm); }
.nav-cta { flex: none; }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .nav { padding-left: 12px; }
  .brand-word { font-size: 1.1rem; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-menu {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--s-3); padding: var(--s-3);
    /* Nested inside the glass nav, backdrop-filter can't sample the page (backdrop root), so use a near-opaque surface */
    border-radius: var(--r-lg); background: var(--glass-fallback);
    box-shadow: var(--glass-inner), inset 0 0 0 1px var(--line), var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top center;
    transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring), visibility 0s linear var(--dur-3);
  }
  .nav[data-open] .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links { flex-direction: column; align-items: stretch; margin: 0; background: transparent; box-shadow: none; padding: 0; }
  .nav-link { min-height: 50px; padding: .6rem 1rem; font-size: var(--fs-md); }
  .nav-link .icon { display: block; }
  .nav-search { width: 100%; order: -1; }
  .nav-search input { min-height: 50px; font-size: var(--fs-base); }
  .nav-toggle .icon-close { display: none; }
  .nav[data-open] .nav-toggle .icon-menu { display: none; }
  .nav[data-open] .nav-toggle .icon-close { display: block; }
}
@media (min-width: 900px) {
  .nav-search--home { display: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .nav-search { width: 190px; }
}

/* 14. Footer & disclaimer ----------------------------------------------- */
.disclaimer { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); border-radius: var(--r-lg); font-size: var(--fs-sm); color: var(--text-2); }
.disclaimer strong { color: var(--text); }
.disclaimer .icon-bubble { flex: none; margin: 0; width: 42px; height: 42px; border-radius: 14px; }
.disclaimer p { margin: 0; }
.site-footer { padding: var(--s-6) 0 var(--s-5); margin-top: var(--s-6); }
.footer-panel { padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); border-radius: var(--r-xl); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-about p { color: var(--text-2); font-size: var(--fs-sm); max-width: 34ch; margin-top: var(--s-3); }
.footer-col h2 { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); font-weight: 750; }
.footer-col ul { list-style: none; display: grid; gap: .15rem; }
.footer-col a { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; color: var(--text); text-decoration: none; font-weight: 550; font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--link); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--text-3); font-size: var(--fs-xs); }
.footer-bottom p { margin: 0; }

/* 15. Home ---------------------------------------------------------------- */
.hero { padding: clamp(2.5rem, 1.5rem + 5vw, 6rem) 0 clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 1.5rem + 3vw, 4rem); align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .9rem .4rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); margin-bottom: var(--s-5); }
.hero-title { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin-bottom: var(--s-5); font-stretch: 92%; }
.hero-title .hl {
  position: relative; display: inline-block; color: var(--link);
  background: linear-gradient(100deg, var(--jade-700) 5%, var(--jade-500) 50%, #D0561B 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .hl::after {
  content: ""; position: absolute; left: .02em; right: .04em; bottom: .02em; height: .14em; border-radius: 99px; z-index: -1;
  background: linear-gradient(90deg, rgba(255, 138, 76, .55), rgba(255, 176, 90, .25));
  transform-origin: left; animation: underline-in 900ms var(--ease-out) 700ms both;
}
@media (prefers-color-scheme: dark) {
  .hero-title .hl { background: linear-gradient(100deg, var(--jade-300) 5%, var(--jade-400) 50%, var(--tang-400) 100%); -webkit-background-clip: text; background-clip: text; }
}
.hero-lead { font-size: var(--fs-md); color: var(--text-2); max-width: 54ch; margin-bottom: var(--s-6); }
.hero-search { max-width: 640px; }
.hero-search .search-bar { min-height: 68px; }
.hero-try { margin-top: var(--s-4); --cluster: .5rem; }
.hero-try-label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; margin-right: .25rem; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: var(--s-5); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.hero-trust li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust .icon { color: var(--primary); }

/* Hero visual: live comparison mock */
.hero-visual { position: relative; padding: var(--s-5) var(--s-2); max-width: 480px; width: 100%; margin-inline: auto; }
.cmp-card { padding: var(--s-5); border-radius: var(--r-xl); }
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.cmp-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); margin: 0; }
.cmp-q { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: var(--r-pill); background: var(--glass-bg-soft); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s-4); }
.cmp-q b { color: var(--text); font-weight: 650; }
.cmp-q .caret { width: 2px; height: 1.1em; background: var(--primary); animation: blink 1s steps(1) infinite; }
.cmp-rows { list-style: none; display: grid; gap: .55rem; }
.cmp-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: 16px; }
.cmp-row { grid-template-columns: 40px 1fr; }
.cmp-row .logo-plate { width: 40px; height: 40px; border-radius: 12px; padding: 4px; }
.cmp-track { display: block; height: 10px; border-radius: 99px; background: var(--skeleton); overflow: hidden; }
.cmp-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--jade-400), var(--jade-600)); transform-origin: left; transform: scaleX(var(--w, .6)); animation: bar-in 1.1s var(--ease-out) both; }
.cmp-row:nth-child(1) .cmp-bar { --w: .82; animation-delay: .5s; }
.cmp-row:nth-child(2) .cmp-bar { --w: .64; animation-delay: .65s; }
.cmp-row:nth-child(3) .cmp-bar { --w: .38; animation-delay: .8s; background: linear-gradient(90deg, var(--accent-2), var(--tang-500)); }
.cmp-row:nth-child(4) .cmp-bar { --w: .71; animation-delay: .95s; }
.cmp-row:nth-child(5) .cmp-bar { --w: .93; animation-delay: 1.1s; }
.cmp-row.is-best { background: rgba(255, 138, 76, .12); box-shadow: inset 0 0 0 1px rgba(255, 138, 76, .45); }
.cmp-row.is-best { grid-template-columns: 40px 1fr auto; }
.cmp-row .badge-best { font-size: .66rem; padding: .22rem .6rem; }
.float-chip { position: absolute; z-index: 2; animation: bob 6s var(--ease-in-out) infinite; }
.float-chip--ai { top: -2px; right: -6px; }
.float-chip--free { bottom: 4px; left: -10px; animation-delay: -3s; }
@media (max-width: 479px) { .float-chip--ai { right: 0; } .float-chip--free { left: 0; } }

/* Steps */
.steps, .pharmacy-grid, .cmp-rows { list-style: none; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; }
.step-num {
  position: absolute; right: 18px; top: 6px; font-family: var(--font-display); font-weight: 800; font-size: 4.5rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); letter-spacing: -.05em; pointer-events: none;
}

/* Bento feature visuals */
.feature-big { justify-content: space-between; gap: var(--s-5); }
.stream-demo { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: auto; }
.stream-status { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); margin-bottom: var(--s-3); }
.stream-demo .logo-plate { width: 100%; height: 76px; border-radius: 18px; padding: 10px 14px; animation: stream-pop 4.8s var(--ease-out) infinite; }
.stream-demo .logo-plate:nth-child(2) { animation-delay: .3s; } .stream-demo .logo-plate:nth-child(3) { animation-delay: .6s; }
.stream-demo .logo-plate:nth-child(4) { animation-delay: .9s; } .stream-demo .logo-plate:nth-child(5) { animation-delay: 1.2s; } .stream-demo .logo-plate:nth-child(6) { animation-delay: 1.5s; }
.feature-q { position: relative; }
.feature-q .card-title, .feature-q .card-text { max-width: 30ch; position: relative; z-index: 1; }
.big-glyph {
  position: absolute; right: clamp(1rem, .5rem + 2vw, 2rem); bottom: -.12em; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 4rem + 6vw, 10rem); line-height: 1; letter-spacing: -.06em;
  background: linear-gradient(160deg, var(--accent-2), var(--tang-500)); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .9; padding: 0 .1em; pointer-events: none;
}
@media (max-width: 1023px) { .feature-q { min-height: 200px; } .big-glyph { font-size: 6rem; opacity: .28; } }
.feature-ai { background: linear-gradient(160deg, var(--ai-soft), transparent 70%), var(--glass-bg); }

/* Pharmacies */
.pharmacy-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .pharmacy-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .pharmacy-grid { grid-template-columns: repeat(6, 1fr); } }
.pharmacy-tile { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-lg); text-align: center; }
.pharmacy-tile h3 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; margin: 0; letter-spacing: 0; }
.pharmacy-tile p { font-size: var(--fs-xs); color: var(--text-2); margin: 0; }


/* CTA band */
.cta-band { position: relative; overflow: hidden; padding: clamp(2rem, 1.5rem + 3vw, 4rem); border-radius: var(--r-xl); text-align: center; isolation: isolate; }
.cta-band::after {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: radial-gradient(40% 50% at 20% 30%, rgba(63, 196, 178, .35), transparent), radial-gradient(35% 45% at 80% 70%, rgba(255, 138, 76, .3), transparent);
  animation: spin-slow 40s linear infinite;
}
.cta-band h2 { font-size: var(--fs-2xl); max-width: 22ch; margin-inline: auto; }
.cta-band p { color: var(--text-2); max-width: 52ch; margin: 0 auto var(--s-5); }

/* 16. Search results ----------------------------------------------------- */
.search-page { padding-top: clamp(1.5rem, 1rem + 2vw, 3rem); padding-bottom: var(--s-7); }
.search-layout { display: grid; gap: var(--s-6); }
@media (min-width: 1024px) { .search-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.search-aside { display: grid; gap: var(--s-4); }
@media (min-width: 1024px) { .search-aside { position: sticky; top: calc(var(--nav-h) + 28px); } }
@media (max-width: 1023px) { .search-aside .ad-slot--sidebar { display: none; } }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.results-title { font-size: var(--fs-2xl); margin: 0; overflow-wrap: anywhere; }
.results-title .q { color: var(--link); }
.results-sub { margin: .4rem 0 0; color: var(--text-2); }
.results-toolbar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.count-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding: .35rem .9rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); }
.count-pill[data-state="done"] { color: var(--link); }
.count-pill[data-state="error"] { color: var(--danger); }
.count-pill .spinner { color: var(--primary); }

.ai-card { padding: var(--s-5); border-radius: var(--r-lg); margin-bottom: var(--s-5); background: linear-gradient(135deg, var(--ai-soft), transparent 60%), var(--glass-bg); }
.ai-card::before { background: linear-gradient(145deg, var(--ai-edge), transparent 45%, transparent 60%, var(--ai-edge)) !important; }
.ai-card-label { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ai); margin-bottom: var(--s-2); }
.ai-card-name { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; margin: 0 0 .25rem; }
.ai-card-name .inn { display: inline-block; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin-left: .35rem; }
.ai-card-text { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.did-you-mean { display: inline-flex; align-items: center; gap: .4rem; margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--text-2); }
.did-you-mean .icon { color: var(--ai); }
.did-you-mean a { font-weight: 700; }

.results-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.results-grid:empty { display: none; }
.price-card { display: flex; flex-direction: column; padding: var(--s-5); border-radius: var(--r-lg); min-height: 280px; }
.price-card__head { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.price-card__pharmacy { font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.price-card__price { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 1.6rem + 1vw, 2.4rem); letter-spacing: -.04em; line-height: 1; margin: var(--s-4) 0 var(--s-3); font-variant-numeric: tabular-nums; }
.price-card__price .cur { font-family: var(--font-body); font-size: .5em; font-weight: 800; color: var(--text-2); margin-right: .15em; vertical-align: .7em; letter-spacing: 0; }
.price-card__product { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 650; line-height: 1.35; letter-spacing: 0; margin: 0 0 .35rem; overflow-wrap: anywhere; }
.price-card__meta { font-size: var(--fs-sm); color: var(--text-2); margin: 0; overflow-wrap: anywhere; }
.price-card__foot { margin-top: auto; padding-top: var(--s-4); }
.price-card .badge-best { align-self: flex-start; margin-bottom: var(--s-3); }
.price-card.is-best { box-shadow: var(--glass-inner), 0 0 0 2px rgba(255, 138, 76, .75), var(--glow-accent); }
.price-card.is-best .price-card__price { color: var(--accent-text); }
@media (prefers-color-scheme: dark) { .price-card.is-best .price-card__price { color: var(--accent); } }
.price-card.skeleton-card { pointer-events: none; }

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); padding: var(--s-2); -webkit-overflow-scrolling: touch; }
.results-table { width: 100%; min-width: 620px; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.results-table th { text-align: left; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 750; padding: .8rem 1rem; }
.results-table td { padding: .85rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.results-table tr.is-best td { background: rgba(255, 138, 76, .1); }
.results-table .num { text-align: right; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); white-space: nowrap; font-variant-numeric: tabular-nums; }
.results-table .pharm { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.results-table .pharm .logo-plate { width: 36px; height: 36px; border-radius: 11px; }
.results-table small { color: var(--text-2); }

.alternatives { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--r-lg); }
.alternatives h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: .5rem; }
.tips-card h2 { font-size: var(--fs-md); display: flex; align-items: center; gap: .5rem; }
.tips-card ul { list-style: none; display: grid; gap: .65rem; font-size: var(--fs-sm); color: var(--text-2); }
.tips-card li { display: flex; gap: .55rem; }
.tips-card li .icon { color: var(--primary); margin-top: .15em; width: 1.05em; height: 1.05em; }

/* 17. News / article / prose ------------------------------------------- */
.category-bar {
  display: flex; gap: .5rem; overflow-x: auto; padding: 6px; margin: 0 calc(var(--gutter) * -1) var(--s-6); padding-inline: var(--gutter);
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar .chip { scroll-snap-align: start; flex: none; }
.news-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); color: var(--text); text-decoration: none; height: 100%; }
.news-card:hover { text-decoration: none; }
.news-card__media { margin: calc(var(--s-5) * -1) calc(var(--s-5) * -1) 0; aspect-ratio: 16 / 9; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: linear-gradient(135deg, var(--mesh-1), var(--mesh-2)); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); flex: 1; }
.news-card__title { font-size: var(--fs-lg); margin: 0; line-height: 1.2; }
.news-card__title a { color: inherit; text-decoration: none; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.news-card__title a:focus-visible { outline: none; }
.news-card:focus-within { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.news-card__summary { color: var(--text-2); font-size: var(--fs-sm); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__meta { align-self: stretch; }
.news-card__meta, .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; margin-top: auto; }
.meta .icon { width: 1.05em; height: 1.05em; }
.meta > span { display: inline-flex; align-items: center; gap: .3rem; }
.news-card--featured { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .news-card--featured { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-6); align-items: center; }
  /* align-self: stretch (not height: 100%) so the negative margins make the media bleed flush to the card edges */
  .news-card--featured .news-card__media { margin: calc(var(--s-5) * -1) 0 calc(var(--s-5) * -1) calc(var(--s-5) * -1); border-radius: var(--r-lg) 0 0 var(--r-lg); aspect-ratio: auto; align-self: stretch; height: auto; min-height: 320px; }
  .news-card--featured .news-card__title { font-size: var(--fs-xl); }
}

.article { padding-block: var(--s-6) var(--s-8); }
.article-header { margin-bottom: var(--s-6); }
.article-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: var(--s-3) 0 var(--s-4); }
.article-dek { font-size: var(--fs-md); color: var(--text-2); max-width: 62ch; }
.article-body { padding: clamp(1.25rem, 1rem + 2vw, 2.75rem); border-radius: var(--r-xl); }
.key-points { padding: var(--s-5); border-radius: var(--r-lg); margin-bottom: var(--s-6); background: linear-gradient(135deg, var(--success-soft), transparent 70%), var(--glass-bg); }
.key-points h2 { font-size: var(--fs-md); display: flex; align-items: center; gap: .5rem; }
.key-points ul { list-style: none; display: grid; gap: .6rem; }
.key-points li { display: flex; gap: .6rem; }
.key-points li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: .55em; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.faq { display: grid; gap: var(--s-3); }
.faq details { border-radius: var(--r-md); padding: 0 var(--s-5); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 56px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--link); transition: transform var(--dur-2) var(--ease-spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div, .faq details > p { padding-bottom: var(--s-4); color: var(--text-2); margin: 0; }
.source-note { font-size: var(--fs-sm); color: var(--text-2); padding: var(--s-4) var(--s-5); border-radius: var(--r-md); }

.prose { font-size: 1.075rem; line-height: 1.75; color: var(--text); max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0; }
.prose h2 { font-size: var(--fs-xl); margin: 2em 0 .2em; letter-spacing: -.025em; }
.prose h3 { font-size: var(--fs-lg); margin: 1.6em 0 .1em; letter-spacing: -.015em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--primary); }
.prose ol li::marker { color: var(--link); font-weight: 700; font-family: var(--font-display); }
.prose strong { font-weight: 750; }
.prose em { font-style: italic; }
.prose a { color: var(--link); font-weight: 600; }
.prose blockquote {
  margin: 1.6em 0; padding: 1rem 1.25rem 1rem 1.4rem; border-radius: 0 var(--r-md) var(--r-md) 0;
  border-left: 4px solid var(--accent); background: rgba(255, 138, 76, .08); font-size: 1.1rem; color: var(--text);
}
.prose blockquote p + p { margin-top: .6em; }

/* 17b. News covers, in-feed ads, article extras, page/legal layout ------ */
/* Category-based cover visual: no hot-linked images. Pair with .news-card__media or .article-cover. */
.news-cover {
  --c1: var(--mesh-1); --c2: var(--mesh-4); --ink: var(--jade-700);
  position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 9; color: var(--ink);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--c1), transparent 62%),
    radial-gradient(110% 100% at 100% 100%, var(--c2), transparent 64%),
    linear-gradient(135deg, color-mix(in srgb, var(--c1) 60%, var(--bg)), color-mix(in srgb, var(--c2) 60%, var(--bg)));
}
.news-cover::before { /* concentric rings */
  content: ""; position: absolute; z-index: -1; width: 150%; aspect-ratio: 1; left: 28%; top: -18%; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, .26) 30px 31px);
}
.news-cover::after { /* dot grid */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .45) 1px, transparent 1.4px); background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000); mask-image: linear-gradient(115deg, transparent 35%, #000);
}
.news-cover__icon {
  display: grid; place-items: center; width: clamp(60px, 24%, 104px); aspect-ratio: 1; border-radius: 30%;
  background: rgba(255, 255, 255, .62); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), var(--shadow-md);
  transition: transform var(--dur-3) var(--ease-spring);
}
.news-cover__icon .icon { width: 46%; height: 46%; stroke-width: 1.6; }
.news-cover__word {
  position: absolute; left: .9rem; bottom: .2rem; z-index: -1; max-width: 100%;
  font: 800 clamp(1.6rem, 1rem + 2.4vw, 2.6rem)/1 var(--font-display); letter-spacing: -.04em; white-space: nowrap;
  color: currentColor; opacity: .16; overflow: hidden;
}
.card-hover:hover .news-cover__icon { transform: translateY(-3px) rotate(-4deg) scale(1.04); }
.news-cover--salud-publica      { --c1: var(--mesh-4); --c2: var(--mesh-1); }
.news-cover--investigacion      { --c1: var(--mesh-3); --c2: var(--mesh-4); --ink: var(--lilac-700); }
.news-cover--alertas-sanitarias { --c1: var(--mesh-2); --c2: var(--tang-100); --ink: var(--tang-700); }
.news-cover--bienestar          { --c1: var(--mesh-1); --c2: var(--mesh-2); }
.news-cover--guatemala          { --c1: var(--mesh-4); --c2: var(--mesh-3); --ink: var(--lilac-700); }
@media (prefers-color-scheme: dark) {
  .news-cover { --ink: var(--text) !important; }
  .news-cover--alertas-sanitarias { --c2: var(--mesh-2); }
  .news-cover__icon { background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), var(--shadow-md); }
}
.article-cover { aspect-ratio: 16 / 7; border-radius: var(--r-xl); margin-bottom: var(--s-6); box-shadow: var(--glass-inner), var(--shadow-md); }
@media (min-width: 768px) { .article-cover { aspect-ratio: 21 / 7; } }
.article-cover .news-cover__icon { width: clamp(64px, 12%, 112px); }

/* News photos (contract v2: Pexels/Pixabay, proxied at /noticias/imagen/{slug}-{lg|sm}.jpg?v=…) ------------------
   16:9 frame reserved by the media box + width/height attrs (CLS ≈ 0). The category cover stays inside as the
   hidden .img-fallback; site.js reveals it (and adds .is-fallback) if the photo fails to load. */
.news-photo { position: relative; isolation: isolate; }
.news-photo__img, .article-photo__frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-photo__img { transition: transform var(--dur-4) var(--ease-out); transform-origin: 50% 40%; }
.card-hover:hover .news-photo__img { transform: scale(1.045); }
.news-photo::after { /* scrim: legibility for the chip + a little depth at the base */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 23, 25, .34), rgba(6, 23, 25, 0) 42%), linear-gradient(0deg, rgba(6, 23, 25, .16), rgba(6, 23, 25, 0) 28%);
}
.news-photo.is-fallback::after { display: none; }
.news-photo > .img-fallback, .article-photo__frame > .img-fallback { position: absolute; inset: 0; aspect-ratio: auto; }
/* Glass category chip over a photo. Token-tinted 78% veil: ≥ 7:1 on any photo, light or dark mode. */
.photo-chip {
  position: absolute; z-index: 2; top: .75rem; left: .75rem; max-width: calc(100% - 1.5rem);
  display: inline-flex; align-items: center; padding: .28rem .75rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(170%); backdrop-filter: blur(10px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .28), 0 4px 14px rgba(6, 23, 25, .18);
}
.news-card--featured .photo-chip { top: 1rem; left: 1rem; }

/* Article hero photo + photo credit */
.article-photo { margin: 0 0 var(--s-6); }
.article-photo__frame {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--mesh-1), var(--mesh-2)); box-shadow: var(--glass-inner), var(--shadow-md);
}
.article-photo__frame::after { /* glass hairline over the photo edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.photo-credit { margin-top: var(--s-2); padding-inline: var(--s-2); font-size: var(--fs-xs); color: var(--text-3); text-align: right; }
.photo-credit a { color: var(--text-2); font-weight: 600; }
.article-photo.is-fallback .photo-credit { display: none; }

/* Few cards: 1 → a wide horizontal card, 2 → a 2-up row (instead of empty tracks to the right) */
.news-grid--solo > .news-card:not(.news-card--featured) { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .news-grid--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .news-grid--solo > .news-card:not(.news-card--featured) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: center; }
  .news-grid--solo > .news-card:not(.news-card--featured) .news-card__media {
    margin: calc(var(--s-5) * -1) 0 calc(var(--s-5) * -1) calc(var(--s-5) * -1); border-radius: var(--r-lg) 0 0 var(--r-lg);
    aspect-ratio: auto; align-self: stretch; height: auto; min-height: 240px;
  }
  .news-grid--solo > .news-card:not(.news-card--featured) .news-card__title { font-size: var(--fs-xl); }
}

/* In-feed ad inside .news-grid: spans the full row so cards never reflow around it */
.news-grid > .ad-slot { grid-column: 1 / -1; margin-block: var(--s-2); }

/* Article extras */
.article-section { margin-top: var(--s-7); }
.article-section > h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: .5rem; margin-bottom: var(--s-4); }
.article .ad-slot { margin-block: 0 var(--s-6); }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share-bar__label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); margin-right: .25rem; }
.article .disclaimer { margin-top: var(--s-6); }

/* Content pages (about / legal / contact): header + optional table of contents + .prose body */
.page { padding-block: var(--s-6) var(--s-8); }
.page-header { margin: var(--s-4) 0 var(--s-6); }
.page-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 var(--s-4); }
.page-lead { font-size: var(--fs-md); color: var(--text-2); max-width: 62ch; }
.toc { padding: var(--s-5); border-radius: var(--r-lg); margin-bottom: var(--s-6); }
.toc h2 { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); }
.toc ol { list-style: none; display: grid; gap: .1rem; counter-reset: toc; }
@media (min-width: 640px) { .toc ol { grid-template-columns: 1fr 1fr; column-gap: var(--s-5); } }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: .55rem; align-items: baseline; min-height: 36px; padding: .35rem 0; color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 800 var(--fs-xs)/1 var(--font-display); color: var(--link); }
.toc a:hover { color: var(--link); text-decoration: underline; }
.prose .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .65rem .75rem; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 750; }
.prose .note { font-size: var(--fs-sm); color: var(--text-2); }

/* 18. Breadcrumbs & pagination ------------------------------------------ */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: var(--fs-sm); color: var(--text-2); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; max-width: 100%; }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 .45rem 0 .2rem; opacity: .6; }
.breadcrumbs a { color: var(--text-2); text-decoration: none; padding: .25rem .5rem; border-radius: var(--r-pill); }
.breadcrumbs a:hover { color: var(--text); background: var(--glass-bg-soft); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 650; padding: .25rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(40ch, 100%); }

.pagination { display: flex; justify-content: center; margin-top: var(--s-6); }
.pagination ul { list-style: none; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 5px; border-radius: var(--r-pill); }
.page-btn {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .75rem; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--text-2); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; font-variant-numeric: tabular-nums;
  transition: transform var(--dur-2) var(--ease-spring);
}
.page-btn:hover { color: var(--text); background: var(--glass-bg-soft); text-decoration: none; }
.page-btn:active { transform: scale(.92); }
.page-btn[aria-current="page"] { background: var(--text); color: var(--bg); }
.page-btn[aria-disabled="true"], .page-btn:disabled { opacity: .4; pointer-events: none; }

/* 19. Empty / error states --------------------------------------------- */
.empty-state { text-align: center; padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(1.25rem, 1rem + 2vw, 3rem); border-radius: var(--r-xl); }
.empty-state .icon-bubble { width: 72px; height: 72px; border-radius: 24px; margin-inline: auto; }
.empty-state .icon-bubble .icon { width: 34px; height: 34px; }
.empty-state h2, .empty-state h1 { font-size: var(--fs-xl); margin-bottom: .4em; }
.empty-state p { color: var(--text-2); max-width: 48ch; margin: 0 auto var(--s-5); }
.empty-state .cluster { justify-content: center; }
.empty-state .suggestions { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.empty-state .suggestions p { font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.error-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 3rem + 6vw, 8rem); line-height: .9; letter-spacing: -.06em; margin-bottom: var(--s-3); background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 20. Motion & reveal --------------------------------------------------- */
.hero-anim > * { animation: rise var(--dur-4) var(--ease-out) both; }
.hero-anim > :nth-child(1) { animation-delay: 40ms; }
.hero-anim > :nth-child(2) { animation-delay: 110ms; }
.hero-anim > :nth-child(3) { animation-delay: 190ms; }
.hero-anim > :nth-child(4) { animation-delay: 270ms; }
.hero-anim > :nth-child(5) { animation-delay: 350ms; }
.hero-anim > :nth-child(6) { animation-delay: 430ms; }
.hero-visual { animation: rise-scale 1s var(--ease-out) 250ms both; }

.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

.anim-in { animation: card-in 650ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.anim-out { animation: card-out 280ms var(--ease-out) both; }

@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes rise-scale { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes card-out { to { opacity: 0; transform: scale(.96); } }
@keyframes bar-in { from { transform: scaleX(0); } }
@keyframes underline-in { from { transform: scaleX(0); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -8px, 0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes stream-pop { 0%, 8% { opacity: .35; transform: scale(.94); } 18%, 80% { opacity: 1; transform: none; } 100% { opacity: .35; transform: scale(.94); } }
@keyframes toast-in { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-out { to { opacity: 0; transform: translate3d(0, -10px, 0); } }
@keyframes slide-in { from { opacity: 0; transform: translate3d(0, 14px, 0); } }

/* Cross-document View Transitions (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 220ms var(--ease-out) both slide-out; }
  ::view-transition-new(root) { animation: 420ms var(--ease-out) 60ms both slide-in; }
  ::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--ease-out); }
}

/* 21. Utilities --------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.text-muted { color: var(--text-2); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
[hidden] { display: none !important; }

/* 22. Accessibility & fallbacks ----------------------------------------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .glass-strong, .nav, .btn-glass, .chip, .toast, .nav-menu { background: var(--glass-fallback); }
  .glass-soft { background: color-mix(in srgb, var(--glass-fallback) 70%, transparent); }
}
@media (prefers-reduced-transparency: reduce) {
  .photo-chip { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass, .glass-strong, .glass-soft, .nav, .btn-glass, .chip, .toast, .nav-menu { background: var(--glass-fallback); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .glass, .glass-strong, .glass-soft, .btn, .chip, .nav { border: 1px solid CanvasText; }
  .hero-title .hl { -webkit-text-fill-color: currentColor; background: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .bg-mesh .blob, .float-chip, .stream-demo .logo-plate, .cta-band::after, .dot-live::after, .cmp-q .caret { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .sheen::after { display: none; }
  .card-hover:hover .news-photo__img { transform: none; }
}
@media print {
  .bg-mesh, .site-header, .ad-slot, .site-footer, .toast-region { display: none !important; }
  .glass, .glass-strong, .glass-soft { background: none; box-shadow: none; backdrop-filter: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 23. Admin (private /admin/…: KPI tiles, cost chart, tables) ----------- */
/* Chart palette: one fixed slot per AI feature (search · news · news photos), CVD-validated
   with the dataviz validator against the glass surface in each mode (all-pairs, 3 slots). */
.admin, .viz-tip {
  --viz-1: #109E91;      /* jade      · Búsqueda */
  --viz-2: #EC5F24;      /* mandarina · Noticias */
  --viz-3: #6B5BE6;      /* lilac     · Fotos de noticias */
  --viz-other: #7D8F8D;  /* neutral   · unknown feature */
  --viz-grid: var(--line);
  --viz-axis: var(--line-strong);
}
@media (prefers-color-scheme: dark) {
  .admin, .viz-tip { --viz-1: #1FA898; --viz-2: #E8662C; --viz-3: #8A7EEC; --viz-other: #6F8583; }
}
.viz-s-1 { --viz-c: var(--viz-1); } .viz-s-2 { --viz-c: var(--viz-2); } .viz-s-3 { --viz-c: var(--viz-3); } .viz-s-other { --viz-c: var(--viz-other); }

.admin-nav { gap: var(--s-3); }
.admin-nav__badge { margin-left: auto; }
.admin-nav__logout { flex: none; }
@media (max-width: 479px) { .admin-nav .brand-word { display: none; } }

.admin-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.admin-head .section-sub { font-size: var(--fs-base); }
.admin-period > a { min-width: 76px; }

/* KPI tiles: 1 col → 2 → 4 (hero spans 2×2 at ≥1024px) */
.admin-kpis { display: grid; gap: var(--s-4); grid-template-columns: 1fr; margin-bottom: var(--s-5); }
@media (min-width: 640px) { .admin-kpis { grid-template-columns: repeat(2, 1fr); } .kpi--hero { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .admin-kpis { grid-template-columns: repeat(4, 1fr); } .kpi--hero { grid-column: span 2; grid-row: span 2; } }
.kpi { display: flex; flex-direction: column; gap: .35rem; padding: clamp(1.1rem, .9rem + .8vw, 1.5rem); border-radius: var(--r-lg); min-width: 0; }
.kpi p { margin: 0; }
.kpi__label { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); }
.kpi__label .icon { width: 1.05em; height: 1.05em; color: var(--link); flex: none; }
.kpi__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi__meta { font-size: var(--fs-sm); color: var(--text-2); }
.kpi__meta strong { color: var(--text); font-weight: 700; }
.kpi--hero { justify-content: center; gap: .5rem; }
.kpi--hero .kpi__value { font-size: clamp(3rem, 2.2rem + 3vw, 4.6rem); letter-spacing: -.04em; margin-block: .1em .15em; }
.kpi__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: 0; }
.kpi__pair dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.kpi__pair dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); line-height: 1.1; }

/* Panels */
.admin-panel { padding: clamp(1.1rem, .9rem + 1vw, 1.75rem); border-radius: var(--r-xl); margin-bottom: var(--s-5); }
.admin-panel__head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-4); }
.admin-panel__title { font-size: var(--fs-lg); margin: 0 0 .2em; }
.admin-panel__sub { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.admin-note { margin: var(--s-3) 0 0; font-size: var(--fs-xs); color: var(--text-3); }
.admin-details { margin-top: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-3); }
.admin-details summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 650; color: var(--link); min-height: 36px; display: inline-flex; align-items: center; }

/* Legend (rect keys mirror the column marks; text stays in text tokens) */
.viz-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; padding: 0; font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }
.viz-legend li { display: inline-flex; align-items: center; gap: .45rem; }
.viz-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--viz-c); flex: none; vertical-align: -1px; margin-right: .5rem; }
.viz-legend .viz-swatch { margin-right: 0; }

/* Chart: height reserved up front (no layout shift when JS renders) */
.viz { position: relative; min-height: 220px; border-radius: var(--r-md); outline: none; touch-action: pan-y; }
@media (min-width: 520px) { .viz { min-height: 280px; } }
.viz:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 40%, transparent); }
.viz__fallback { margin: 0; padding: var(--s-5) 0; color: var(--text-2); font-size: var(--fs-sm); }
.viz-svg { display: block; overflow: visible; font-family: var(--font-body); }
.viz-grid line { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-grid line.viz-baseline { stroke: var(--viz-axis); }
.viz-tick { fill: var(--text-3); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-direct { fill: var(--text-2); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.viz-bars path { fill: var(--viz-c); }
.viz-hover { fill: var(--text); opacity: .06; pointer-events: none; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-col { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .viz-bars.is-entering .viz-col { transform-box: fill-box; transform-origin: 50% 100%; animation: viz-grow var(--dur-4) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 12ms); }
}
@keyframes viz-grow { from { transform: scaleY(0); opacity: 0; } }

/* Tooltip: values lead (strong), labels follow; line keys, not boxes */
.viz-tip {
  position: absolute; left: 0; top: 0; z-index: 2; min-width: 210px; max-width: min(300px, 86vw);
  padding: .7rem .85rem; border-radius: var(--r-md); pointer-events: none;
  background: var(--glass-fallback); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-lg);
  font-size: var(--fs-sm); line-height: 1.35;
}
.viz-tip__head { margin: 0 0 .45rem; font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.viz-tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.viz-tip li { display: grid; grid-template-columns: 14px auto 1fr; align-items: baseline; gap: .5rem; }
.viz-tip li strong { font-variant-numeric: tabular-nums; }
.viz-tip__key { width: 14px; height: 3px; border-radius: 2px; background: var(--viz-c); align-self: center; }
.viz-tip__label { color: var(--text-2); font-size: var(--fs-xs); }
.viz-tip__total { margin: .5rem 0 0; padding-top: .45rem; border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-xs); font-weight: 650; }
.viz-tip__total strong { color: var(--text); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* Tables */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.admin-table--features { min-width: 640px; }
.admin-table th, .admin-table td { padding: .7rem .85rem; text-align: left; vertical-align: middle; white-space: nowrap; }
.admin-table thead th { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 750; }
.admin-table tbody th, .admin-table tbody td, .admin-table tfoot th, .admin-table tfoot td { border-top: 1px solid var(--line); }
.admin-table tbody th { font-weight: 650; }
.admin-table tfoot th, .admin-table tfoot td { border-top-color: var(--line-strong); font-weight: 700; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table small { color: var(--text-3); }
.admin-panel .table-wrap { padding: 0; margin-inline: calc(var(--s-2) * -1); }
.share-col { width: 30%; min-width: 150px; }
.share { display: flex; align-items: center; gap: .6rem; }
.share__track { flex: 1; height: 10px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.share__bar { display: block; height: 100%; width: var(--share, 0%); min-width: 2px; border-radius: inherit; background: var(--viz-c); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) { .share__bar { animation: bar-in var(--dur-4) var(--ease-out) both; } }
.share__value { min-width: 3.2em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Login */
.admin-login .container { display: grid; place-items: center; min-height: 52vh; }
.admin-login__card { width: min(100%, 420px); padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); border-radius: var(--r-xl); }
.admin-login__title { font-size: var(--fs-xl); margin-bottom: .2em; }
.admin-login__card > .text-muted { margin: 0 0 var(--s-5); }
.admin-alert { display: flex; align-items: center; gap: .5rem; margin: 0 0 var(--s-4); padding: .65rem .9rem; border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); font-weight: 650; }
@media (forced-colors: active) {
  .viz-bars path, .viz-swatch, .viz-tip__key, .share__bar { forced-color-adjust: none; }
}
