/* ==========================================================================
   Liset Z. Sairitupa Sanchez — Sitio de investigación
   Dirección visual: editorial cálida + motivos psicométricos (puntos Likert,
   barras de carga factorial). Tipografías: Fraunces (display),
   Bricolage Grotesque (texto/UI), IBM Plex Mono (cifras).
   ========================================================================== */

:root {
  --cream: #F5EEE2;
  --cream-2: #EDE3D2;
  --paper: #FFFBF4;
  --ink: #1B1714;
  --ink-2: #4A423B;
  --ink-3: #7A6F64;
  --line: #D9CCB8;
  --marigold: #F2B231;
  --terra: #D2552C;
  --forest: #1F4A3D;
  --cobalt: #2D55D8;

  --c-ia: #2D55D8;
  --c-sm: #D2552C;
  --c-sl: #1F7A5C;
  --c-ed: #C98A0E;

  --f-display: 'Fraunces', Georgia, serif;
  --f-body: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 0 rgba(27, 23, 20, .06), 0 18px 40px -24px rgba(27, 23, 20, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
/* Grano sutil de papel */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--marigold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; margin: 0; font-variation-settings: 'SOFT' 50, 'opsz' 144; }
.display { font-size: clamp(2.6rem, 6.6vw, 6.2rem); font-weight: 500; letter-spacing: -.035em; line-height: .98; }
.display em, .h-xl em, .h-lg em { font-style: italic; font-weight: 400; color: var(--terra); font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; }
.h-xl { font-size: clamp(2.2rem, 4.8vw, 4.2rem); }
.h-lg { font-size: clamp(1.8rem, 3.4vw, 2.9rem); }
.h-md { font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.15; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.eyebrow {
  display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }

/* Motivo: puntos Likert */
.likert-dots { display: inline-flex; gap: 6px; align-items: center; }
.likert-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; display: block; }
.likert-dots i.on { background: currentColor; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; text-decoration: none; line-height: 1.1;
  border: 2px solid var(--ink); background: transparent;
  transition: transform .2s ease, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: var(--terra); border-color: var(--terra); }
.btn-gold { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.btn-gold:hover { box-shadow: 0 10px 24px -10px rgba(242, 178, 49, .9); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-sm { padding: .55rem .95rem; font-size: .88rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Cabecera ---------- */
.topline {
  background: var(--ink); color: var(--cream);
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  overflow: hidden; white-space: nowrap;
}
.topline .track { display: inline-flex; gap: 3rem; padding: .55rem 0; animation: marquee 38s linear infinite; }
.topline span::before { content: '●'; color: var(--marigold); margin-right: .8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--marigold);
  display: grid; place-items: center; font-family: var(--f-display); font-style: italic; font-size: 1.25rem; font-weight: 600;
}
.brand-name { font-family: var(--f-display); font-size: 1.12rem; font-weight: 600; line-height: 1.05; }
.brand-name small { display: block; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.nav-links { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; font-weight: 500; font-size: .95rem; padding: .5rem .85rem; border-radius: 999px;
  transition: background .2s;
}
.nav-links a:hover { background: var(--cream-2); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.nav-cta { display: flex; gap: .5rem; align-items: center; }
.menu-btn { display: none; background: none; border: 2px solid var(--ink); border-radius: 999px; padding: .45rem .9rem; font-weight: 600; }

@media (max-width: 1040px) {
  .nav-links, .nav-cta .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { font-size: 1.3rem; font-family: var(--f-display); padding: .6rem 0; border-radius: 0; }
  .nav-links.open a[aria-current="page"] { background: none; color: var(--terra); }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; position: relative; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.bg-ink { background: var(--ink); color: var(--cream); }
.bg-ink .lead, .bg-ink .eyebrow { color: #CFC4B5; }
.bg-paper { background: var(--paper); }
.bg-gold { background: var(--marigold); }
.bg-forest { background: var(--forest); color: var(--cream); }
.sec-head { display: grid; gap: 1rem; margin-bottom: clamp(32px, 5vw, 56px); max-width: 860px; }
.sec-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: clamp(32px, 5vw, 56px); }

/* ---------- Hero (inicio) ---------- */
.hero { padding: clamp(32px, 5vw, 64px) 0 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero-copy { padding-bottom: clamp(40px, 7vw, 96px); }
.hero-copy .display { margin: 1.2rem 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-photo { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 520px; }
.hero-sun {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(92%, 520px); aspect-ratio: 1; border-radius: 50% 50% 0 0;
  background: var(--marigold);
  height: 78%;
}
.hero-sun::after {
  content: ''; position: absolute; inset: 9% 9% 0; border-radius: 50% 50% 0 0;
  border: 2px dashed rgba(27, 23, 20, .25); border-bottom: 0;
}
.hero-photo img { position: relative; z-index: 2; width: min(100%, 560px); filter: drop-shadow(0 30px 40px rgba(27, 23, 20, .18)); animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both .15s; }
.hero-tag {
  position: absolute; z-index: 3; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md);
  padding: .7rem 1rem; box-shadow: 6px 6px 0 var(--ink); font-size: .85rem; line-height: 1.25;
  animation: pop .7s cubic-bezier(.2, .9, .3, 1.3) both;
}
.hero-tag b { display: block; font-family: var(--f-display); font-size: 1.45rem; font-weight: 600; }
.hero-tag.t1 { top: 16%; left: -2%; animation-delay: .7s; }
.hero-tag.t2 { bottom: 14%; right: -2%; animation-delay: .9s; background: var(--ink); color: var(--cream); box-shadow: 6px 6px 0 var(--terra); }
.hero-tag.t3 { bottom: 40%; right: 2%; animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes pop { from { opacity: 0; transform: scale(.7) rotate(-4deg); } }
.reveal-up { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .hero-photo { min-height: 0; margin-top: 1rem; }
  .hero-photo img { width: min(100%, 380px); }
  .hero-sun { width: min(88%, 360px); height: 70%; }
  .hero-tag.t1 { left: 0; } .hero-tag.t2 { right: 0; } .hero-tag.t3 { display: none; }
}

/* Franja de credenciales */
.cred-strip { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--paper); }
.cred-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.cred { padding: 1.6rem 1.2rem; border-right: 1px solid var(--line); }
.cred:last-child { border-right: 0; }
.cred .num { font-family: var(--f-display); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.cred .lbl { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: .4rem; }
@media (max-width: 760px) { .cred-grid { grid-template-columns: 1fr 1fr; } .cred:nth-child(2) { border-right: 0; } .cred:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- "Ventanas" (tarjetas puerta) ---------- */
.doors { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.door {
  position: relative; border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); text-decoration: none;
  min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  border: 2px solid var(--ink); transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.door:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 10px 12px 0 var(--ink); }
.door h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: 14ch; }
.door p { margin: .8rem 0 0; max-width: 38ch; }
.door .arrow { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; align-self: flex-end; transition: transform .3s; }
.door:hover .arrow { transform: rotate(-45deg); }
.door .big-num { position: absolute; right: 18px; top: 6px; font-family: var(--f-display); font-size: 7rem; font-weight: 300; opacity: .14; line-height: 1; }
.door-a { grid-column: span 7; background: var(--ink); color: var(--cream); }
.door-b { grid-column: span 5; background: var(--marigold); }
.door-c { grid-column: span 4; background: var(--paper); }
.door-d { grid-column: span 4; background: var(--terra); color: var(--paper); }
.door-e { grid-column: span 4; background: var(--forest); color: var(--cream); }
@media (max-width: 900px) { .door-a, .door-b, .door-c, .door-d, .door-e { grid-column: span 12; min-height: 240px; } }

/* ---------- Líneas de investigación ---------- */
.lines { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid currentColor; }
.line-item { padding: 2rem 1.4rem 2rem 0; border-right: 1px solid rgba(245, 238, 226, .2); }
.line-item + .line-item { padding-left: 1.4rem; }
.line-item:last-child { border-right: 0; }
.line-item .idx { font-family: var(--f-mono); font-size: .8rem; color: var(--marigold); }
.line-item h3 { font-size: 1.55rem; margin: .8rem 0 .7rem; }
.line-item p { color: #CFC4B5; font-size: .95rem; margin: 0 0 1rem; }
.line-item a { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--marigold); }
.line-item .count { font-family: var(--f-display); font-size: 3rem; font-weight: 300; line-height: 1; }
@media (max-width: 900px) { .lines { grid-template-columns: 1fr 1fr; } .line-item { padding-left: 0 !important; border-right: 0; border-bottom: 1px solid rgba(245, 238, 226, .2); } }
@media (max-width: 560px) { .lines { grid-template-columns: 1fr; } }

/* ---------- Tarjetas de escala ---------- */
.scale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.scale-card {
  --ac: var(--ink);
  position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 1.5rem; text-decoration: none; display: flex; flex-direction: column; gap: .8rem;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.scale-card::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ac); }
.scale-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.scale-card .code { font-family: var(--f-mono); font-weight: 600; font-size: .85rem; color: var(--ac); letter-spacing: .04em; }
.scale-card h3 { font-size: 1.32rem; line-height: 1.15; }
.scale-card .meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 500;
  padding: .28rem .65rem; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); white-space: nowrap;
}
.chip-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip-gold { background: var(--marigold); border-color: var(--marigold); }
.chip-q1 { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.chip-q2 { background: #CFE3D6; border-color: #A9CBB5; }
.chip-q3 { background: #F6E1B8; border-color: #E6C887; }
.scale-card .stat-row { display: flex; gap: 1.2rem; font-family: var(--f-mono); font-size: .82rem; color: var(--ink-2); }
.scale-card .stat-row b { color: var(--ink); font-weight: 600; }
.scale-card .badge-items { position: absolute; top: 1.2rem; right: 1.2rem; }

/* ---------- Filtros / barra de herramientas ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: .6rem; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px; padding: .2rem 1.1rem;
}
.search input { flex: 1; border: 0; background: none; font: inherit; padding: .7rem 0; outline: none; min-width: 0; }
.select { border: 2px solid var(--ink); border-radius: 999px; padding: .75rem 1rem; background: var(--paper); font: inherit; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filter {
  border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: .45rem .95rem;
  font-size: .88rem; font-weight: 500; transition: background .2s, color .2s;
}
.filter:hover { background: var(--cream-2); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.filter .n { font-family: var(--f-mono); font-size: .75rem; opacity: .7; margin-left: .25rem; }
.result-count { font-family: var(--f-mono); font-size: .82rem; color: var(--ink-3); margin: 0 0 1rem; }

/* ---------- Lista de publicaciones ---------- */
.pub-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.pub {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 1.4rem; align-items: start;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .2s, padding .25s;
}
.pub:hover { background: var(--paper); padding-left: 1rem; padding-right: 1rem; }
.pub .yr { font-family: var(--f-display); font-size: 1.9rem; font-weight: 400; line-height: 1; }
.pub h3 { font-size: 1.22rem; line-height: 1.25; font-weight: 500; }
.pub .src { font-size: .9rem; color: var(--ink-2); margin-top: .35rem; }
.pub .src i { font-style: italic; }
.pub .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.pub .cites { text-align: right; font-family: var(--f-mono); font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.pub .cites b { display: block; font-family: var(--f-display); font-size: 1.8rem; color: var(--ink); font-weight: 500; }
@media (max-width: 640px) {
  .pub { grid-template-columns: 1fr auto; }
  .pub .yr { grid-column: 1 / -1; font-size: 1.2rem; }
}

/* ---------- Página de detalle ---------- */
.crumbs { font-family: var(--f-mono); font-size: .78rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.crumbs a { text-decoration: none; border-bottom: 1px solid var(--line); }
.detail-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); border-bottom: 2px solid var(--ink); }
.detail-hero h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 500; max-width: 22ch; }
.detail-hero .sub { font-family: var(--f-display); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--ink-2); margin-top: 1rem; max-width: 60ch; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 5vw, 72px); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); }
.detail-grid aside { position: sticky; top: 96px; align-self: start; display: grid; gap: 1rem; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } .detail-grid aside { position: static; } }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 1.4rem; }
.panel h4 { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: .8rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.prose { font-size: 1.06rem; max-width: 70ch; }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { font-size: 1.8rem; margin: 2.6rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.abstract-part { display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); margin-top: 1.2rem; }
.authors { display: flex; flex-wrap: wrap; gap: .4rem; }
.author { font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); }
.author.me { background: var(--marigold); border-color: var(--marigold); font-weight: 600; }
.cite-box { font-size: .9rem; background: var(--cream); border-radius: var(--r-sm); padding: 1rem; border: 1px dashed var(--ink-3); line-height: 1.5; word-break: break-word; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.tabs { display: flex; gap: .3rem; margin-bottom: .7rem; }
.tab { border: 0; background: none; font-family: var(--f-mono); font-size: .78rem; padding: .3rem .6rem; border-radius: 6px; color: var(--ink-3); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--cream); }

/* ---------- Ficha de escala ---------- */
.scale-hero { position: relative; overflow: hidden; }
.scale-hero .code-big {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(4rem, 13vw, 11rem); line-height: .85; letter-spacing: -.05em;
  color: var(--ac, var(--ink)); opacity: .95;
}
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink); border-radius: var(--r-md); overflow: hidden; background: var(--paper); margin-top: 2rem; }
.fact { padding: 1.1rem 1.2rem; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .v { font-family: var(--f-display); font-size: 1.9rem; font-weight: 500; line-height: 1.05; }
.fact .k { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.items-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.items-table th { text-align: left; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: .6rem .5rem; border-bottom: 2px solid var(--ink); }
.items-table td { padding: .85rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.items-table td.n { font-family: var(--f-mono); font-weight: 600; width: 3rem; color: var(--ac, var(--ink)); }
.items-table td.en { color: var(--ink-3); font-size: .9rem; font-style: italic; }
.items-table tr.excluded td { opacity: .45; text-decoration: line-through; }
.items-table .dim-tag { font-size: .72rem; }
@media (max-width: 720px) { .items-table td.en, .items-table th.en { display: none; } }

.anchors { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.anchors li { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; }
.anchors li b { font-family: var(--f-mono); margin-right: .35rem; }

/* Medidores de ajuste */
.fit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gauge { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1rem; }
.gauge .top { display: flex; justify-content: space-between; align-items: baseline; }
.gauge .name { font-family: var(--f-mono); font-size: .78rem; color: var(--ink-3); }
.gauge .val { font-family: var(--f-display); font-size: 1.6rem; font-weight: 500; }
.gauge .bar { height: 8px; border-radius: 99px; background: var(--cream-2); margin-top: .5rem; position: relative; overflow: hidden; }
.gauge .bar span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--forest); transform-origin: left; animation: grow 1.2s cubic-bezier(.2, .7, .2, 1) both .3s; }
.gauge .crit { font-size: .74rem; color: var(--ink-3); margin-top: .35rem; }
.gauge.ok .val::after { content: ' ✓'; color: var(--c-sl); font-size: 1rem; }
@keyframes grow { from { transform: scaleX(0); } }

.rel-row { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; align-items: center; }
.rel-row:last-child { border-bottom: 0; }
.rel-row .mono { font-size: .88rem; }

/* Dimensiones */
.dims { display: grid; gap: .6rem; }
.dim { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--paper); border: 1.5px solid var(--line); }
.dim strong { margin-right: auto; font-weight: 600; }
.dim .its { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-3); }

