/* Spanish page-level adapters for the shared Lex Agentica v2 system. */
.es-v2 {
  --es-content: 1160px;
  --la-action: #8F3E3A;
  --la-action-hover: #76322F;
  --la-issue: #A33A32;
  --burgundy: var(--la-action);
  --burgundy-dark: var(--la-action-hover);
}
.es-v2 .la-header { background: rgba(248,247,242,.96); }
.es-v2 .la-header-inner { min-height: 76px; grid-template-columns: auto 1fr auto; gap: 30px; }
.es-v2 .la-brand img { width: 205px; }
.es-v2 .la-nav { justify-content: center; gap: clamp(20px,2.6vw,38px); }
.es-v2 .la-header-cta { justify-self: end; }
.es-v2 .button-primary,
.es-v2 .btn-primary,
.es-v2 .btn-submit {
  border-color: var(--la-action) !important;
  background: var(--la-action) !important;
  color: var(--la-paper) !important;
}
.es-v2 .button-primary:hover,
.es-v2 .btn-primary:hover,
.es-v2 .btn-submit:hover {
  border-color: var(--la-action-hover) !important;
  background: var(--la-action-hover) !important;
}
.es-v2 main { overflow: clip; }
.es-v2 .shell {
  width: 100%;
  max-width: var(--la-shell);
  margin-inline: auto;
  padding-inline: 42px;
}
.es-v2 .narrow {
  width: min(760px, calc(100% - 84px));
  margin-inline: auto;
}
.es-v2 .hero {
  padding: clamp(58px, 6vw, 86px) 0;
}
.es-v2 .section {
  width: 100%;
  max-width: none;
  padding: clamp(64px, 7vw, 96px) 0;
}
.es-v2 .section.tint { background: var(--la-sage); }
.es-v2 .section-head {
  max-width: var(--la-shell);
  margin: 0 auto 42px;
  padding-inline: 42px;
}
.es-v2 .section > .shell > .section-head { padding-inline: 0; }
.es-v2 .grid-2,
.es-v2 .grid-3,
.es-v2 .grid-4 { align-items: stretch; }
.es-v2 .card {
  border-color: var(--la-line);
  border-radius: 4px;
  background: var(--la-paper);
  box-shadow: none;
}
.es-v2 .cta-band {
  border-top: 4px solid var(--la-coral);
  background: var(--la-forest-dark);
}
.es-v2 .cta-band h2 { color: var(--la-paper); }
.es-v2 .cta-band p { color: var(--la-sage-deep); }
.es-v2 .cta-band .button-primary {
  border-color: var(--la-action) !important;
  background: var(--la-action) !important;
}
.es-v2 .cta-band .button-primary:hover {
  border-color: var(--la-action-hover) !important;
  background: var(--la-action-hover) !important;
}
.es-v2 .cta-band .button-secondary {
  border-color: var(--la-sage-deep) !important;
  background: transparent !important;
  color: var(--la-paper) !important;
}
.es-v2 .cta-band .button-secondary:hover {
  border-color: var(--la-paper) !important;
  background: rgba(255,255,255,.08) !important;
  color: var(--la-paper) !important;
}
.es-v2 .research-source-link {
  max-width: 70ch;
  margin-top: 20px;
  color: var(--la-sage-deep);
  font-size: 15px;
}
.es-v2 .research-source-link a {
  color: var(--la-paper);
  font-weight: 700;
  text-decoration: underline;
}
.es-v2 .research-programme {
  padding: clamp(30px,5vw,56px);
  border: 1px solid var(--la-line);
  border-radius: 4px;
  background: var(--la-sage);
}
.es-v2 .research-programme h2 { max-width: 23ch; }
.es-v2 .research-programme-copy { max-width: 72ch; margin-top: 22px; color: var(--la-muted); }

