/* Investigación (working papers) and Noticias pages — generated by home-app
   (website/home-app/research.py) on top of site.css. The ?v= stamp is
   computed at render time from this file, so no manual cache bump. */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 4px; }
.skip:focus { left: 8px; }

/* hero buttons on the blue band */
.page-hero .hero-actions { margin-top: 24px; }
.page-hero .btn.light { background: #fff; color: var(--blue); border-color: #fff; }
.page-hero .btn.light:hover { background: var(--blue-pale); border-color: var(--blue-pale); }
.page-hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); text-decoration: none; }
.page-hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.page-hero .closed-tag { display: inline-block; margin-top: 18px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); padding: 6px 12px; border-radius: 4px; font-weight: 700; }

.plain { font-weight: 700; font-size: .92rem; text-decoration: none; }
.plain:hover { text-decoration: underline; }
.section-head.first { margin-top: 0; }

/* tags */
.tags { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--soft); color: var(--blue-dark); border: 1px solid var(--blue-pale); border-radius: 999px; padding: 2px 11px; font-size: .78rem; font-weight: 700; }

/* key numbers strip under the hero */
.stats { background: var(--soft); border-bottom: 1px solid var(--line); }
.stats dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.stats dl > div { padding: 22px 24px 20px 0; }
.stats dt { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; color: var(--blue); line-height: 1.1; }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: .92rem; max-width: 30ch; }

/* article + sidebar */
main.article { max-width: 1160px; margin: 0 auto; padding: 48px 16px 72px; display: grid; grid-template-columns: minmax(0, 720px) 300px; column-gap: 64px; align-items: start; }
main.article article { font-size: 1.05rem; }
main.article article > p { margin: 0 0 18px; }
main.article h2 { font-weight: 300; font-size: clamp(1.45rem, 2.4vw, 1.85rem); color: var(--blue); margin: 44px 0 14px; line-height: 1.25; }
main.article h2.small { font-size: 1.25rem; }
main.article ul, main.article ol { padding-left: 22px; margin: 0 0 18px; }
main.article li { margin-bottom: 7px; }
main.article li::marker { color: var(--blue); font-weight: 700; }
.lead-img { margin: 0 0 28px; }
.lead-img picture, .lead-img img { display: block; width: 100%; height: auto; border-radius: 6px; }
.lead-img figcaption, .chart figcaption { color: var(--muted); font-size: .85rem; margin-top: 8px; line-height: 1.5; }
.box.key p { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.box.cite p { margin: 0; font-size: .95rem; }
.impl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 6px 0 24px; }
.impl > div { border-top: 3px solid var(--blue); background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 6px 6px; padding: 16px 18px; }
.impl h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; }
.impl p { margin: 0; color: var(--muted); font-size: .93rem; }
.findings li strong { color: var(--ink); }
details.abstract { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 32px 0 20px; }
details.abstract summary { cursor: pointer; color: var(--blue); font-weight: 700; }
details.abstract p { color: var(--muted); font-size: .95rem; margin: 10px 0 4px; }
.back { margin-top: 40px; }
.back a { font-weight: 700; text-decoration: none; }
.band.cta { margin-top: 32px; }