/* Aplicación en línea */
.live { background: var(--ink); color: var(--cream); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 44px); }
.live h2 { color: var(--cream); }
.live .q { padding: 1.3rem 0; border-bottom: 1px solid rgba(245, 238, 226, .15); }
.live .q p { margin: 0 0 .8rem; font-size: 1.05rem; }
.live .q p b { font-family: var(--f-mono); color: var(--marigold); margin-right: .5rem; }
.opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.opt {
  border: 1.5px solid rgba(245, 238, 226, .35); background: transparent; color: var(--cream); border-radius: 999px;
  min-width: 44px; padding: .5rem .8rem; font-size: .85rem; line-height: 1.15; transition: all .15s;
}
.opt:hover { border-color: var(--marigold); }
.opt[aria-pressed="true"] { background: var(--marigold); border-color: var(--marigold); color: var(--ink); font-weight: 600; transform: scale(1.04); }
.progress { height: 6px; background: rgba(245, 238, 226, .15); border-radius: 99px; overflow: hidden; margin: 1rem 0 0; }
.progress span { display: block; height: 100%; background: var(--marigold); width: 0; transition: width .3s; }
.result { margin-top: 1.5rem; padding: 1.4rem; border-radius: var(--r-md); background: var(--cream); color: var(--ink); display: none; }
.result.show { display: block; animation: rise .5s both; }
.result .score { font-family: var(--f-display); font-size: 3.4rem; font-weight: 500; line-height: 1; }
.meter { height: 14px; border-radius: 99px; background: linear-gradient(90deg, #CFE3D6, var(--marigold), var(--terra)); position: relative; margin: 1rem 0 .3rem; }
.meter i { position: absolute; top: -6px; width: 4px; height: 26px; background: var(--ink); border-radius: 2px; transform: translateX(-2px); transition: left .6s cubic-bezier(.2, .7, .2, 1); }
.meter-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: .75rem; color: var(--ink-3); }
.disclaimer { font-size: .82rem; color: #CFC4B5; margin-top: 1rem; }

/* Bloque de código */
pre.code {
  background: #13100E; color: #F2E9DA; border-radius: var(--r-sm); padding: 1.1rem 1.2rem; overflow-x: auto;
  font-family: var(--f-mono); font-size: .84rem; line-height: 1.6; margin: 0;
}
pre.code .c { color: #8F8577; }
pre.code .k { color: var(--marigold); }

/* ---------- Gráficos ---------- */
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-3); }
.chart .bar { fill: var(--ink); transition: fill .2s; }
.chart .bar:hover { fill: var(--terra); }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 600; }
.bars-h { display: grid; gap: .55rem; }
.bars-h .row { display: grid; grid-template-columns: 170px 1fr 44px; gap: .8rem; align-items: center; font-size: .88rem; }
.bars-h .track { height: 12px; background: var(--cream-2); border-radius: 99px; overflow: hidden; }
.bars-h .fill { height: 100%; background: var(--ink); border-radius: 99px; animation: grow 1s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
.bars-h .row .mono { text-align: right; }
@media (max-width: 560px) { .bars-h .row { grid-template-columns: 110px 1fr 36px; } }

/* ---------- Trayectoria ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.portrait { position: relative; }
.portrait img { border-radius: 260px 260px var(--r-lg) var(--r-lg); border: 2px solid var(--ink); aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; width: 100%; background: var(--marigold); }
.portrait .stamp {
  position: absolute; right: -14px; bottom: 32px; width: 130px; height: 130px; border-radius: 50%; background: var(--terra); color: var(--paper);
  display: grid; place-items: center; text-align: center; font-family: var(--f-display); line-height: 1; transform: rotate(-10deg);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
}
.portrait .stamp b { font-size: 2.6rem; display: block; }
.portrait .stamp small { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 420px; } }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 1.8rem 1.6rem; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--marigold); border: 2px solid var(--ink); }
.timeline .when { font-family: var(--f-mono); font-size: .8rem; color: var(--terra); }
.timeline h4 { font-size: 1.25rem; margin: .2rem 0 .3rem; }
.timeline p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.ids { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.id-card { padding: 1.1rem 1.2rem; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); text-decoration: none; transition: border-color .2s; }
.id-card:hover { border-color: var(--ink); }
.id-card .k { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.id-card .v { font-family: var(--f-display); font-size: 1.25rem; font-weight: 500; margin-top: .2rem; word-break: break-all; }
.coauthors { display: flex; flex-wrap: wrap; gap: .45rem; }
.coauthor { padding: .4rem .8rem; border-radius: 999px; border: 1.5px solid var(--ink); font-size: .88rem; }
.coauthor b { font-family: var(--f-mono); font-size: .76rem; margin-left: .35rem; color: var(--terra); }

/* ---------- Manifiesto / cita ---------- */
.quote { font-family: var(--f-display); font-size: clamp(1.8rem, 4.2vw, 3.6rem); font-weight: 400; line-height: 1.12; letter-spacing: -.02em; max-width: 24ch; margin: 0; }
.quote em { color: var(--marigold); font-variation-settings: 'SOFT' 100, 'WONK' 1; }

/* ---------- Contacto ---------- */
.form { display: grid; gap: 1rem; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 40px); box-shadow: 10px 10px 0 var(--ink); }
.form label { font-weight: 600; font-size: .9rem; display: grid; gap: .35rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .8rem 1rem; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--cream);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; }
.form textarea { min-height: 140px; resize: vertical; }
.form input, .form select, .form textarea { width: 100%; min-width: 0; }
.form label { min-width: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.topic { padding: 1.4rem; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); }
.topic .ic { font-family: var(--f-display); font-style: italic; font-size: 2.2rem; color: var(--terra); line-height: 1; }
.topic h3 { font-size: 1.3rem; margin: .6rem 0 .4rem; }
.topic p { margin: 0; color: var(--ink-2); font-size: .94rem; }