/* Blog */
.es-v2.la-blog-index .hero-grid {
  display: grid;
  grid-template-columns: minmax(0,.98fr) minmax(420px,.82fr);
  gap: clamp(38px,4vw,66px);
  align-items: center;
}
.es-v2 .hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 28px;
  color: var(--la-muted);
  font-size: 14px;
}
.es-v2 .hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--la-sage-deep);
}
.es-v2 .hero-index {
  border: 1px solid var(--la-line);
  border-radius: 4px;
  background: var(--la-paper);
  padding: 30px 30px 12px;
}
.es-v2 .index-label {
  margin: 0 0 6px;
  color: var(--la-forest);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.es-v2 .index-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--la-line);
  color: inherit;
  text-decoration: none;
}
.es-v2 .index-num { color: var(--la-action); font-family: var(--la-display); }
.es-v2 .index-item h4 { margin: 0 0 4px; font-size: 17px; line-height: 1.25; }
.es-v2 .index-item span:last-child { color: var(--la-muted); font-size: 13px; }
.es-v2 .featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
  border: 1px solid var(--la-line);
  border-radius: 4px;
  background: var(--la-paper);
}
.es-v2 .featured-media {
  position: relative;
  min-height: 380px;
  background: var(--la-sage);
}
.es-v2 .featured-media img,
.es-v2 .article-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}
.es-v2 .featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px,4vw,48px);
}
.es-v2 .featured-content h3 { font-size: clamp(25px,2.4vw,34px); line-height: 1.14; }
.es-v2 .label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
}
.es-v2 .articles-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 26px;
}
.es-v2 .article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--la-line);
  border-radius: 4px;
  background: var(--la-paper);
}
.es-v2 .article-media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--la-sage);
}
.es-v2 .article-media-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  color: var(--la-forest);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.es-v2 .article-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}
.es-v2 .article-body h3 { font-size: 22px; line-height: 1.2; }
.es-v2 .article-body .text-link { margin-top: auto; color: var(--la-action); font-weight: 700; }
.es-v2 .paths { background: var(--la-sage); }
.es-v2 .author {
  display: grid;
  grid-template-columns: minmax(240px,.38fr) 1fr;
  gap: clamp(30px,5vw,60px);
  align-items: center;
  padding: clamp(30px,5vw,56px);
  border-top: 4px solid var(--la-coral);
  border-radius: 4px;
  background: var(--la-forest-dark);
  color: var(--la-paper);
}
.es-v2 .author h2 { color: var(--la-paper); }
.es-v2 .author p,
.es-v2 .author li { color: var(--la-sage-deep); }
.es-v2 .author-img img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top center;
}
.es-v2 .author-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

/* Contact */
.es-v2 .contact-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(340px,420px);
}
.es-v2 .page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}
.es-v2 .form-col,
.es-v2 .sidebar-col { min-width: 0; }
.es-v2 .form-col .form-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.es-v2 .sidebar-col { display: flex; flex-direction: column; }
.es-v2 .pilar-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top center;
}
.es-v2 .pilar-name {
  margin: 20px 0 2px;
  color: var(--la-ink);
  font-family: var(--la-display);
  font-size: 26px;
}
.es-v2 .pilar-title { margin: 0 0 12px; color: var(--la-forest); font-weight: 700; }
.es-v2 .pilar-bio { margin: 0; }
.es-v2 .sidebar-card {
  padding-top: 28px;
  border-top: 1px solid var(--la-line);
}
.es-v2 .sidebar-card h3 { margin-bottom: 16px; }
.es-v2 .contact-details {
  padding: 26px;
  border-radius: 4px;
  background: var(--la-forest);
}
.es-v2 .contact-details h3 { color: var(--la-paper); }
.es-v2 .contact-details p { color: var(--la-sage-deep); }

