/* Portada híbrida: archivo técnico + composición editorial */
body.hybrid-home {
  --archive-navy: #06234a;
  --archive-navy-deep: #041a37;
  --archive-blue: #0b4aa2;
  --archive-mint: #54b995;
  --archive-ink: #10151c;
  --archive-muted: #44505f;
  --archive-paper: #f5f2e9;
  --archive-line: #1d4d91;
  background: var(--archive-paper);
  color: var(--archive-ink);
}

.hybrid-home > .site-header { display: none; }
.hybrid-home main { min-width: 0; }
.hybrid-home .site-footer { margin-left: 286px; background: var(--archive-navy-deep); }

.hybrid-frame { display: grid; grid-template-columns: 286px minmax(0, 1fr); align-items: start; min-height: 100svh; }
.hybrid-sidebar { position: sticky; z-index: 30; top: 0; height: 100svh; display: flex; flex-direction: column; padding: 50px 44px 160px; color: #edf4fb; background: var(--archive-navy); border-right: 1px solid #245486; }
.hybrid-identity { display: grid; gap: 36px; }
.hybrid-mark { width: 106px; aspect-ratio: 1; display: grid; place-items: center; color: var(--archive-mint); border: 2px solid #edf4fb; text-decoration: none; font-size: 1.65rem; font-weight: 850; letter-spacing: .04em; }
.hybrid-identity strong { display: block; color: #fff; font-size: 1.1rem; line-height: 1.2; }
.hybrid-identity p { max-width: 20ch; margin: .7rem 0 0; color: var(--archive-mint); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; font-weight: 700; letter-spacing: .1em; line-height: 1.65; text-transform: uppercase; }
.hybrid-sidebar-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.hybrid-rule { width: 34px; height: 2px; display: block; margin: 28px 0; background: var(--archive-mint); }
.archive-label { margin: 0; color: #216e52; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; font-weight: 700; letter-spacing: .11em; line-height: 1.4; text-transform: uppercase; }
.hybrid-sidebar .archive-label { color: var(--archive-mint); }
.hybrid-index { margin-top: 14px; border-bottom: 1px solid rgba(190,215,238,.24); }
.hybrid-index a { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; min-height: 48px; color: #eef4fb; border-top: 1px solid rgba(190,215,238,.24); text-decoration: none; font-size: .78rem; }
.hybrid-index a:first-child { border-top: 0; }
.hybrid-index a span { color: #c7d7e8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .67rem; }
.hybrid-index a i { position: absolute; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--archive-mint); }
.hybrid-index a:hover { color: var(--archive-mint); }
.hybrid-notes p:last-child { margin: 15px 0 0; color: #c8d4e1; font-size: .74rem; line-height: 1.65; }
.hybrid-sidebar-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(190,215,238,.24); }
.hybrid-sidebar-foot p { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; color: #eef4fb; font-size: .75rem; }
.hybrid-sidebar-foot p img { width: 18px; height: 18px; display: block; }
.hybrid-sidebar-foot .theme-toggle { display: none; }
.hybrid-sidebar .theme-toggle { min-height: 34px; padding: .35rem .65rem; color: #eaf2fb; border-color: rgba(234,242,251,.42); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .66rem; letter-spacing: .06em; }
.hybrid-sidebar .theme-toggle:hover { color: var(--archive-navy); background: var(--archive-mint); }
.hybrid-mobile-menu { display: none; }

.hybrid-main { min-width: 0; background: var(--archive-paper); }
.hybrid-top { min-height: 104px; display: flex; align-items: center; justify-content: flex-end; padding: 0 clamp(3rem, 5.4vw, 5rem) 0 clamp(2rem, 4vw, 4rem); }
.hybrid-top nav { display: flex; gap: clamp(1.25rem, 2.5vw, 2.8rem); align-items: center; }
.hybrid-top a { padding: .55rem 0; color: var(--archive-ink); border-bottom: 2px solid transparent; text-decoration: none; font-size: .84rem; font-weight: 650; }
.hybrid-top a:first-child, .hybrid-top a:hover { color: #277f61; border-bottom-color: var(--archive-mint); }

.hybrid-sidebar-foot .lang-switch { display: flex; gap: .35rem; margin-bottom: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; }
.hybrid-sidebar-foot .lang-switch a { color: #c8d4e1; text-decoration: none; padding: 2px 6px; border-radius: 4px; }
.hybrid-sidebar-foot .lang-switch a:hover, .hybrid-sidebar-foot .lang-switch a.is-active { color: #fff; background: rgba(255,255,255,.18); font-weight: 800; }
.hybrid-sidebar-foot .lang-switch .lang-sep { color: rgba(255,255,255,.3); }

.hybrid-top .lang-switch { display: flex; align-items: center; gap: .35rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; margin-left: clamp(1.5rem, 3vw, 2.5rem); }
.hybrid-top .lang-switch a { padding: .2rem .45rem; text-decoration: none; color: var(--archive-muted); border-radius: 4px; border-bottom: none; }
.hybrid-top .lang-switch a:hover, .hybrid-top .lang-switch a.is-active { color: var(--archive-ink); background: rgba(0,0,0,.06); font-weight: 850; border-bottom: none; }
.hybrid-top .lang-switch .lang-sep { color: rgba(0,0,0,.2); }

.hybrid-hero { display: grid; grid-template-columns: minmax(0, .89fr) minmax(360px, 1.11fr); gap: clamp(2.5rem, 4vw, 3.75rem); align-items: center; min-height: 494px; padding: 16px clamp(3rem, 5.4vw, 5rem) 0 clamp(2rem, 4vw, 4rem); }
.hybrid-hero-copy { align-self: start; }
.hybrid-hero h1 { max-width: 720px; margin: 32px 0; color: var(--archive-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.55rem, 4.7vw, 5rem); font-weight: 500; line-height: .9; letter-spacing: -.055em; }
.hybrid-hero .lead { max-width: 600px; margin: 0; color: #222a34; font-size: 1rem; line-height: 1.5; }
.hybrid-hero .actions { margin-top: 16px; }
.hybrid-home .button { min-width: 140px; min-height: 42px; border-radius: 0; box-shadow: none; transform: none; }
.hybrid-home .button.primary { color: #fff; background: var(--archive-blue); }
.hybrid-home .button.primary:hover { color: #fff; background: #073c86; }
.hybrid-home .button.secondary { color: var(--archive-blue); border-color: var(--archive-blue); }
.hybrid-home .button.secondary:hover { color: #fff; background: var(--archive-blue); }
.hybrid-hero-figure { min-width: 0; align-self: start; margin: 28px 0 0; }
.hybrid-hero-figure img { width: 100%; height: auto; aspect-ratio: 1.48; display: block; object-fit: cover; border: 1px solid #18477f; }
.hybrid-hero-figure figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: 10px; color: #16457f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .63rem; letter-spacing: .04em; }

.hybrid-work, .hybrid-archive, .hybrid-newsletter, .hybrid-evidence, .hybrid-publication { margin: 0 clamp(3rem, 5.4vw, 5rem) 0 clamp(2rem, 4vw, 4rem); border-top: 1px solid var(--archive-line); }
.hybrid-work { padding: 22px 0 34px; }
.hybrid-section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 20px; }
.hybrid-section-head > a { color: var(--archive-blue); text-decoration: none; font-size: .75rem; font-weight: 700; }
.hybrid-work-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.1fr) minmax(0, 1fr); }
.hybrid-case { min-width: 0; padding: 0 28px; border-left: 1px solid #3970b1; }
.hybrid-case:first-child { padding-left: 0; border-left: 0; }
.hybrid-case:last-child { padding-right: 0; }
.hybrid-case-feature { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; }
.hybrid-case-feature img { width: 140px; height: 220px; object-fit: cover; border: 1px solid #16477f; }
.archive-number { display: block; margin: 0 0 10px; color: #144985; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; }
.hybrid-case h2 { margin: 0 0 12px; color: var(--archive-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 1.65vw, 1.7rem); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
.hybrid-case-feature h2 { font-size: clamp(1.3rem, 1.52vw, 1.55rem); }
.hybrid-case h2 a { text-decoration: none; }
.hybrid-case p { display: -webkit-box; overflow: hidden; color: var(--archive-muted); font-size: .78rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.case-link { color: var(--archive-blue); text-decoration: none; font-size: .72rem; font-weight: 750; }
.case-link:hover { text-decoration: underline; }

.hybrid-archive { padding: 27px 0 30px; }
.hybrid-archive nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.hybrid-archive a { display: grid; grid-template-columns: 26px auto minmax(12px, 1fr); gap: .65rem; align-items: center; padding: 12px 18px; color: var(--archive-ink); border-left: 1px solid #3970b1; text-decoration: none; font-size: .78rem; font-weight: 650; }
.hybrid-archive a:first-child { padding-left: 0; border-left: 0; }
.hybrid-archive a img { width: 24px; height: 24px; display: block; }
.hybrid-archive a span { justify-self: end; color: var(--archive-blue); }
.hybrid-archive a:hover { color: #277f61; }

.hybrid-newsletter { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,5vw,5rem); padding: clamp(3.5rem,7vw,6rem) 0; }
.hybrid-newsletter h2 { margin: .8rem 0 0; color: var(--archive-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem,5vw,5.5rem); font-weight: 500; line-height: .9; letter-spacing: -.055em; }
.hybrid-newsletter > div:last-child { padding-top: 1.8rem; }
.hybrid-newsletter > div:last-child > p { max-width: 650px; color: var(--archive-muted); font-size: clamp(1.15rem,1.7vw,1.5rem); line-height: 1.45; }
.hybrid-newsletter .actions { align-items: center; }

.hybrid-evidence { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.hybrid-evidence h2, .hybrid-publication h2 { margin: .8rem 0 1.2rem; color: var(--archive-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 4vw, 4.6rem); font-weight: 500; line-height: .98; letter-spacing: -.04em; }
.hybrid-evidence dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid #3970b1; }
.hybrid-evidence dl div { min-height: 145px; display: flex; flex-direction: column-reverse; justify-content: space-between; padding: 22px; border-left: 1px solid #3970b1; border-top: 1px solid #3970b1; }
.hybrid-evidence dl div:nth-child(-n+2) { border-top: 0; }
.hybrid-evidence dl div:nth-child(odd) { border-left: 0; }
.hybrid-evidence dt { color: var(--archive-muted); font-size: .72rem; }
.hybrid-evidence dd { margin: 0; color: var(--archive-blue); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3vw, 3.4rem); line-height: 1; }
.hybrid-publication { margin-bottom: clamp(3rem, 6vw, 6rem); padding: clamp(3rem, 6vw, 5rem); color: #eaf2fb; background: var(--archive-navy); }
.hybrid-publication h2 { max-width: 900px; color: #fff; }
.hybrid-publication .archive-label { color: #75d7b5; }
.hybrid-publication > p:not(.archive-label) { max-width: 720px; color: #c5d3e1; }

html[data-theme="dark"] body.hybrid-home { --archive-paper: #07101f; --archive-ink: #edf3fa; --archive-muted: #a5b5c9; --archive-line: #39618d; }
html[data-theme="dark"] .archive-label { color: #67c9a6; }
html[data-theme="dark"] .hybrid-main { background: var(--archive-paper); }
html[data-theme="dark"] .hybrid-top a, html[data-theme="dark"] .hybrid-hero h1, html[data-theme="dark"] .hybrid-case h2, html[data-theme="dark"] .hybrid-archive a, html[data-theme="dark"] .hybrid-evidence h2 { color: var(--archive-ink); }
html[data-theme="dark"] .hybrid-hero .lead { color: #cbd7e5; }
html[data-theme="dark"] .hybrid-hero-figure figcaption, html[data-theme="dark"] .archive-number, html[data-theme="dark"] .case-link { color: #7ea9db; }
html[data-theme="dark"] .hybrid-case p, html[data-theme="dark"] .hybrid-evidence dt { color: var(--archive-muted); }
html[data-theme="dark"] .hybrid-newsletter h2 { color: var(--archive-ink); }
html[data-theme="dark"] .hybrid-newsletter > div:last-child > p { color: var(--archive-muted); }
html[data-theme="dark"] .hybrid-evidence dd { color: #8bb2df; }
html[data-theme="dark"] .hybrid-home .button.secondary { color: #dce8f6; border-color: #7e9fc5; }

@media (max-width: 1100px) {
  .hybrid-frame { grid-template-columns: 238px minmax(0, 1fr); }
  .hybrid-home .site-footer { margin-left: 238px; }
  .hybrid-sidebar { padding: 42px 26px 30px; }
  .hybrid-hero { grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr); gap: 2rem; }
  .hybrid-hero h1 { font-size: clamp(3.35rem, 5.2vw, 4.5rem); }
  .hybrid-case { padding-inline: 18px; }
  .hybrid-case-feature { grid-template-columns: 90px minmax(0, 1fr); gap: 15px; }
  .hybrid-case-feature img { width: 90px; height: 160px; }
}

@media (max-width: 820px) {
  .hybrid-frame { display: block; }
  .hybrid-home .site-footer { margin-left: 0; }
  .hybrid-sidebar { position: sticky; height: auto; min-height: 70px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 18px; border-right: 0; border-bottom: 1px solid #315983; }
  .hybrid-identity { display: flex; gap: 13px; align-items: center; }
  .hybrid-mark { width: 46px; font-size: .86rem; }
  .hybrid-identity strong { font-size: .88rem; }
  .hybrid-identity p { display: none; }
  .hybrid-sidebar-body { display: none; }
  .hybrid-mobile-menu { position: relative; display: block; }
  .hybrid-mobile-menu summary { list-style: none; padding: .5rem .7rem; color: #fff; border: 1px solid rgba(255,255,255,.5); cursor: pointer; font-size: .78rem; font-weight: 750; }
  .hybrid-mobile-menu summary::-webkit-details-marker { display: none; }
  .hybrid-mobile-menu nav { position: absolute; right: 0; top: calc(100% + 10px); width: min(80vw, 290px); padding: 12px; background: var(--archive-navy-deep); border: 1px solid #315983; }
  .hybrid-mobile-menu a { display: block; padding: .65rem; color: #fff; text-decoration: none; font-size: .82rem; }
  .hybrid-mobile-menu .theme-toggle { width: 100%; margin-top: 8px; }
  .hybrid-top { display: none; }
  .hybrid-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding-top: 56px; }
  .hybrid-hero-copy, .hybrid-hero-figure { min-width: 0; max-width: 100%; }
  .hybrid-hero h1 { font-size: clamp(3.25rem, 12vw, 5rem); }
  .hybrid-hero-figure { margin-top: 12px; }
  .hybrid-work-grid { grid-template-columns: 1fr; }
  .hybrid-case { padding: 24px 0; border-left: 0; border-top: 1px solid #3970b1; }
  .hybrid-case:first-child { border-top: 0; }
  .hybrid-case-feature { grid-template-columns: 132px minmax(0, 1fr); }
  .hybrid-case-feature img { width: 132px; height: 180px; }
  .hybrid-archive nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hybrid-archive a { border-top: 1px solid #3970b1; }
  .hybrid-archive a:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hybrid-evidence { grid-template-columns: 1fr; }
  .hybrid-newsletter { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hybrid-hero, .hybrid-work, .hybrid-archive, .hybrid-newsletter, .hybrid-evidence, .hybrid-publication { margin-inline: 0; padding-left: 18px; padding-right: 18px; }
  .hybrid-hero { padding-top: 44px; }
  .hybrid-hero h1 { margin-top: 17px; font-size: clamp(3rem, 15vw, 4.2rem); line-height: .88; }
  .hybrid-hero-figure figcaption { align-items: flex-start; flex-direction: column; }
  .hybrid-section-head { align-items: flex-start; flex-direction: column; }
  .hybrid-case-feature { grid-template-columns: 1fr; }
  .hybrid-case-feature img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .hybrid-archive nav, .hybrid-evidence dl { grid-template-columns: 1fr; }
  .hybrid-archive a, .hybrid-archive a:nth-child(odd), .hybrid-evidence dl div, .hybrid-evidence dl div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hybrid-evidence dl div:nth-child(2) { border-top: 1px solid #3970b1; }
  .hybrid-publication { margin-bottom: 0; }
}

/* Soporte de temas en portada híbrida */
html[data-theme="dark"] body.hybrid-home {
  --archive-paper: #07101f;
  --archive-ink: #e6eef8;
  --archive-muted: #95a7be;
  --archive-blue: #1c5ebd;
  background: var(--archive-paper);
  color: var(--archive-ink);
}
html[data-theme="dark"] .hybrid-main {
  background: #07101f;
}
html[data-theme="dark"] .hybrid-hero h1,
html[data-theme="dark"] .hybrid-hero .lead {
  color: #e6eef8;
}
html[data-theme="dark"] .hybrid-case {
  background: #0c1b31;
  border-color: #213d64;
}
html[data-theme="dark"] .hybrid-case-feature > div {
  background: #102a50;
}
html[data-theme="dark"] .hybrid-top a {
  color: #e6eef8;
}
html[data-theme="dark"] .hybrid-top a:hover,
html[data-theme="dark"] .hybrid-top a:first-child {
  color: var(--archive-mint);
}

html[data-theme="contrast"] body.hybrid-home {
  --archive-paper: #000000;
  --archive-ink: #ffffff;
  --archive-muted: #e2e8f0;
  --archive-navy: #000000;
  --archive-navy-deep: #000000;
  --archive-mint: #facc15;
  background: #000000 !important;
  color: #ffffff !important;
}
html[data-theme="contrast"] .hybrid-main,
html[data-theme="contrast"] .hybrid-sidebar {
  background: #000000 !important;
  border-color: #ffffff !important;
}
html[data-theme="contrast"] .hybrid-case {
  background: #09090b !important;
  border: 2px solid #ffffff !important;
}
html[data-theme="contrast"] .hybrid-case-feature > div {
  background: #09090b !important;
}
html[data-theme="contrast"] .hybrid-hero h1,
html[data-theme="contrast"] .hybrid-hero .lead,
html[data-theme="contrast"] .hybrid-top a {
  color: #ffffff !important;
}