.split-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
@media (max-width: 900px) { .split-hero { grid-template-columns: 1fr; } }

/* ---------- Imágenes nuevas ---------- */
.scale-card .cover { margin: -1.5rem -1.5rem .3rem; width: calc(100% + 3rem); max-width: none; aspect-ratio: 600 / 340; object-fit: cover; border-radius: calc(var(--r-md) - 2px) calc(var(--r-md) - 2px) 0 0; border-bottom: 1.5px solid var(--line); }
.scale-card::before { top: auto; height: 46%; bottom: 18px; }
.line-illu { width: 100%; border-radius: 16px; margin-bottom: 1.2rem; border: 2px solid rgba(245, 238, 226, .15); }
.meet { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.meet-art { position: relative; background: var(--marigold); border-radius: var(--r-lg); border: 2px solid var(--ink); overflow: hidden; aspect-ratio: 660 / 740; }
.meet-art img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; mix-blend-mode: multiply; }
.meet-art .badge { position: absolute; left: 18px; top: 18px; background: var(--ink); color: var(--cream); font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .45rem .8rem; border-radius: 999px; }
.degrees { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.degrees li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; padding: .9rem 1rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.degrees .yr { font-family: var(--f-display); font-size: 1.5rem; font-weight: 500; color: var(--terra); min-width: 3.2rem; }
.degrees b { display: block; font-weight: 600; }
.degrees small { color: var(--ink-3); }
@media (max-width: 860px) { .meet { grid-template-columns: minmax(0, 1fr); } .meet-art { max-width: 460px; } }
.avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.illu-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.illu-strip a { display: block; border-radius: 16px; overflow: hidden; border: 2px solid var(--ink); transition: transform .25s; text-decoration: none; position: relative; }
.illu-strip a:hover { transform: translateY(-4px) rotate(-1deg); }
.illu-strip span { position: absolute; left: 10px; bottom: 10px; background: var(--ink); color: var(--cream); font-size: .78rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; }
@media (max-width: 700px) { .illu-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scale-cover { width: min(100%, 420px); border-radius: var(--r-md); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.scale-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
@media (max-width: 860px) { .scale-hero-grid { grid-template-columns: minmax(0, 1fr); } .scale-cover { width: min(100%, 360px); } }

/* ---------- Barra de aviso, menús desplegables y búsqueda ---------- */
.announce {
  display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .6rem var(--gutter);
  background: var(--ink); color: var(--cream); text-decoration: none; font-size: .86rem; min-width: 0;
}
.announce .tag { background: var(--marigold); color: var(--ink); font-family: var(--f-mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; flex: none; }
.announce .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch; min-width: 0; }
.announce .go { font-weight: 600; color: var(--marigold); flex: none; }
.announce:hover .t { text-decoration: underline; }

.nav-links > li { position: relative; }
.nav-top { display: inline-flex; align-items: center; gap: .3rem; }
.has-drop .drop {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px); min-width: 250px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--ink);
  padding: .5rem; opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; z-index: 60;
}
.has-drop .drop::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop ul { list-style: none; margin: 0; padding: 0; }
.drop a { display: block; padding: .55rem .8rem; border-radius: 10px; text-decoration: none; font-size: .92rem; }
.drop a:hover { background: var(--cream-2); }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; font-size: 1rem; }
.icon-btn:hover { background: var(--ink); color: var(--cream); }
@media (max-width: 1040px) {
  .nav-links.open .drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 .4rem .8rem; min-width: 0; }
  .nav-links.open .drop a { font-family: var(--f-body); font-size: 1rem; padding: .3rem 0; }
  .nav-links.open { max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-links.open .nav-top svg { display: none; }
}

