/* ============================================================
   AMIRIEMPHARMA — Design System v2 "Canal"
   Dirección: premium sanitario-tecnológico, sobrio, europeo.
   Fondo oscuro petróleo en áreas estratégicas, superficies
   claras editoriales, un acento distintivo (cian sanitario).
   ============================================================ */

/* ---------- Fuente autoalojada ---------- */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --ink-950: #071518;
  --ink-900: #0b1e23;   /* fondo estratégico */
  --ink-800: #102b32;
  --ink-700: #143a44;
  --petrol-700: #14535f; /* primario */
  --petrol-600: #1a6b7a;
  --accent-500: #2fa3b8; /* acento cian sanitario */
  --accent-400: #4fc0d3;
  --accent-300: #8fdbe8;
  --mineral-500: #4c9a8a;
  --sand-100: #f6f4ef;   /* superficie editorial cálida */
  --paper: #fbfbf9;
  --white: #ffffff;

  /* Texto */
  --tx-900: #16242a;
  --tx-700: #3b4c53;
  --tx-500: #5b6d74;
  --tx-inv: #eef6f7;
  --tx-inv-soft: #a9c3c8;

  /* Líneas / superficies */
  --line: #dfe6e6;
  --line-dark: rgba(255,255,255,.12);
  --card: #ffffff;
  --card-dark: rgba(255,255,255,.045);

  /* Estados */
  --ok: #2f7d4f; --err: #b3403e; --warn: #a06c14;

  /* Tipo */
  --font: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-0: .8rem; --fs-1: .889rem; --fs-2: 1rem; --fs-3: 1.125rem;
  --fs-4: 1.266rem; --fs-5: 1.424rem; --fs-6: 1.802rem; --fs-7: 2.281rem; --fs-8: 2.887rem; --fs-9: 3.653rem;

  /* Layout */
  --container: 76rem;
  --measure: 46rem;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px;
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem; --sp-9: 6rem;

  --shadow-1: 0 1px 2px rgba(11,30,35,.05), 0 4px 16px rgba(11,30,35,.06);
  --shadow-2: 0 2px 6px rgba(11,30,35,.08), 0 16px 40px rgba(11,30,35,.12);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset breve ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-3); line-height: 1.65;
  color: var(--tx-900); background: var(--paper);
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -0.015em; font-weight: 680; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(var(--fs-7), 5.4vw, var(--fs-9)); }
h2 { font-size: clamp(var(--fs-6), 3.6vw, var(--fs-8)); }
h3 { font-size: var(--fs-5); }
p { margin: 0 0 1em; }
a { color: var(--petrol-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-500); }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-300); color: var(--ink-900); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.measure { max-width: var(--measure); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200; background: var(--ink-900); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 620; font-size: var(--fs-2); line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; border-radius: 999px; padding: .78rem 1.5rem;
  cursor: pointer; transition: transform .18s var(--ease), background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent-500); color: var(--ink-950); }