/* Articles */
.es-v2.la-article-page .article-hero-wrap {
  display: grid;
  grid-template-columns: minmax(0,.98fr) minmax(360px,.82fr);
  gap: clamp(38px,4vw,66px);
  align-items: center;
}
.es-v2.la-article-page .hero-image {
  position: relative;
  overflow: visible;
}
.es-v2.la-article-page .hero-image img {
  display: block;
  width: 100%;
  border: 1px solid var(--la-line);
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(23,58,50,.1);
}
.es-v2.la-article-page .article {
  padding: clamp(56px,7vw,90px) 0;
}
.es-v2.la-article-page .article .narrow { width: min(760px,calc(100% - 84px)); }
.es-v2.la-article-page .article h2 { margin-top: 64px; font-size: clamp(30px,4vw,44px); }
.es-v2.la-article-page .article h3 { font-size: clamp(23px,3vw,30px); }
.es-v2.la-article-page .article p,
.es-v2.la-article-page .article li { font-size: 17px; line-height: 1.76; }

/* Research and report */
.es-v2.la-report-page .report-hero {
  border-bottom: 1px solid var(--la-line);
  background: var(--la-forest);
}
.es-v2.la-report-page .report-hero h1 {
  color: var(--la-paper);
}
.es-v2.la-report-page .report-hero .lead,
.es-v2.la-report-page .report-hero > .shell > p:not(.eyebrow) {
  color: var(--la-sage-deep);
}
.es-v2 .stats { border-color: var(--la-line); }
.es-v2 .stat { border-color: var(--la-line); background: var(--la-paper); }
.es-v2 .stat strong { color: var(--la-forest); }
.es-v2 .form-card { border-radius: 4px; box-shadow: none; }
.es-v2.la-report-page .form-card .button-primary { background: var(--la-action) !important; border-color: var(--la-action) !important; }

/* Confirmation routes */
.es-v2.la-thank-you-page main {
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: 72px 20px;
}
.es-v2 .thank-you-card {
  width: min(720px,100%);
  padding: clamp(32px,6vw,64px);
  border: 1px solid var(--la-line);
  border-top: 5px solid var(--la-coral);
  border-radius: 4px;
  background: var(--la-paper);
  text-align: center;
}
.es-v2 .thank-you-card h1 { margin: 10px auto 18px; }
.es-v2 .thank-you-card p { max-width: 56ch; margin: 0 auto 24px; color: var(--la-muted); }

@media (max-width: 1180px) {
  .es-v2 .la-header-inner { grid-template-columns: auto 1fr auto auto; }
  .es-v2 .la-header-cta { grid-column: 3; }
  .es-v2 .la-mobile-nav { grid-column: 4; justify-self: end; }
}
@media (max-width: 900px) {
  .es-v2 .shell { padding-inline: 26px; }
  .es-v2 .narrow,
  .es-v2.la-article-page .article .narrow { width: min(760px,calc(100% - 52px)); }
  .es-v2.la-blog-index .hero-grid,
  .es-v2 .featured,
  .es-v2 .author,
  .es-v2 .contact-grid,
  .es-v2.la-article-page .article-hero-wrap { grid-template-columns: 1fr; }
  .es-v2 .articles-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .es-v2 .featured-media { min-height: 320px; }
}
@media (max-width: 680px) {
  .es-v2 .la-header-inner { min-height: 70px; gap: 10px; }
  .es-v2 .la-brand img { width: 146px; }
  .es-v2 .shell { padding-inline: 20px; }
  .es-v2 .narrow,
  .es-v2.la-article-page .article .narrow { width: min(760px,calc(100% - 40px)); }
  .es-v2 .section-head { padding-inline: 20px; }
  .es-v2 .section > .shell > .section-head { padding-inline: 0; }
  .es-v2 .articles-grid { grid-template-columns: 1fr; }
  .es-v2 .featured-media { min-height: 240px; }
  .es-v2 .author { padding: 28px 20px; }
  .es-v2 .author-img { max-width: 320px; }
  .es-v2.la-article-page .article p,
  .es-v2.la-article-page .article li { font-size: 16px; }
}
@media (max-width: 500px) {
  .es-v2 .la-brand img { width: 132px; }
  .es-v2 .shell { padding-inline: 14px; }
  .es-v2 .section-head { padding-inline: 14px; }
  .es-v2 .section > .shell > .section-head { padding-inline: 0; }
}