.search-ov { position: fixed; inset: 0; z-index: 200; background: rgba(27, 23, 20, .55); backdrop-filter: blur(6px); padding: clamp(16px, 8vh, 96px) var(--gutter); }
.search-ov[hidden] { display: none; }
.search-box { max-width: 760px; margin: 0 auto; display: flex; gap: .6rem; align-items: center; }
.search-box .search { background: var(--paper); flex: 1; }
.search-box .icon-btn { background: var(--paper); }
.search-res { max-width: 760px; margin: 1rem auto 0; background: var(--paper); border-radius: var(--r-md); border: 2px solid var(--ink); padding: .8rem; max-height: 65vh; overflow-y: auto; }
.search-res:empty { display: none; }
.search-res h6 { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: .6rem .6rem .3rem; font-weight: 500; }
.search-res a { display: block; padding: .6rem; border-radius: 10px; text-decoration: none; font-size: .95rem; line-height: 1.35; }
.search-res a:hover { background: var(--cream-2); }
.search-res a b { margin-right: .5rem; font-size: .8rem; }
.search-res a.all { font-weight: 600; color: var(--terra); }
.search-res p { padding: .6rem; margin: 0; }

.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2.5rem; }
.foot-top .foot-big { margin: 0; }
.socials { display: flex; gap: .6rem; }
.socials a { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(245, 238, 226, .4); display: grid; place-items: center; text-decoration: none; color: var(--cream); font-family: var(--f-mono); font-weight: 600; font-size: .82rem; transition: background .2s, color .2s; }
.socials a:hover { background: var(--marigold); color: var(--ink); border-color: var(--marigold); }
.foot-grid-5 { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
@media (max-width: 960px) { .foot-grid-5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid-5 { grid-template-columns: 1fr; } }

/* ---------- Secciones de inicio al estilo editorial ---------- */
.hero-simple .display { font-size: clamp(2.8rem, 7.4vw, 7rem); }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 2rem; }
.platforms .lbl { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-right: .4rem; }
.platform { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .45rem; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; background: var(--paper); transition: transform .2s, box-shadow .2s; }
.platform:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
.platform i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--f-mono); font-size: .72rem; color: #fff; }