.btn-primary:hover { background: var(--accent-400); color: var(--ink-950); box-shadow: 0 8px 24px rgba(47,163,184,.35); }
.btn-dark { background: var(--ink-900); color: var(--tx-inv); }
.btn-dark:hover { background: var(--ink-700); color: #fff; }
.btn-light { background: #fff; color: var(--ink-900); }
.btn-light:hover { color: var(--petrol-700); }
.btn-ghost { border-color: var(--line); color: var(--tx-900); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-500); color: var(--petrol-700); }
.btn-outline-light { border-color: rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: var(--fs-1); }
.btn-lg { padding: .95rem 2rem; font-size: var(--fs-3); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.bm-bg { fill: var(--ink-900); }
.bm-line { stroke: var(--accent-400); }
.bm-dot { fill: var(--accent-300); }
.brand-name { display: block; font-weight: 760; letter-spacing: .04em; font-size: 1.02rem; color: var(--ink-900); }
.brand-name em { font-style: normal; color: var(--petrol-600); font-weight: 560; }
.brand-tag { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tx-500); margin-top: .1rem; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,251,249,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .8rem; border-radius: 999px;
  font-size: var(--fs-1); font-weight: 570; color: var(--tx-700); text-decoration: none;
  background: none; border: 0; cursor: pointer; font-family: inherit; transition: background .15s, color .15s;
}
.nav-link:hover { background: #eef1f0; color: var(--ink-900); }
.nav-link.is-active { color: var(--petrol-700); background: #e8f2f3; }
.icon { width: 1.35em; height: 1.35em; }
.icon-caret { width: .85em; height: .85em; transform: rotate(90deg); transition: transform .2s var(--ease); }
.has-sub { position: relative; }
.has-sub.open .icon-caret { transform: rotate(-90deg); }
.nav-sub {
  position: absolute; top: calc(100% + .5rem); left: 0; min-width: 17rem; list-style: none; margin: 0; padding: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.has-sub.open .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: .55rem .8rem; border-radius: var(--r-sm); text-decoration: none; color: var(--tx-700); font-size: var(--fs-1); }
.nav-sub a:hover { background: #eef6f7; color: var(--petrol-700); }
.nav-cta-group { display: flex; gap: .5rem; margin-left: .5rem; }
.nav-burger { display: none; }

/* móvil */
@media (max-width: 62rem) {
  .nav-burger {
    display: grid; place-content: center; gap: 5px; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  }
  .nav-burger span { width: 20px; height: 2px; background: var(--ink-900); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 4.5rem 0 0 0; z-index: 99; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); padding: 1rem clamp(1rem,4vw,2rem) 2rem; overflow-y: auto;
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s; border-top: 1px solid var(--line);
  }
  .site-nav.open { transform: none; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav-link { width: 100%; justify-content: space-between; font-size: var(--fs-3); padding: .8rem .6rem; border-radius: var(--r-sm); }
  .nav-sub { position: static; opacity: 1; visibility: hidden; transform: none; box-shadow: none; border: 0; padding: 0 0 0 .9rem; display: none; }
  .has-sub.open .nav-sub { display: block; visibility: visible; }
  .nav-sub a { font-size: var(--fs-2); padding: .65rem .6rem; }
  .nav-cta-group { flex-direction: column; margin: 1rem 0 0; }
  .nav-cta-group .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Migas ---------- */
.breadcrumbs { border-bottom: 1px solid var(--line); background: var(--sand-100); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: .55rem 0; font-size: var(--fs-0); color: var(--tx-500); }
.breadcrumbs li + li::before { content: '/'; margin-right: .35rem; color: var(--line); }
.breadcrumbs a { color: var(--tx-500); text-decoration: none; }
.breadcrumbs a:hover { color: var(--petrol-700); }

/* ---------- Secciones ---------- */
section { padding-block: clamp(var(--sp-7), 8vw, var(--sp-9)); }
section.tight { padding-block: clamp(var(--sp-6), 5vw, var(--sp-7)); }
.section-head { max-width: 50rem; margin-bottom: clamp(var(--sp-6), 5vw, var(--sp-7)); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.kicker {
  font-size: var(--fs-0); letter-spacing: .16em; text-transform: uppercase; font-weight: 660;
  color: var(--petrol-600); margin-bottom: .8rem;
}
.on-dark .kicker { color: var(--accent-300); }
.lead { font-size: var(--fs-4); color: var(--tx-700); }
.on-dark .lead { color: var(--tx-inv-soft); }

.surface-dark { background: radial-gradient(120% 90% at 70% 0%, var(--ink-800), var(--ink-900) 55%, var(--ink-950)); color: var(--tx-inv); }
.surface-dark h1, .surface-dark h2, .surface-dark h3 { color: #fff; }
.surface-dark p { color: var(--tx-inv-soft); }
.surface-dark a:not(.btn) { color: var(--accent-300); }
.surface-sand { background: var(--sand-100); }
.surface-white { background: #fff; }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(var(--sp-8), 10vw, 8.5rem); }
.hero .container { position: relative; z-index: 2; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg img, .hero-bg svg { width: 100%; height: 100%; object-fit: cover; }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy h1 { margin-bottom: .55em; }
.hero-sub { font-size: var(--fs-4); max-width: 38rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: var(--sp-6); align-items: center; }
.hero-tertiary { font-size: var(--fs-1); color: var(--tx-inv-soft); text-decoration: underline; text-underline-offset: 4px; }
.hero-tertiary:hover { color: #fff; }
.hero-note { margin-top: var(--sp-5); font-size: var(--fs-1); color: var(--tx-inv-soft); display: flex; gap: .5rem; align-items: flex-start; max-width: 36rem; }
.hero-note .icon { color: var(--accent-300); flex: none; margin-top: .15em; }

.hero-panel {
  background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: var(--r-lg);
  padding: clamp(1.2rem, 2.5vw, 1.8rem); backdrop-filter: blur(6px);
}
.hero-panel h2 { font-size: var(--fs-2); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-300); margin-bottom: 1rem; }
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; counter-reset: flow; }
.flow-list li {
  display: flex; align-items: center; gap: .8rem; padding: .55rem .75rem; border-radius: var(--r-sm);
  background: rgba(255,255,255,.03); border: 1px solid transparent; transition: border-color .2s, background .2s;
}
.flow-list li:hover { border-color: var(--line-dark); background: rgba(255,255,255,.06); }
.flow-list li::before {
  counter-increment: flow; content: counter(flow, decimal-leading-zero);
  font-size: var(--fs-0); font-weight: 700; color: var(--accent-400); letter-spacing: .05em; width: 1.6rem; flex: none;
}
.flow-list strong { color: #fff; font-weight: 620; display: block; font-size: var(--fs-1); }
.flow-list span { color: var(--tx-inv-soft); font-size: var(--fs-0); }

/* ---------- Tarjetas ---------- */
.card-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(17.5rem, 100%), 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(1.2rem, 2.5vw, 1.7rem); box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.surface-dark .card { background: var(--card-dark); border-color: var(--line-dark); box-shadow: none; }
.surface-dark .card h3 { color: #fff; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--accent-500); }
.card-icon {
  width: 2.9rem; height: 2.9rem; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(135deg, #e6f4f6, #f2f8f4); color: var(--petrol-700);
  border-radius: 12px;
}
.surface-dark .card-icon { background: rgba(79,192,211,.12); color: var(--accent-300); }
.card h3 { font-size: var(--fs-4); margin-bottom: .45em; }
.card p { margin: 0; color: var(--tx-700); font-size: var(--fs-2); }
.surface-dark .card p { color: var(--tx-inv-soft); }
.card-anchor { text-decoration: none; color: inherit; }
.card-anchor::after { content: ''; position: absolute; inset: 0; }
.card-more { position: absolute; right: 1.2rem; bottom: 1.1rem; color: var(--accent-500); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.card-link:hover .card-more { opacity: 1; transform: none; }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.step { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.1rem; padding: 1.1rem 0; position: relative; }
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 1.68rem; top: 4rem; bottom: -.4rem; width: 2px;
  background: linear-gradient(var(--accent-300), transparent 92%);
}
.surface-dark .step:not(:last-child)::after { background: linear-gradient(rgba(79,192,211,.5), transparent 92%); }
.step-num {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 720; font-size: var(--fs-1); letter-spacing: .04em;
  background: var(--ink-900); color: var(--accent-300); border: 1px solid var(--petrol-600);
}
.step-body h3 { font-size: var(--fs-4); margin-bottom: .3em; }
.step-body p { color: var(--tx-700); margin: 0; }
.surface-dark .step-body p { color: var(--tx-inv-soft); }

/* ---------- Listas de comprobación ---------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.check-list li { display: flex; gap: .65rem; align-items: flex-start; }
.check-list .icon { flex: none; margin-top: .18em; }
.icon-check { color: var(--mineral-500); }
.icon-x { color: var(--err); }
.check-list.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }

/* ---------- Split ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } }
.split-media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.split-media img, .split-media svg { width: 100%; height: 100%; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; max-width: 52rem; margin-inline: auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.surface-dark .faq-item { background: var(--card-dark); border-color: var(--line-dark); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.05rem 1.3rem; cursor: pointer; font-weight: 620; font-size: var(--fs-3); list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon-caret { flex: none; color: var(--accent-500); }
.faq-item[open] summary .icon-caret { transform: rotate(-90deg); }
.faq-a { padding: 0 1.3rem 1.2rem; color: var(--tx-700); }
.surface-dark .faq-a { color: var(--tx-inv-soft); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Answer box (GEO) ---------- */
.answer-box {
  border-left: 3px solid var(--accent-500); background: #eef6f7; border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1.1rem 1.4rem; margin-block: 1.4rem;
}
.answer-q { font-weight: 700; margin-bottom: .35rem; }
.answer-a { margin: 0; color: var(--tx-700); }
.surface-dark .answer-box { background: rgba(79,192,211,.08); }
.surface-dark .answer-a { color: var(--tx-inv-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(115deg, var(--petrol-700), var(--ink-800) 70%);
  color: #fff; padding-block: clamp(var(--sp-7), 6vw, var(--sp-8));
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: url('/assets/illustrations/mesh-lines.svg') right center / cover no-repeat; opacity: .25;
}
.cta-inner { position: relative; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: var(--tx-inv-soft); margin: 0; max-width: 34rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Formularios ---------- */
.lead-form { max-width: 52rem; }
.form-intro { color: var(--tx-700); margin-bottom: 1.5rem; }
.f-grid { display: grid; gap: 1.1rem 1.4rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 44rem) { .f-grid { grid-template-columns: 1fr; } }
.f-span2 { grid-column: 1 / -1; }
.f-field label, .f-field legend { display: block; font-weight: 620; font-size: var(--fs-1); margin-bottom: .35rem; }
.f-field input[type="text"], .f-field input[type="email"], .f-field input[type="tel"], .f-field input[type="url"],
.f-field select, .f-field textarea {
  width: 100%; font: inherit; color: inherit; padding: .7rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(47,163,184,.18);
}
.f-field input[aria-invalid="true"], .f-field select[aria-invalid="true"], .f-field textarea[aria-invalid="true"] { border-color: var(--err); }
.f-hint { font-size: var(--fs-0); color: var(--tx-500); margin: .3rem 0 0; }
.f-error { font-size: var(--fs-0); color: var(--err); margin: .3rem 0 0; min-height: 1em; font-weight: 570; }
.req { color: var(--err); }
fieldset.f-field { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1rem; margin: 0; }
.check-grid { display: grid; gap: .5rem .9rem; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); }
.check-inline { display: flex; gap: .55rem; align-items: flex-start; font-weight: 460 !important; font-size: var(--fs-1); cursor: pointer; }
.check-inline input { margin-top: .25em; accent-color: var(--petrol-600); width: 1.05rem; height: 1.05rem; flex: none; }
.f-consent { margin-top: 1.1rem; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-weight: 620; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.lead-form .btn { margin-top: .6rem; }
.form-privacy-note { font-size: var(--fs-0); color: var(--tx-500); margin-top: 1.1rem; max-width: 44rem; }

/* ---------- Artículos ---------- */
.article-hero { padding-block: clamp(var(--sp-7), 7vw, var(--sp-8)) clamp(var(--sp-5), 4vw, var(--sp-6)); }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; font-size: var(--fs-1); color: var(--tx-inv-soft); margin-top: 1rem; }
.article-meta .tag { background: rgba(79,192,211,.14); color: var(--accent-300); padding: .2rem .7rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-0); letter-spacing: .04em; }
.article-figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.article-figure img { width: 100%; }
.article-body { max-width: var(--measure); margin-inline: auto; }
.article-body h2 { font-size: var(--fs-6); margin-top: 2em; }
.article-body h3 { font-size: var(--fs-4); margin-top: 1.6em; }
.article-body ul li, .article-body ol li { margin-bottom: .35em; }
.article-body blockquote {
  margin: 1.6em 0; padding: 1rem 1.4rem; border-left: 3px solid var(--accent-500);
  background: var(--sand-100); border-radius: 0 var(--r-md) var(--r-md) 0; font-weight: 540;
}
.article-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.article-body th { background: var(--sand-100); font-weight: 680; }
.author-box {
  display: flex; gap: 1.1rem; align-items: flex-start; background: var(--sand-100);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem 1.5rem; margin-top: var(--sp-7);
}
.author-avatar { width: 3.4rem; height: 3.4rem; flex: none; border-radius: 50%; background: var(--ink-900); color: var(--accent-300); display: grid; place-items: center; font-weight: 760; font-size: 1.1rem; letter-spacing: .03em; }
.author-box h2 { font-size: var(--fs-2); margin-bottom: .2em; }
.author-box p { font-size: var(--fs-1); color: var(--tx-700); margin: 0; }
.related { margin-top: var(--sp-7); }

/* listado de recursos */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--sp-6); }
.filter-chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--tx-700); font: inherit; font-size: var(--fs-1);
  font-weight: 570; padding: .45rem 1rem; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.filter-chip:hover { border-color: var(--accent-500); color: var(--petrol-700); }
.filter-chip.active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.article-card { display: flex; flex-direction: column; }
.article-card .art-thumb { border-radius: 10px; overflow: hidden; margin: -0.4rem -0.4rem 1rem; aspect-ratio: 16/9; }
.article-card .art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .tag { align-self: flex-start; background: #e8f2f3; color: var(--petrol-700); padding: .15rem .65rem; border-radius: 999px; font-size: var(--fs-0); font-weight: 640; margin-bottom: .6rem; }
.article-card h3 { font-size: var(--fs-3); }
.article-card .art-meta { margin-top: auto; padding-top: .8rem; font-size: var(--fs-0); color: var(--tx-500); }

/* ---------- Trust flow (modelo de confianza) ---------- */
.trust-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); gap: .6rem; counter-reset: t; }
.trust-node {
  position: relative; background: var(--card-dark); border: 1px solid var(--line-dark); border-radius: var(--r-md);
  padding: 1rem .9rem .9rem; text-align: center;
}
.trust-node .icon { margin-inline: auto; color: var(--accent-300); width: 1.7rem; height: 1.7rem; }
.trust-node p { margin: .5rem 0 0; font-size: var(--fs-0); color: var(--tx-inv); font-weight: 600; line-height: 1.35; }
.trust-node::after {
  counter-increment: t; content: counter(t);
  position: absolute; top: .4rem; right: .55rem; font-size: .62rem; color: var(--tx-inv-soft); font-weight: 700;
}

/* ---------- Tablas de datos ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.data-table th, .data-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { font-weight: 680; color: var(--ink-900); background: var(--sand-100); }

/* ---------- Callout / avisos ---------- */
.callout {
  display: flex; gap: .8rem; border: 1px solid var(--line); border-left: 3px solid var(--warn);
  background: #fdf9f0; border-radius: 0 var(--r-md) var(--r-md) 0; padding: 1rem 1.2rem; margin-block: 1.4rem;
  font-size: var(--fs-2);
}
.callout.info { border-left-color: var(--accent-500); background: #eef6f7; }
.callout .icon { flex: none; margin-top: .15em; color: var(--warn); }
.callout.info .icon { color: var(--petrol-600); }
.callout p { margin: 0; }
.legal-review {
  border: 1px dashed var(--warn); background: #fdf9f0; padding: .8rem 1rem; border-radius: var(--r-sm);
  font-size: var(--fs-1); color: #7a5410; margin-block: 1rem;
}
.legal-review::before { content: '⚖ Pendiente de revisión jurídica — '; font-weight: 700; }

/* ---------- Página legal / prose ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-5); margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-3); margin-top: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.prose th { background: var(--sand-100); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-950); color: var(--tx-inv-soft); padding-block: var(--sp-8) var(--sp-6); font-size: var(--fs-1); }
.footer-top { display: grid; gap: 3rem; grid-template-columns: minmax(16rem, 1.2fr) 3fr; }
@media (max-width: 56rem) { .footer-top { grid-template-columns: 1fr; } }
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-tag { color: var(--tx-inv-soft); }
.footer-desc { margin-top: 1rem; max-width: 24rem; }
.footer-desc-soft { font-size: var(--fs-0); opacity: .75; }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.footer-title { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: .9rem; font-weight: 680; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-col a { color: var(--tx-inv-soft); text-decoration: none; }
.footer-col a:hover { color: var(--accent-300); }
.footer-bottom { border-top: 1px solid var(--line-dark); margin-top: var(--sp-7); padding-top: var(--sp-5); display: grid; gap: .4rem; }
.footer-bottom p { margin: 0; font-size: var(--fs-0); }
.footer-legalnote { opacity: .7; max-width: 56rem; }

/* ---------- Hero interior (páginas) ---------- */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(var(--sp-7), 8vw, var(--sp-8)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { max-width: 17ch; }
.page-hero .lead { max-width: 40rem; }

/* ---------- 404 ---------- */
.err-404 { text-align: center; padding-block: var(--sp-9); }
.err-code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 780; letter-spacing: -.04em; color: var(--accent-300); line-height: 1; }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr 1fr; }
@media (max-width: 52rem) { .grid-2 { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   V3 "LUMEN" — capa luminosa de la plataforma de descubrimiento
   Dirección: farmacéutica contemporánea, luminosa, premium.
   ============================================================ */
:root {
  --ivory: #faf8f4;
  --soft-rose: #f7efec;    /* tono suave para estética */
  --soft-mint: #eef5f1;
  --soft-sky: #ecf4f6;
  --tech-gray: #eceff0;
  --accent-warm: #c98d6b;  /* acento cálido estética, uso comedido */
}

/* Hero luminoso */
.hero-light {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 85% 8%, rgba(47,163,184,.10), transparent 60%),
    radial-gradient(70% 60% at 8% 90%, rgba(76,154,138,.09), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--ivory) 70%);
  padding-block: clamp(var(--sp-7), 8vw, var(--sp-9));
}
.hero-light .kicker { color: var(--petrol-600); }
.hero-light h1 { color: var(--ink-900); }
.hero-light .lead { color: var(--tx-700); }
.hero-light .hero-note { color: var(--tx-500); }
.hero-light .hero-note .icon { color: var(--mineral-500); }
.hero-light .hero-tertiary { color: var(--tx-500); }
.hero-light .hero-tertiary:hover { color: var(--petrol-700); }
.hero-media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Superficies suaves */
.surface-ivory { background: var(--ivory); }
.surface-rose { background: var(--soft-rose); }
.surface-mint { background: var(--soft-mint); }
.surface-sky { background: var(--soft-sky); }

/* Chips (objetivos, filtros, selector) */
.chip-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1.5px solid var(--line); background: #fff; color: var(--tx-700);
  font: inherit; font-size: var(--fs-1); font-weight: 590; text-decoration: none;
  padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .15s var(--ease);
}
.chip:hover { border-color: var(--accent-500); color: var(--petrol-700); transform: translateY(-1px); }
.chip.active, .chip[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.chip .icon { width: 1.1em; height: 1.1em; }

/* Selector de situación (home) */
.selector-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr)); }
.selector-card {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--tx-900); font-weight: 610; font-size: var(--fs-2);
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease);
}
.selector-card:hover { border-color: var(--accent-500); box-shadow: var(--shadow-1); transform: translateY(-2px); color: var(--petrol-700); }
.selector-card .icon { flex: none; width: 1.6rem; height: 1.6rem; color: var(--petrol-600); }
.selector-card .arrow { margin-left: auto; color: var(--accent-500); opacity: 0; transition: opacity .15s, transform .15s; transform: translateX(-4px); }
.selector-card:hover .arrow { opacity: 1; transform: none; }

/* Tarjeta de solución/categoría */
.sol-card {
  position: relative; display: flex; flex-direction: column; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.35rem 1.4rem 1.2rem; box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.sol-card:hover { transform: translateY(-3px); border-color: var(--accent-500); box-shadow: var(--shadow-2); }
.sol-card .sol-area { font-size: var(--fs-0); font-weight: 660; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol-600); }
.sol-card h3 { font-size: var(--fs-3); margin: 0; }
.sol-card p { font-size: var(--fs-1); color: var(--tx-700); margin: 0; }
.sol-card .sol-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .6rem; }
.sol-card .tagx { font-size: .7rem; font-weight: 620; color: var(--tx-500); background: var(--tech-gray); border-radius: 999px; padding: .12rem .55rem; }

/* Buscador */
.search-box { position: relative; max-width: 34rem; }
.search-box input {
  width: 100%; font: inherit; padding: .85rem 1.1rem .85rem 2.8rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(47,163,184,.15); }
.search-box .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--tx-500); }
.search-results {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  max-height: 22rem; overflow-y: auto; display: none;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: .7rem 1rem; text-decoration: none; color: var(--tx-900); border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.sel { background: var(--soft-sky); }
.search-results .sr-type { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol-600); }
.search-results .sr-empty { padding: .9rem 1rem; color: var(--tx-500); font-size: var(--fs-1); }