aside { position: sticky; top: 108px; }
aside section { border-top: 1px solid var(--line); padding: 16px 0 6px; }
aside section:first-child { border-top: 3px solid var(--blue); }
main.article aside h2 { font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; line-height: 1.4; }
main.article aside ul { padding-left: 0; }
aside .facts { grid-template-columns: 1fr; gap: 2px; }
aside .facts dd { margin-bottom: 10px; }
aside p { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.dl { list-style: none; margin: 0 0 12px; padding: 0; }
.dl li { margin-bottom: 10px; font-size: .95rem; }
.dl a { font-weight: 700; text-decoration: none; }
.dl a:hover { text-decoration: underline; }
.dl span { color: var(--muted); font-size: .82rem; margin-left: 4px; }
aside p.rights { font-size: .8rem; line-height: 1.5; }
@media (max-width: 960px) {
  main.article { display: block; }
  aside { position: static; margin-top: 48px; }
}

/* before/after chart: one hue, two steps (light = before, dark = after), every value labelled */
.chart { margin: 8px 0 28px; padding: 20px 22px 16px; border: 1px solid var(--line); border-radius: 6px; }
.chart .ctitle { font-weight: 800; margin: 0 0 6px; font-size: 1rem; }
.chart .legend { margin: 0 0 16px; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chart .sw.after { margin-left: 12px; }
.chart .before { background: #8fb0ec; }
.chart .after { background: var(--blue); }
.chart .grp { margin-bottom: 16px; }
.chart .glab { margin: 0 0 6px; font-size: .92rem; display: flex; justify-content: space-between; gap: 12px; }
.chart .glab b { color: var(--ink); }
.chart .bar-row { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 10px; margin-bottom: 4px; font-size: .82rem; color: var(--muted); }
.chart .track { display: block; height: 16px; }
.chart .fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.chart .v { color: var(--ink); font-weight: 700; text-align: right; }

/* working papers list */
.wp-list { display: grid; gap: 24px; }
.wp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 6px; padding: 22px; background: #fff; }
.wp .pic img, .ncard .pic img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: var(--soft); height: auto; }
.wp .meta, .ncard .meta { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 8px; }
.wp h3, .ncard h3 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.wp h3 a, .ncard h3 a { color: var(--ink); text-decoration: none; }
.wp h3 a:hover, .ncard h3 a:hover { color: var(--blue); }
.wp .authors { margin: 0 0 10px; font-weight: 700; color: var(--ink); font-size: .95rem; }
.wp p { color: var(--muted); margin: 0 0 14px; }
.wp .actions .btn { font-size: .88rem; padding: 9px 16px; }
@media (max-width: 760px) { .wp { grid-template-columns: 1fr; gap: 16px; } }

/* news list */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 28px; align-items: start; }
.ncard { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; transition: box-shadow .2s; }
.ncard:hover { box-shadow: 0 14px 30px rgba(11,31,77,.10); }
.ncard .pic img { border-radius: 0; }
.ncard .body { padding: 20px 22px 22px; }
.ncard p { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }
.ncard .closed { background: var(--soft); color: var(--muted); border-radius: 4px; padding: 1px 6px; margin-left: 4px; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) { .ncard { transition: none; } }

/* Formación: program cards */
.card.prog .pic { display: block; width: calc(100% + 52px); margin: -24px -26px 18px; aspect-ratio: 8 / 5; object-fit: cover; background: var(--soft); border-radius: 2px 2px 0 0; }
.card.prog .meta { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 8px; }

/* news: "Organizan / Organized by" partner logos */
.partners { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 26px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.partners .lab { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.partners ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; }
main.article .partners ul { padding: 0; margin: 0; }
.partners li { margin: 0; }
.partners a, .partners li > span { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1.3; }
.partners img { height: 44px; width: auto; max-width: 180px; object-fit: contain; }
.partners span { max-width: 18ch; }
/* WEBEAS note at the bottom of Investigación */
.webeas { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; background: var(--blue); color: #fff; border-radius: 6px; padding: 28px 32px; }
.webeas .eyebrow { color: #cfe0ff; margin: 0; }
.webeas .wname { margin: 4px 0 2px; font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.05; letter-spacing: .02em; }
.webeas .wname a { color: #fff; text-decoration: none; }
.webeas .wname a:hover { text-decoration: underline; }
.webeas .wfull { margin: 0 0 6px; font-weight: 700; font-size: 1.05rem; }
.webeas .wdesc { margin: 0; color: #e6edfb; font-weight: 300; max-width: 60ch; }
.webeas .btn { margin: 0; }

/* Equipo / Team (rendered by home-app/research.py render_team) */
.team .team-group { margin-bottom: 8px; }
.team .team-group:first-child .section-head { margin-top: 0; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; align-items: start; }
.person { display: flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 6px; padding: 22px; }
.person .ph { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--blue-pale); display: grid; place-items: center; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .ini { font-size: 1.8rem; font-weight: 800; color: var(--blue); letter-spacing: .02em; }
.person .body { min-width: 0; flex: 1; }
.person h3 { margin: 4px 0 2px; font-size: 1.12rem; font-weight: 800; color: var(--ink); line-height: 1.3; }
.person .role { margin: 0 0 10px; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.person .short { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.person details.bio summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: .9rem; }
.person details.bio p { color: var(--ink); font-size: .93rem; margin: 10px 0 0; }
.person .links { margin: 12px 0 0; font-size: .88rem; font-weight: 700; }
.person .links a { text-decoration: none; }
.person .links a:hover { text-decoration: underline; }
@media (max-width: 480px) { .person { flex-direction: column; } .person .ph { flex-basis: auto; } }


/* institutions block (projects/news): one row per role, logos at the package's display height */
.partners.institutions { flex-direction: column; align-items: flex-start; gap: 10px; }
.institutions .inst-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.institutions .inst-row .lab { min-width: 9.5em; }
.institutions img { height: auto; max-height: 50px; max-width: 200px; width: auto; }

/* study-design diagram */
figure.design { margin: 8px 0 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
figure.design .eyebrow { color: var(--blue); margin: 0 0 4px; font-size: .72rem; }
figure.design .dtitle { font-weight: 800; margin: 0 0 14px; }
figure.design .root { background: var(--navy); color: #fff; border-radius: 6px; padding: 10px 14px; font-weight: 700; text-align: center; }
figure.design .arms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; position: relative; }
figure.design .arm { border-radius: 6px; padding: 14px 16px; border: 1px solid var(--line); border-top: 4px solid var(--blue); background: var(--soft); }
figure.design .arm.neutral { border-top-color: #8a94a8; background: #fff; }
figure.design .arm .count { font-size: 1.8rem; font-weight: 800; color: var(--blue); margin: 0; line-height: 1.1; }
figure.design .arm.neutral .count { color: var(--muted); }
figure.design .arm .title { font-weight: 800; margin: 2px 0 2px; }
figure.design .arm .text { color: var(--muted); margin: 0 0 8px; font-size: .92rem; }
figure.design .arm ul { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 6px; }
figure.design .arm li { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; font-size: .9rem; }
figure.design .arm li b { color: var(--blue); margin-right: 4px; }
figure.design figcaption { color: var(--muted); font-size: .85rem; margin-top: 12px; }

/* embedded videos (YouTube / Vimeo) */
.video-block { margin: 6px 0 30px; padding: 18px 20px 20px; background: var(--soft); border-radius: 6px; }
.video-block .eyebrow { margin: 0 0 12px; font-size: .74rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); }
.videos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
figure.video { margin: 0; flex: 0 1 calc(50% - 9px); min-width: 0; }
@media (max-width: 560px) { figure.video { flex-basis: 100%; } }
figure.video .frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
figure.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
figure.video figcaption { color: var(--muted); font-size: .82rem; margin-top: 6px; line-height: 1.35; }
.source-note { margin-top: 28px; }

/* Researcher journey, after the published projects. */
.researcher-route { margin: 54px 0 38px; padding: 32px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; scroll-margin-top: 140px; }
.route-heading { margin-bottom: 25px; padding: 26px 28px; background: var(--blue); color: #fff; border-radius: 6px; }
.route-heading .eyebrow { color: var(--blue-pale); }
.route-heading h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.2; margin: 10px 0 14px; color: #fff; }
.route-heading > p:last-child { color: #fff; margin: 0; max-width: 790px; }
.route-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.route-card { display: flex; flex-direction: column; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 5px; padding: 25px 22px; }
.route-number { font-size: .8rem; font-weight: 800; letter-spacing: .12em; color: var(--blue); }
.route-card h3 { margin: 12px 0; font-size: 1.3rem; line-height: 1.3; color: var(--navy); }
.route-card p { color: var(--muted); font-size: .95rem; margin: 0 0 22px; }
.route-card .btn { margin-top: auto; font-size: .85rem; padding: 10px 14px; }
.student-route { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 24px 26px; background: var(--blue-pale); border-left: 4px solid var(--blue); border-radius: 5px; }
.student-route .eyebrow { color: var(--blue-dark); }
.student-route h3 { margin: 8px 0; color: var(--navy); font-size: 1.35rem; }
.student-route p:last-child { margin: 0; color: var(--muted); max-width: 760px; }
.student-route .btn { flex: 0 0 auto; margin: 0; }
.route-note { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 19px; font-size: .86rem; color: var(--muted); }
.route-note p { margin: 0 0 8px; max-width: 820px; }
.route-note a { font-weight: 700; text-underline-offset: 3px; }
.researcher-route a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
@media (max-width: 760px) { .route-cards { grid-template-columns: 1fr; } .researcher-route { padding: 22px 18px; } .route-heading { padding: 22px 20px; } .student-route { align-items: flex-start; flex-direction: column; padding: 22px 20px; } }

/* Research index: compact orientation panel alongside the existing sections. */
main.page.research-layout { max-width: 1280px; display: grid; grid-template-columns: 224px minmax(0, 1fr); column-gap: 42px; align-items: start; }
.research-sidenav { position: sticky; top: 106px; grid-column: 1; border: 1px solid #c4d4f2; border-top: 0; border-radius: 7px; padding: 20px 16px 16px; background: linear-gradient(180deg, var(--navy) 0, var(--navy) 82px, var(--blue-pale) 82px, var(--blue-pale) 100%); box-shadow: 0 12px 30px rgba(11,31,77,.14); }
.research-sidenav-eyebrow { margin: 0 0 4px; color: #cfe0ff; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.research-sidenav-title { margin: 0 0 16px; color: #fff; font-size: 1.35rem; font-weight: 800; }
.research-sidenav ul { display: grid; gap: 5px; margin: 26px 0 0; padding: 0; list-style: none; }
.research-sidenav a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px 8px; border-left: 3px solid transparent; border-radius: 4px; color: var(--navy); background: rgba(255,255,255,.35); text-decoration: none; transition: background-color .16s ease, border-color .16s ease; }
.research-sidenav a > span:first-child { color: var(--blue); font-size: .7rem; font-weight: 800; letter-spacing: .05em; line-height: 1.55; }
.research-sidenav strong, .research-sidenav small { display: block; }
.research-sidenav strong { font-size: .84rem; line-height: 1.25; }
.research-sidenav small { margin-top: 3px; color: var(--muted); font-size: .7rem; line-height: 1.3; }
.research-sidenav a:hover { background: rgba(255,255,255,.72); border-left-color: #7ba1e9; }
.research-sidenav a.is-active { background: #fff; border-left-color: var(--blue); box-shadow: 0 4px 12px rgba(0,57,166,.09); }
.research-sidenav a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.research-content { grid-column: 2; min-width: 0; }
.research-content > :first-child { margin-top: 0; }
.research-content #documentos, .research-content #working-papers, .research-content #proyectos, .research-content #projects, .research-content #investigar, .research-content #estudiantes, .research-content #students, .research-content #webeas { scroll-margin-top: 116px; }
@media (max-width: 1020px) {
  main.page.research-layout { grid-template-columns: 1fr; row-gap: 30px; }
  .research-sidenav { position: static; grid-column: 1; padding: 18px 20px; }
  .research-sidenav-title { margin-bottom: 12px; }
  .research-sidenav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-top: 25px; }
  .research-content { grid-column: 1; }
}
@media (max-width: 600px) {
  main.page.research-layout { padding-top: 28px; }
  .research-sidenav { padding: 16px 14px; }
  .research-sidenav ul { grid-template-columns: 1fr; }
  .research-sidenav a { padding: 8px; }
  .research-sidenav small { font-size: .73rem; }
}
@media (prefers-reduced-motion: reduce) { .research-sidenav a { transition: none; } }