.journals { padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.journals .lbl { text-align: center; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.3rem; }
.journal-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.4rem; }
.journal-row span { font-family: var(--f-display); font-size: clamp(1.05rem, 1.8vw, 1.45rem); font-weight: 500; color: var(--ink-2); font-style: italic; white-space: nowrap; }
.praise { max-width: 900px; margin: 2rem auto 0; text-align: center; min-height: 7.5rem; position: relative; }
.praise blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.15rem, 2.2vw, 1.6rem); line-height: 1.3; transition: opacity .5s; }
.praise cite { display: block; margin-top: .8rem; font-style: normal; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.praise-dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.praise-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; padding: 0; }
.praise-dots button[aria-current="true"] { background: var(--ink); }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature .big { font-family: var(--f-display); font-size: clamp(3.4rem, 9vw, 8rem); font-weight: 300; line-height: .9; letter-spacing: -.05em; }
.feature-media { border-radius: var(--r-lg); border: 2px solid var(--ink); overflow: hidden; box-shadow: 12px 12px 0 var(--ink); background: var(--paper); }
.feature-media img { width: 100%; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.rail-card { scroll-snap-align: start; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.rail-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.rail-card img { width: 100%; aspect-ratio: 600 / 340; object-fit: cover; border-bottom: 1.5px solid var(--line); }
.rail-card .body { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .4rem; }
.rail-card .rank { font-family: var(--f-mono); font-size: .78rem; color: var(--terra); font-weight: 600; }
.rail-card h3 { font-size: 1.08rem; line-height: 1.25; font-weight: 500; }
.rail-nav { display: flex; gap: .5rem; }

.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.topic-tile { display: flex; flex-direction: column; gap: .8rem; padding: 1.3rem; border-radius: var(--r-md); border: 2px solid var(--ink); text-decoration: none; background: var(--paper); transition: background .2s, transform .2s; }
.topic-tile:hover { background: var(--marigold); transform: translateY(-3px); }
.topic-tile .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.4rem; font-style: italic; color: #fff; }
.topic-tile b { font-family: var(--f-display); font-size: 1.25rem; font-weight: 500; }
.topic-tile small { color: var(--ink-3); font-family: var(--f-mono); font-size: .74rem; }
@media (max-width: 860px) { .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.big-search { max-width: 760px; margin: 0 auto 2rem; }

.news { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: center; background: var(--terra); color: var(--paper); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 64px); border: 2px solid var(--ink); position: relative; overflow: hidden; }
.news::after { content: ''; position: absolute; right: -80px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; background: var(--marigold); opacity: .35; }
.news form { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; z-index: 1; }
.news input { flex: 1 1 220px; min-width: 0; font: inherit; padding: .85rem 1.1rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); }
@media (max-width: 860px) { .news { grid-template-columns: minmax(0, 1fr); } }

.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 32%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track figure { margin: 0; scroll-snap-align: start; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--ink); background: var(--marigold); aspect-ratio: 4 / 5; }
.carousel-track img { width: 100%; height: 100%; object-fit: cover; }
.carousel-track figure.contain img { object-fit: contain; background: var(--cream); }
@media (max-width: 700px) { .carousel-track { grid-auto-columns: 78%; } }