/* Wizard «Encuentra tu solución» */
.wizard { max-width: 46rem; margin-inline: auto; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wz-in .35s var(--ease); }
@keyframes wz-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wizard-progress { display: flex; gap: .4rem; margin-bottom: 1.6rem; }
.wizard-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); transition: background .3s; }
.wizard-progress span.done { background: var(--accent-500); }
.wizard-options { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); margin-top: 1.2rem; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 1.6rem; }
.wizard-result { display: none; }
.wizard-result.active { display: block; animation: wz-in .35s var(--ease); }

/* Tabs */
.tabs { border-bottom: 1.5px solid var(--line); display: flex; gap: .2rem; flex-wrap: wrap; }
.tab-btn {
  font: inherit; font-size: var(--fs-1); font-weight: 610; color: var(--tx-500);
  background: none; border: 0; border-bottom: 2.5px solid transparent;
  padding: .7rem 1rem; cursor: pointer; margin-bottom: -1.5px;
}
.tab-btn:hover { color: var(--petrol-700); }
.tab-btn[aria-selected="true"] { color: var(--petrol-700); border-bottom-color: var(--accent-500); }
.tab-panel { display: none; padding-top: 1.4rem; }
.tab-panel.active { display: block; }

/* Banda CTA dual (busco / ofrezco) */
.cta-dual { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.cta-dual .cta-cardx {
  border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: .6rem; align-items: flex-start;
}
.cta-cardx.demand { background: linear-gradient(135deg, var(--soft-sky), #fff); border: 1px solid var(--line); }
.cta-cardx.supply { background: linear-gradient(135deg, var(--ink-800), var(--ink-900)); color: var(--tx-inv); }
.cta-cardx.supply h3, .cta-cardx.supply h2 { color: #fff; }
.cta-cardx.supply p { color: var(--tx-inv-soft); }
.cta-cardx .btn { margin-top: .6rem; }

/* Guía Academy */
.lesson { border-left: 3px solid var(--accent-300); padding-left: 1.3rem; margin-block: 2rem; }
.lesson h2 { margin-top: 0; }
.guide-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: var(--fs-1); color: var(--tx-500); margin-top: .8rem; }
.objectives { background: var(--soft-mint); border-radius: var(--r-md); padding: 1.2rem 1.5rem; margin-block: 1.4rem; }
.objectives h2 { font-size: var(--fs-3); margin-bottom: .6rem; }

/* Índice de contenidos (artículos/guías) */
.toc { background: var(--sand-100); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.4rem; margin-block: 1.4rem; font-size: var(--fs-1); }
.toc ol { margin: .4rem 0 0; padding-left: 1.2em; display: grid; gap: .3rem; }
.toc a { text-decoration: none; color: var(--petrol-700); }
.toc a:hover { text-decoration: underline; }

/* Estados vacíos */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--tx-500); border: 1.5px dashed var(--line); border-radius: var(--r-md); }
.empty-state .icon { width: 2.2rem; height: 2.2rem; margin-inline: auto; margin-bottom: .8rem; color: var(--tx-500); }

/* Badge de cobertura GEO */
.badge-cov { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-0); font-weight: 650; padding: .3rem .8rem; border-radius: 999px; }
.badge-cov.directa { background: #e2f2ea; color: #1e5c40; }
.badge-cov.agentes { background: #eef1f2; color: var(--tx-700); }

/* Mega-nav ligera v3: columnas en submenú ancho */
.nav-sub.wide { min-width: 22rem; }

/* Banda de novedades */
.news-strip { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x proximity; }
.news-strip > * { scroll-snap-align: start; min-width: 17rem; }

/* Ajustes de metadatos de artículo en hero luminoso */
.hero-light .article-meta { color: var(--tx-500); }
.hero-light .article-meta .tag { background: #dff0f4; color: var(--petrol-700); }
.hero-light .flow-list li::before { color: var(--petrol-600); }

/* Footer: enlaces dentro de la marca (correo) legibles sobre oscuro */
.footer-brand a:not(.brand) { color: var(--accent-300); }
.footer-brand a:not(.brand):hover { color: #fff; }

/* Trust-flow sobre superficies claras (v3) */
.surface-white .trust-node, .surface-ivory .trust-node, .surface-sky .trust-node, .surface-mint .trust-node, .surface-rose .trust-node {
  background: #fff; border-color: var(--line); box-shadow: var(--shadow-1);
}
.surface-white .trust-node p, .surface-ivory .trust-node p, .surface-sky .trust-node p, .surface-mint .trust-node p, .surface-rose .trust-node p { color: var(--ink-900); }
.surface-white .trust-node .icon, .surface-ivory .trust-node .icon, .surface-sky .trust-node .icon, .surface-mint .trust-node .icon, .surface-rose .trust-node .icon { color: var(--petrol-600); }
.surface-white .trust-node::after, .surface-ivory .trust-node::after, .surface-sky .trust-node::after, .surface-mint .trust-node::after, .surface-rose .trust-node::after { color: var(--tx-500); }

/* ============================================================
   AMIRIEM Navigator — panel del asistente profesional (v3 AI)
   Integrado en /encuentra-tu-solucion/: lateral en escritorio,
   inferior en móvil. Parte del diseño, nunca burbuja flotante.
   ============================================================ */
.nav-ai-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 981px) { .nav-ai-layout { grid-template-columns: minmax(0, 1.5fr) minmax(20rem, 1fr); } }

.nav-ai-panel {
  background: linear-gradient(160deg, #fff, var(--soft-sky));
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 981px) { .nav-ai-panel { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); } }

.nav-ai-head { padding: 1.1rem 1.2rem .9rem; border-bottom: 1px solid var(--line); }
.nav-ai-head .kicker { margin-bottom: .15rem; }
.nav-ai-head h2 { font-size: var(--fs-2, 1.15rem); margin: 0 0 .25rem; }
.nav-ai-head p { font-size: var(--fs-0); color: var(--tx-500); margin: 0; }

.nav-ai-thread { padding: 1rem 1.2rem; overflow-y: auto; flex: 1; min-height: 8rem; max-height: 24rem; display: flex; flex-direction: column; gap: .9rem; }
.nav-ai-turn { border-radius: 10px; padding: .8rem .95rem; font-size: var(--fs-0); line-height: 1.55; }
.nav-ai-turn-user { background: var(--petrol-700); color: var(--tx-inv); align-self: flex-end; max-width: 90%; }
.nav-ai-turn-user .nav-ai-q { margin: 0; }
.nav-ai-turn-bot { background: #fff; border: 1px solid var(--line); align-self: stretch; }
.nav-ai-a { margin: 0 0 .5rem; color: var(--tx-900); }
.nav-ai-block { margin-top: .55rem; }
.nav-ai-label { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--tx-500); margin-bottom: .25rem; }
.nav-ai-list { margin: 0; padding-left: 1.1rem; }
.nav-ai-list li { margin-bottom: .2rem; }
.nav-ai-list a { color: var(--petrol-600); }
.nav-ai-date { margin: .5rem 0 0; font-size: .78rem; color: var(--tx-500); }
.nav-ai-cta { margin-top: .7rem; }

.nav-ai-suggestions { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0 1.2rem .6rem; }
.nav-ai-suggestion { font-size: .8rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .32rem .75rem; cursor: pointer; color: var(--tx-700); transition: border-color .15s, color .15s; }
.nav-ai-suggestion:hover { border-color: var(--accent-500); color: var(--petrol-700); }

.nav-ai-form { display: flex; gap: .5rem; padding: .9rem 1.2rem 1.1rem; border-top: 1px solid var(--line); background: #fff; }
.nav-ai-input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .85rem; font: inherit; font-size: var(--fs-0); color: var(--tx-900); }
.nav-ai-input:focus { outline: 2px solid var(--accent-400); outline-offset: 1px; border-color: var(--accent-500); }
.nav-ai-status { min-height: 1.1rem; font-size: .78rem; color: var(--tx-500); padding: 0 1.2rem .35rem; background: #fff; }
.nav-ai-foot { padding: .55rem 1.2rem .8rem; background: #fff; font-size: .72rem; color: var(--tx-500); border-top: 1px dashed var(--line); margin: 0; }

/* Móvil: panel inferior dentro del flujo (tras el wizard), input cómodo */
@media (max-width: 980px) {
  .nav-ai-panel { border-radius: 14px 14px 0 0; }
  .nav-ai-thread { max-height: 19rem; }
  .nav-ai-input { font-size: 16px; } /* evita zoom iOS */
}

/* Utilidad accesible (etiquetas solo para lector de pantalla) */
.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; }

/* El atributo hidden debe ganar al display del panel (visitantes sin JS) */
.nav-ai-panel[hidden] { display: none; }

/* Móvil: legibilidad y objetivos táctiles (OAR F8)
   --fs-0 (12.8px) sube a 13px+ en pantallas táctiles y los botones
   pequeños alcanzan ≥44px de alto. Sin cambios en escritorio. */
@media (max-width: 980px) {
  :root { --fs-0: .8125rem; } /* 13px */
  .btn-sm { padding-block: .72rem; min-height: 44px; }
}