/* ---------- Licencia y carta de autorización ---------- */
.free-badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--forest); color: var(--cream); border-radius: 999px; padding: .32rem .75rem; font-size: .78rem; font-weight: 600; }
.free-badge::before { content: '✓'; color: var(--marigold); }
.license { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; background: #E3EFE8; border: 2px solid var(--forest); border-radius: var(--r-md); padding: 1.3rem 1.4rem; }
.license .seal { width: 64px; height: 64px; border-radius: 50%; background: var(--forest); color: var(--marigold); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.6rem; font-style: italic; }
.license h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.license p { margin: 0 0 .6rem; font-size: .96rem; }

.permit-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.permit-layout .form { position: sticky; top: 96px; box-shadow: 6px 6px 0 var(--ink); }
@media (max-width: 980px) { .permit-layout { grid-template-columns: minmax(0, 1fr); } .permit-layout .form { position: static; } }
.letter {
  background: #fff; color: #1B1714; border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 64px) clamp(24px, 5vw, 72px); font-size: 15.5px; line-height: 1.65; position: relative; overflow: hidden;
}
.letter::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--marigold); opacity: .18; }
.letter-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 2px solid #1B1714; padding-bottom: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.letter-head .who { font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.letter-head .who small { display: block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #6B6158; font-weight: 400; margin-top: .3rem; }
.letter-head .ref { font-family: var(--f-mono); font-size: .74rem; text-align: right; color: #4A423B; }
.letter h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-align: center; margin: .4rem 0 1.4rem; letter-spacing: -.01em; }
.letter p { margin: 0 0 .95rem; text-align: justify; }
.letter .fill { font-weight: 600; border-bottom: 1px dotted #1B1714; padding: 0 .15rem; }
.letter ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.letter ol li { margin-bottom: .45rem; }
.letter .sign { margin-top: 2.4rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.letter .sig-mark { font-family: 'Allura', 'Brush Script MT', cursive; font-size: 3.1rem; line-height: 1; color: #1F3E8A; transform: rotate(-4deg); margin: 0 0 -.2rem .4rem; }
.letter .sig-line { border-top: 1.5px solid #1B1714; padding-top: .45rem; min-width: 280px; font-size: .9rem; line-height: 1.4; }
.letter .sig-line b { font-size: 1rem; }
.letter .stamp-free { width: 116px; height: 116px; border-radius: 50%; border: 3px double var(--forest); color: var(--forest); display: grid; place-items: center; text-align: center; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-12deg); line-height: 1.3; }
.letter .stamp-free b { display: block; font-family: var(--f-display); font-size: 1.15rem; letter-spacing: 0; text-transform: none; }
.letter .foot { margin-top: 2rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .74rem; color: #6B6158; font-family: var(--f-mono); }
@media print {
  .permit-layout { display: block; padding: 0; }
  .permit-layout .form, .permit-actions { display: none !important; }
  @page { size: A4; margin: 14mm 16mm; }
  .letter { box-shadow: none; border: 0; padding: 0; font-size: 10pt; line-height: 1.45; }
  .letter h1 { font-size: 15pt; margin: .2rem 0 .8rem; }
  .letter p { margin-bottom: .55rem; }
  .letter ol li { margin-bottom: .2rem; }
  .letter-head { margin-bottom: .9rem; padding-bottom: .6rem; }
  .letter .sign { margin-top: 1.1rem; break-inside: avoid; }
  .letter .sig-mark { font-size: 2.5rem; }
  .letter .foot { margin-top: .9rem; }
  .letter::after { opacity: .12; }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: clamp(56px, 8vw, 96px) 0 2rem; }
.foot-big { font-family: var(--f-display); font-size: clamp(2.4rem, 7vw, 6rem); font-weight: 400; line-height: .95; letter-spacing: -.04em; margin: 0 0 2.5rem; }
.foot-big em { color: var(--marigold); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-top: 2.5rem; border-top: 1px solid rgba(245, 238, 226, .2); }
.foot-grid h5 { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--marigold); margin: 0 0 1rem; font-weight: 500; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot-grid a { text-decoration: none; color: #DCD2C3; }
.foot-grid a:hover { color: var(--marigold); }
.foot-grid p { color: #B5AA9B; font-size: .92rem; margin: 0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; font-family: var(--f-mono); font-size: .74rem; color: #8F8577; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 1000;
  background: var(--ink); color: var(--cream); padding: .8rem 1.2rem; border-radius: 999px; font-size: .9rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Impresión (ficha descargable de la escala) ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 16mm; }
  body { background: #fff; font-size: 11pt; }
  body::before, .topline, .announce, .search-ov, .site-header, .site-footer, .no-print, .live, aside, .toast { display: none !important; }
  .print-only { display: block; }
  .detail-grid { display: block; padding: 0; }
  .detail-hero { padding: 0 0 10pt; }
  .panel, .gauge, .dim { break-inside: avoid; background: #fff; }
  .items-table tr { break-inside: avoid; }
  .items-table td.en { display: table-cell !important; }
  a { text-decoration: none; }
  .reveal { opacity: 1; transform: none; }
}
