:root {
  --navy: #071f4d;
  --blue: #0b42b7;
  --bright-blue: #1565e8;
  --electric-blue: #168cff;
  --electric-blue-soft: #63b7ff;
  --gold: #d9ac44;
  --ink: #10203d;
  --muted: #65718a;
  --line: #dce3ef;
  --surface: #ffffff;
  --soft: #f4f7fc;
  --shadow: 0 18px 50px rgba(9, 37, 91, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #020d21; }
body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #020d21;
  background-image:
    url("assets/network-nodes.svg"),
    linear-gradient(180deg, #031634 0%, #041b3c 44%, #020d21 100%);
  background-position: center center, center center;
  background-size: 1180px 808px, cover;
  background-repeat: repeat, no-repeat;
}
main {
  position: relative;
  z-index: 1;
  background: transparent;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 82px;
  padding: 10px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(220,227,239,.8);
  backdrop-filter: blur(18px);
}
.brand { display: block; width: min(280px, 42vw); }
.brand img { display: block; width: 100%; height: 58px; object-fit: contain; object-position: left center; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { font-size: .93rem; font-weight: 700; text-decoration: none; }
.nav-cta { color: white; background: var(--navy); padding: 10px 16px; border-radius: 10px; }

.search-hero {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  padding: 70px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: clamp(36px, 7vw, 100px);
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(48,111,240,.65), transparent 28%),
    linear-gradient(125deg, #041637 0%, #082b69 52%, #0d48b6 100%);
}
.search-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to right, black, transparent 86%);
}
.hero-copy, .search-panel, .category-panel { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--bright-blue); font-size: .79rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.search-hero .eyebrow { color: #a9c7ff; }
h1, h2, h3 { margin-top: 0; letter-spacing: -.025em; line-height: 1.12; }
h1 { max-width: 760px; margin-bottom: 20px; font-size: clamp(2.3rem, 5vw, 4.7rem); }
.hero-copy > p:last-child { max-width: 630px; color: #d7e4fc; font-size: clamp(1.02rem, 1.8vw, 1.25rem); }

.search-panel {
  padding: clamp(24px, 4vw, 38px);
  color: var(--ink);
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
}
.search-panel label { display: block; margin-bottom: 11px; font-size: 1rem; font-weight: 800; }
.category-panel {
  width: min(820px, 100%);
  padding: clamp(24px, 4vw, 38px);
  color: var(--ink);
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
}
.panel-eyebrow { margin: 0 0 5px; color: var(--bright-blue); font-size: .76rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.category-panel h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
.category-intro { margin: 8px 0 20px; color: var(--muted); }
.category-panel .category-filters { margin-bottom: 17px; }
.category-total { margin: 0; color: var(--muted); font-size: .87rem; }
.category-total strong { color: var(--navy); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 16px; width: 22px; fill: none; stroke: var(--blue); stroke-width: 2; }
.search-box input {
  width: 100%;
  min-height: 58px;
  padding: 0 50px;
  color: var(--ink);
  background: #f7f9fd;
  border: 1px solid #cfd9eb;
  border-radius: 12px;
  outline: none;
}
.search-box input:focus { border-color: var(--bright-blue); box-shadow: 0 0 0 4px rgba(21,101,232,.12); }
#clearSearch { position: absolute; right: 12px; width: 34px; height: 34px; color: var(--muted); background: transparent; border: 0; font-size: 1.7rem; }
.search-hint { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.quick-searches {
  margin-top: 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.quick-searches span { margin-right: 2px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.quick-searches button {
  padding: 5px 9px;
  color: var(--blue);
  background: #edf3ff;
  border: 1px solid #d7e4fb;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
}
.quick-searches button:hover, .quick-searches button:focus-visible { color: white; background: var(--blue); }

.catalog {
  position: relative;
  padding: 78px clamp(20px, 7vw, 110px) 96px;
  color: #eaf2ff;
  background: linear-gradient(180deg, rgba(3,22,52,.28) 0%, rgba(3,22,52,.1) 18%, transparent 45%);
  border-top: 1px solid rgba(99,183,255,.18);
  box-shadow: inset 0 48px 70px -72px rgba(99,183,255,.55);
}
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
h2 { margin-bottom: 0; color: var(--navy); font-size: clamp(1.9rem, 3.4vw, 3rem); }
.text-button { color: var(--blue); background: none; border: 0; font-weight: 750; }
.category-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.category-button {
  min-height: 42px;
  padding: 8px 14px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .89rem;
  font-weight: 750;
  box-shadow: 0 2px 9px rgba(13,40,92,.04);
}
.category-button { display: inline-flex; align-items: center; gap: 8px; }
.category-button small {
  min-width: 22px;
  padding: 2px 6px;
  color: var(--category-color);
  background: color-mix(in srgb, var(--category-color) 10%, white);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
  line-height: 1.35;
}
.category-button:hover { border-color: var(--category-color); }
.category-button.active { color: white; background: var(--category-color); border-color: var(--category-color); }
.category-button.active small { color: var(--category-color); background: white; }
.secondary-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 24px; }
.secondary-filters label { color: var(--muted); font-size: .84rem; font-weight: 750; }
.secondary-filters select { min-width: 190px; margin-left: 8px; padding: 8px 34px 8px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.view-switch { margin-left: auto; padding: 4px; display: flex; gap: 3px; background: #e8edf6; border-radius: 11px; }
.view-button { min-height: 36px; padding: 7px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: .82rem; font-weight: 800; }
.view-button.active { color: var(--navy); background: #fff; box-shadow: 0 2px 9px rgba(13,40,92,.1); }
.active-state { min-height: 24px; margin-bottom: 14px; color: var(--muted); font-size: .92rem; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #eef5ff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--category-color) 24%, rgba(5,31,74,.38)), rgba(3,24,58,.24));
  border: 1.5px solid color-mix(in srgb, var(--category-color) 72%, rgba(180,220,255,.34));
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0,8,25,.2), 0 0 0 1px rgba(99,183,255,.05) inset;
  backdrop-filter: blur(2px) saturate(112%);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 8px; background: var(--category-color); box-shadow: 0 0 18px color-mix(in srgb, var(--category-color) 62%, transparent); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--category-color) 84%, white); box-shadow: 0 22px 54px rgba(0,8,25,.3), 0 0 26px color-mix(in srgb, var(--category-color) 24%, transparent); }
.card.linked { outline: 4px solid rgba(21,101,232,.26); box-shadow: 0 22px 58px rgba(11,66,183,.22); }
.card-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(145deg, #061a42, #0b3b8b);
  border-bottom: 1px solid rgba(99,183,255,.2);
}
.card-media > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.card-cover-fallback {
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  color: white;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--category-color) 72%, white), transparent 30%),
    linear-gradient(145deg, #04132f 0%, var(--category-color) 120%);
}
.card-cover-fallback::before {
  content: "";
  width: 54px;
  height: 4px;
  margin-bottom: auto;
  background: rgba(255,255,255,.9);
  border-radius: 99px;
}
.card-cover-fallback span {
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}
.card-cover-fallback strong {
  max-width: 16ch;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.03;
}
.card-cover-fallback small { margin-top: 14px; font-size: .85rem; font-weight: 750; opacity: .84; }
.card-body { min-height: 0; padding: 18px 20px 20px; display: flex; flex: 0; flex-direction: column; }
.visual-fallback { display: grid; place-items: center; align-content: center; gap: 10px; color: #b9cae9; background: linear-gradient(145deg, rgba(10,55,116,.55), rgba(3,24,58,.4)); font-size: .82rem; font-weight: 800; }
.visual-fallback > img { width: 54px; height: 54px; object-fit: contain; opacity: .62; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.category-tag { margin: 0; color: var(--category-color); font-size: .76rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.item-number { color: #9fb9df; font-size: .8rem; font-weight: 800; }
.card h3 { margin: 16px 0 12px; color: white; font-size: 1.18rem; }
.source { margin: 0; color: #bfd0eb; font-size: .92rem; font-weight: 750; }
.source-row { margin-top: 14px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(99,183,255,.16); }
.source-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.source-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #8bc5ff;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(99,183,255,.24);
  border-radius: 50%;
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, background .18s ease;
}
.source-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.source-icon:hover, .source-icon:focus-visible { transform: translateY(-2px); color: white; background: var(--blue); }
.tiktok-icon { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.tiktok-icon:hover, .tiktok-icon:focus-visible { background: #111827; }
.card-overlay {
  position: absolute;
  top: 15px;
  right: 14px;
  z-index: 5;
}
.precedent-trigger {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #d9ebff;
  background: rgba(4,19,47,.74);
  border: 1px solid rgba(132,199,255,.48);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,.26), 0 0 18px rgba(22,140,255,.12);
  backdrop-filter: blur(13px);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.precedent-trigger svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.precedent-trigger img { width: 30px; height: 30px; display: block; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.42)); }
.precedent-trigger:hover, .precedent-trigger:focus-visible { transform: translateY(-2px) rotate(-4deg); color: white; background: var(--blue); box-shadow: 0 10px 28px rgba(0,0,0,.28), 0 0 25px rgba(22,140,255,.34); }

.precedent-dialog {
  width: min(760px, calc(100vw - 30px));
  max-height: min(86vh, 900px);
  padding: 0;
  overflow: hidden;
  color: #eef6ff;
  background: rgba(3,18,45,.96);
  border: 1px solid rgba(99,183,255,.4);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.58), 0 0 45px rgba(22,140,255,.16);
  backdrop-filter: blur(24px) saturate(125%);
}
.precedent-dialog::backdrop { background: rgba(0,8,24,.76); backdrop-filter: blur(5px); }
.precedent-dialog-shell { max-height: min(86vh, 900px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.precedent-dialog-header { padding: 22px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(99,183,255,.18); }
.precedent-dialog-heading { min-width: 0; display: flex; align-items: center; gap: 15px; }
.precedent-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #168cff, #0d45b8); border-radius: 14px; box-shadow: 0 9px 24px rgba(22,140,255,.27); }
.precedent-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.precedent-mark img { width: 32px; height: 32px; display: block; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.38)); }
.precedent-dialog-heading p { margin: 0 0 5px; color: #7fc5ff; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.precedent-dialog-heading h2 { margin: 0; color: white; font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.16; }
.precedent-close { width: 40px; height: 40px; flex: 0 0 40px; padding: 0; color: #c9d9f1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.precedent-close:hover, .precedent-close:focus-visible { color: white; background: rgba(22,140,255,.34); }
.precedent-dialog-body { padding: 22px 26px 26px; overflow-y: auto; overscroll-behavior: contain; }
.precedent-source { margin: 0; color: #7fc5ff; font-size: 1rem; font-weight: 900; }
.precedent-pages { margin: 6px 0 20px; color: #9cb5d7; font-size: .78rem; }
.precedent-text { margin: 0; padding: 0 0 0 20px; color: #edf5ff; border-left: 3px solid #168cff; font-size: 1rem; line-height: 1.7; white-space: pre-line; }
.precedent-dialog-actions { padding: 15px 24px 18px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(99,183,255,.18); background: rgba(4,28,66,.72); }
.precedent-action { min-width: 112px; min-height: 44px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: white; background: rgba(22,140,255,.18); border: 1px solid rgba(99,183,255,.34); border-radius: 11px; font-size: .82rem; font-weight: 850; cursor: pointer; }
.precedent-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.precedent-action:hover, .precedent-action:focus-visible { background: var(--blue); border-color: #7fc5ff; }
.precedent-action:disabled { opacity: .42; cursor: not-allowed; }
.research-actions { margin: -7px 0 15px; display: flex; flex-wrap: wrap; gap: 7px; }
.research-actions button {
  padding: 6px 9px;
  color: #c5d7f2;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(99,183,255,.18);
  border-radius: 8px;
  font-size: .74rem;
  font-weight: 800;
}
.research-actions button:hover, .research-actions button:focus-visible { color: white; border-color: var(--electric-blue-soft); background: rgba(22,140,255,.28); }
.catalog.compact .card-media { display: none; }
.catalog.compact .card-body { min-height: 0; }
.catalog.compact .card-overlay { top: 13px; }
.empty-state { max-width: 460px; margin: 50px auto; text-align: center; }
.empty-state img { width: 72px; height: 72px; object-fit: contain; opacity: .65; }
.empty-state h3 { margin: 18px 0 8px; color: white; }
.empty-state p { color: #b9cae9; }
.catalog h2, .methodology h2 { color: white; }
.catalog .eyebrow, .methodology .eyebrow { color: var(--electric-blue-soft); }
.catalog .active-state { color: #b9cae9; }
.catalog .text-button { color: var(--electric-blue-soft); }
.catalog .view-switch { background: rgba(3,24,58,.72); border: 1px solid rgba(99,183,255,.2); }
.catalog .view-button { color: #b9cae9; }
.catalog .view-button.active { color: white; background: rgba(22,140,255,.38); box-shadow: 0 0 18px rgba(22,140,255,.16); }

.methodology {
  padding: 88px clamp(20px, 7vw, 110px);
  color: white;
  background: rgba(2,13,33,.38);
  border-top: 1px solid rgba(99,183,255,.13);
}
.methodology > div:first-child { max-width: 720px; }
.method-grid { margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.method-grid article {
  padding: 26px;
  border: 1px solid rgba(99,183,255,.2);
  border-left: 3px solid var(--gold);
  background: linear-gradient(145deg, rgba(8,43,94,.62), rgba(4,27,65,.55));
  box-shadow: 0 18px 45px rgba(0,8,25,.18);
  backdrop-filter: blur(12px);
}
.method-grid span { display: block; margin-bottom: 28px; color: var(--gold); font-size: .8rem; font-weight: 900; }
.method-grid h3 { margin-bottom: 9px; color: white; font-size: 1.17rem; }
.method-grid p { margin: 0; color: #c2d2ed; }
.legal-note { margin: 34px 0 0; padding: 18px 20px; color: #b9cae9; background: rgba(255,255,255,.06); border: 1px solid rgba(99,183,255,.15); border-radius: 10px; font-size: .9rem; }

.latest { padding: 82px clamp(20px, 7vw, 110px); color: white; background: rgba(4,27,60,.32); border-top: 1px solid rgba(99,183,255,.14); }
.latest-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); align-items: end; gap: clamp(28px, 6vw, 80px); }
.latest-heading h2 { color: white; }
.latest-heading > p { margin: 0; color: #b9cae9; }
.latest-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.latest-card {
  min-height: 150px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 17px;
  color: white;
  text-align: left;
  background: linear-gradient(115deg, color-mix(in srgb, var(--category-color) 34%, #0b1f48), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.latest-card:hover, .latest-card:focus-visible { transform: translateY(-3px); border-color: #82adff; background: linear-gradient(115deg, color-mix(in srgb, var(--category-color) 50%, #0b1f48), rgba(255,255,255,.1)); }
.latest-rank { min-width: 48px; color: #f3c86a; font-size: .68rem; font-weight: 950; letter-spacing: .1em; }
.latest-copy { min-width: 0; display: flex; flex-direction: column; }
.latest-copy small { color: #aac5f3; font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.latest-copy strong { margin: 5px 0; font-size: 1.05rem; line-height: 1.2; }
.latest-copy em { color: #d4dff2; font-size: .79rem; font-style: normal; }
.latest-arrow { color: #f3c86a; font-size: 1.35rem; }

.official-sources { padding: 82px clamp(20px, 7vw, 110px); color: white; background: rgba(2,16,39,.28); border-top: 1px solid rgba(99,183,255,.14); }
.official-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: end;
  gap: clamp(28px, 6vw, 80px);
}
.official-heading h2 { color: white; }
.official-heading > p { margin: 0; color: #b9c8e5; }
.official-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.official-grid a {
  min-height: 172px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  color: white;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.official-grid a:hover, .official-grid a:focus-visible {
  transform: translateY(-3px);
  background: rgba(255,255,255,.11);
  border-color: rgba(115,164,255,.72);
}
.official-grid span { color: #9eb8ea; font-size: .76rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.official-grid strong { margin-top: 13px; font-size: 1.18rem; }
.official-grid small { margin-top: auto; color: #c9d8f4; font-weight: 750; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: calc(100vw - 44px);
  padding: 11px 15px;
  color: white;
  background: #071f4d;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(4,19,47,.3);
  font-size: .86rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

footer { position: relative; z-index: 1; padding: 35px clamp(20px, 7vw, 110px); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; color: #dce7ff; background: #04132f; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { width: 46px; height: 46px; padding: 4px; object-fit: contain; background: white; border-radius: 10px; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand span { color: #93a8d0; font-size: .82rem; }
.footer-links, .footer-contact { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a, .footer-contact a { color: #dce7ff; font-size: .83rem; text-decoration: none; }
.footer-contact { flex-direction: column; gap: 2px; }

@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-hero { grid-template-columns: 1fr; }
  .search-panel, .category-panel { max-width: 820px; }
  footer { grid-template-columns: 1fr 1fr; }
  .official-grid { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; flex-direction: row; }
}
@media (max-width: 720px) {
  .site-header { min-height: 70px; }
  .brand { width: 190px; }
  .brand img { height: 48px; }
  nav > a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 9px 11px; font-size: .78rem; }
  .search-hero { min-height: 0; padding-top: 52px; padding-bottom: 58px; }
  h1 { font-size: clamp(2.2rem, 11vw, 3.25rem); }
  .catalog, .methodology { padding-top: 58px; padding-bottom: 65px; }
  .section-heading { align-items: start; flex-direction: column; }
  .cards, .method-grid { grid-template-columns: 1fr; }
  .secondary-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .secondary-filters label, .secondary-filters select { display: block; width: 100%; min-width: 0; margin: 5px 0 0; }
  footer { grid-template-columns: 1fr; }
  .footer-contact { grid-column: auto; }
  .view-switch { margin-left: 0; align-self: end; }
  .official-heading, .latest-heading { grid-template-columns: 1fr; }
  .official-grid, .latest-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .search-panel, .category-panel { padding: 21px; }
  .search-box input { min-height: 54px; padding-left: 44px; font-size: .92rem; }
  .secondary-filters { grid-template-columns: 1fr; }
  .card-body { min-height: 230px; }
  .view-switch { width: 100%; }
  .view-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Portada inspirada en la continuidad visual de la página anterior */
.search-hero {
  min-height: 980px;
  padding: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background-image: url("assets/hero-illimani-tecnologico.jpg");
  background-color: #031634;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
.search-hero::before {
  background:
    linear-gradient(180deg, rgba(2,15,38,.08) 0%, rgba(3,23,57,.28) 43%, rgba(2,15,38,.82) 100%),
    linear-gradient(90deg, rgba(4,30,74,.22), transparent 34%, transparent 70%, rgba(4,30,74,.18));
  mask-image: none;
}
.hero-profile, .search-panel, .category-panel { position: relative; z-index: 1; }
.site-header .brand { flex: 0 0 62px; width: 62px; }
.site-header .brand img { width: 58px; height: 58px; object-fit: contain; object-position: center; }
.hero-profile { width: 100%; text-align: center; }
.profile-banner {
  display: none;
  width: 100%;
  height: clamp(250px, 31vw, 390px);
  padding: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #3d261d;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 55px rgba(3,18,45,.26);
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.profile-avatar {
  width: 160px;
  height: 160px;
  margin: clamp(350px, 30vw, 440px) auto 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
  filter: drop-shadow(0 12px 20px rgba(4,19,47,.3));
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.hero-profile h1 {
  margin: 9px auto 0;
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-shadow: 0 3px 20px rgba(0,0,0,.38);
}
.profile-tagline { margin: 2px 0 12px; color: #eef4ff; font-weight: 750; }
.hero-intro {
  margin: 16px 0 0;
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 750;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.social-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.social-row a {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  font-size: .88rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 7px 20px rgba(4,19,47,.2);
}
.social-row svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social-row .social-fill { fill: currentColor; stroke: none; }
.social-row a:hover { color: white; background: var(--blue); }
.search-panel, .category-panel { width: min(680px, calc(100% - 40px)); }
.category-panel {
  color: white;
  background: transparent;
  border: 1px solid rgba(22,140,255,.82);
  box-shadow: 0 18px 48px rgba(1,14,35,.12), 0 0 0 1px rgba(99,183,255,.1) inset, 0 0 30px rgba(22,140,255,.12);
  backdrop-filter: none;
}
.category-panel h2 { color: white; text-align: center; }
.category-panel .panel-eyebrow { color: #f0cf82; text-align: center; }
.category-panel .category-intro { color: rgba(255,255,255,.86); text-align: center; }
.category-panel .category-total { color: rgba(255,255,255,.82); text-align: center; }
.category-panel .category-total strong { color: white; }
.category-panel .category-filters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.category-panel .category-button {
  width: 100%;
  min-height: 60px;
  justify-content: space-between;
  padding: 12px 18px;
  color: white;
  background: linear-gradient(120deg, rgba(5,38,90,.34), rgba(10,68,139,.2));
  border: 1.5px solid rgba(22,140,255,.94);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(1,14,35,.2), 0 0 0 1px rgba(99,183,255,.12) inset, 0 0 18px rgba(22,140,255,.1);
  backdrop-filter: blur(3px) saturate(116%);
}
.category-panel .category-button small { color: white; background: rgba(255,255,255,.17); }
.category-panel .category-button:hover, .category-panel .category-button:focus-visible { color: white; background: rgba(16,103,213,.76); border-color: var(--electric-blue-soft); box-shadow: 0 12px 30px rgba(1,14,35,.24), 0 0 24px rgba(22,140,255,.28); transform: translateY(-2px); }
.category-panel .category-button.active { color: white; background: rgba(4,39,94,.88); border-color: var(--electric-blue-soft); box-shadow: 0 12px 30px rgba(1,14,35,.26), 0 0 24px rgba(22,140,255,.32); }
.category-panel .category-button.active small { color: var(--navy); background: white; }

/* Contexto persistente para conservar la orientación al desplazarse */
.scroll-context {
  position: sticky;
  top: 82px;
  z-index: 20;
  min-height: 66px;
  margin: 0 0 20px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  color: white;
  background: linear-gradient(118deg, rgba(5,24,59,.97), rgba(12,59,132,.94));
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  box-shadow: 0 15px 36px rgba(5,24,59,.2);
  backdrop-filter: blur(16px);
}
.back-start {
  min-height: 39px;
  padding: 8px 11px;
  color: white;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 850;
}
.back-start:hover, .back-start:focus-visible { color: var(--navy); background: white; border-color: white; }
.scroll-context-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sticky-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: var(--navy);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(7,31,77,.1);
}
.scroll-context small, .scroll-context strong { display: block; }
.scroll-context small {
  color: #b9cae9;
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.scroll-context strong {
  overflow: hidden;
  color: white;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#stickyGroupCount {
  display: block;
  margin-top: 1px;
  color: #c6d6f1;
  font-size: .76rem;
  font-weight: 700;
}
.sticky-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #3e2b04;
  background: #f0cf82;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}
.cards { display: block; }
.catalog.compact .card-top { padding-right: 98px; }
.result-group { scroll-margin-top: 164px; }
.result-group + .result-group { margin-top: 12px; }
.group-toggle {
  width: 100%;
  min-height: 76px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: white;
  text-align: left;
  background: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 54%, rgba(3,24,58,.48)), rgba(3,24,58,.36));
  border: 1.5px solid color-mix(in srgb, var(--category-color) 82%, #b8ddff);
  border-radius: 17px;
  box-shadow: 0 12px 34px rgba(0,8,25,.2), 0 0 22px color-mix(in srgb, var(--category-color) 17%, transparent);
  backdrop-filter: blur(5px) saturate(118%);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.group-toggle:hover, .group-toggle:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 67%, rgba(3,24,58,.4)), rgba(5,36,78,.42));
  box-shadow: 0 16px 40px rgba(0,8,25,.25), 0 0 29px color-mix(in srgb, var(--category-color) 27%, transparent);
}
.group-toggle-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.group-toggle-copy strong { font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.15; }
.group-toggle-copy small { color: rgba(235,245,255,.8); font-size: .78rem; font-weight: 750; }
.group-chevron {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}
.result-group.expanded .group-chevron { transform: rotate(180deg); }
.category-carousel { margin-top: 15px; overflow: hidden; }
.category-carousel[hidden] { display: none; }
.group-grid {
  padding: 3px 3px 18px;
  display: flex;
  align-items: stretch;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-color: color-mix(in srgb, var(--category-color) 72%, #7cbcff) rgba(255,255,255,.08);
  scrollbar-width: thin;
}
.group-grid::-webkit-scrollbar { height: 8px; }
.group-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.07); border-radius: 999px; }
.group-grid::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--category-color) 76%, #80c3ff); border-radius: 999px; }
.group-grid .card { flex: 0 0 clamp(286px, 30vw, 352px); scroll-snap-align: start; }

@media (max-width: 1020px) {
  .group-grid .card { flex-basis: min(43vw, 340px); }
}
@media (max-width: 720px) {
  .site-header .brand { flex-basis: 50px; width: 50px; }
  .site-header .brand img { width: 48px; height: 48px; }
  .search-hero {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 48px;
    background-position: center top;
    background-size: 100% auto;
  }
  .search-hero::before {
    background:
      linear-gradient(180deg, rgba(2,15,38,.03) 0%, rgba(3,23,57,.13) 37%, rgba(2,15,38,.73) 100%),
      linear-gradient(90deg, rgba(4,30,74,.07), transparent 40%, transparent 70%, rgba(4,30,74,.06));
  }
  .profile-banner { display: none; height: 220px; border-radius: 0; }
  .profile-avatar { width: 118px; height: 118px; margin: clamp(148px, 40vw, 198px) auto 0; border: 0; }
  .profile-avatar img { width: 100%; height: 100%; }
  .category-panel {
    background: transparent;
    backdrop-filter: none;
  }
  .category-panel .category-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .category-panel .category-button { min-height: 52px; padding: 9px 11px; gap: 5px; font-size: .78rem; }
  .category-panel .category-button small { min-width: 20px; padding: 2px 5px; font-size: .66rem; }
  .card-body, .catalog.compact .card-body { min-height: 0; }
  .group-toggle { min-height: 68px; padding: 13px 15px; border-radius: 15px; }
  .group-grid { gap: 13px; }
  .group-grid .card { flex-basis: min(84vw, 336px); }
  .scroll-context { top: 70px; gap: 8px; padding: 8px; }
  .back-start { padding: 7px 9px; font-size: .72rem; }
  .scroll-context-main { gap: 8px; }
  .scroll-context strong { font-size: .86rem; }
  #stickyGroupCount { font-size: .68rem; }
  .sticky-count { padding: 6px 8px; font-size: .72rem; }
  .precedent-dialog { width: calc(100vw - 18px); max-height: 92vh; border-radius: 18px; }
  .precedent-dialog-shell { max-height: 92vh; }
  .precedent-dialog-header { padding: 17px 16px 14px; }
  .precedent-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
  .precedent-dialog-body { padding: 18px 18px 22px; }
  .precedent-text { padding-left: 15px; font-size: .95rem; line-height: 1.62; }
  .precedent-dialog-actions { padding: 12px 16px 15px; }
  .precedent-action { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 430px) {
  .sticky-dot { display: none; }
  .scroll-context small { display: none; }
  .scroll-context strong { max-width: 31vw; }
  .latest-card { min-height: 132px; padding: 17px; gap: 11px; }
  .latest-rank { min-width: 38px; }
}

/* Portal institucional y navegación v27 */
.header-brand-group,
.header-actions {
  display: flex;
  align-items: center;
}
.header-brand-group { gap: 9px; }
.header-actions { gap: 9px; }
.node-menu { position: relative; }
.node-menu summary {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #edf4ff;
  border: 1px solid #bed7fb;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}
.node-menu summary::-webkit-details-marker { display: none; }
.node-menu summary svg { width: 27px; height: 27px; overflow: visible; }
.node-menu summary path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.node-menu summary circle { fill: var(--electric-blue); stroke: #0870d7; stroke-width: .7; }
.node-menu[open] summary { color: white; background: var(--navy); border-color: var(--electric-blue); }
.node-menu-panel {
  position: absolute;
  top: calc(100% + 13px);
  left: 0;
  z-index: 45;
  width: min(330px, calc(100vw - 30px));
  padding: 14px;
  display: grid;
  gap: 5px;
  color: white;
  background: #061a3f;
  border: 1px solid rgba(99,183,255,.46);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,8,25,.42), 0 0 24px rgba(22,140,255,.16);
}
.node-menu-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 15px;
  width: 12px;
  height: 12px;
  background: #061a3f;
  border-top: 1px solid rgba(99,183,255,.46);
  border-left: 1px solid rgba(99,183,255,.46);
  transform: rotate(45deg);
}
.node-menu-panel p {
  margin: 2px 8px 8px;
  color: #71bdff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.node-menu-panel a {
  position: relative;
  padding: 10px 12px 10px 27px;
  color: #edf6ff;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 780;
  text-decoration: none;
}
.node-menu-panel a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: #168cff;
  box-shadow: 6px 0 0 #168cff;
}
.node-menu-panel a::after {
  content: "";
  position: absolute;
  left: 21px;
  top: calc(50% - 2px);
  width: 5px;
  height: 5px;
  background: #63b7ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #168cff;
}
.node-menu-panel a:hover,
.node-menu-panel a:focus-visible { background: #0d377c; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  background: #071f4d;
  border: 1px solid #0d51bd;
  box-shadow: 0 7px 20px rgba(7,31,77,.16);
}
.nav-cta svg,
.header-share svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-platform-icon { width: 20px; height: 20px; display: block; object-fit: contain; }
.header-share {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: #edf4ff;
  border: 1px solid #bed7fb;
  border-radius: 12px;
}
.header-share:hover,
.header-share:focus-visible { color: white; background: var(--blue); border-color: var(--blue); }

.portal-dock {
  width: min(960px, calc(100% - 34px));
  margin: 26px auto 0;
  padding: 9px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: rgba(2,17,43,.72);
  border: 1px solid rgba(99,183,255,.42);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(0,8,25,.28), 0 0 28px rgba(22,140,255,.12);
  backdrop-filter: blur(13px) saturate(120%);
}
.portal-dock > a {
  min-width: 0;
  min-height: 76px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: white;
  text-align: left;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(99,183,255,.15);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.portal-dock > a:hover,
.portal-dock > a:focus-visible,
.portal-dock > a.active {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(22,140,255,.38), rgba(4,38,91,.76));
  border-color: rgba(99,183,255,.78);
}
.portal-dock span { color: #63b7ff; font-size: .62rem; font-weight: 950; letter-spacing: .12em; }
.portal-dock strong { overflow: hidden; width: 100%; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-dock small { overflow: hidden; width: 100%; color: #bed2ef; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

/* Iconografía blanca de alta legibilidad */
.social-row { gap: 14px; }
.social-row a {
  width: 34px;
  height: 36px;
  color: white;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.35));
}
.social-row svg { width: 25px; height: 25px; stroke-width: 2.15; }
.social-row a:hover,
.social-row a:focus-visible { color: #8dceff; background: transparent; transform: translateY(-2px); }

/* Carruseles y fichas */
.group-grid {
  scrollbar-color: rgba(255,255,255,.96) rgba(255,255,255,.13);
  scrollbar-width: thin;
}
.group-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.12); }
.group-grid::-webkit-scrollbar-thumb {
  background: #fff;
  border: 1px solid rgba(6,26,63,.35);
  box-shadow: 0 0 10px rgba(255,255,255,.35);
}
.card-body {
  position: relative;
  z-index: 3;
  background: #061a3f;
  border-top: 3px solid var(--category-color);
  box-shadow: 0 -10px 24px rgba(0,8,25,.2);
}
.category-tag { color: color-mix(in srgb, var(--category-color) 58%, #bfe3ff); }
.item-number {
  min-width: 45px;
  padding: 4px 8px;
  color: white;
  text-align: center;
  background: #103b7e;
  border: 1px solid rgba(99,183,255,.4);
  border-radius: 999px;
  font-size: .74rem;
  letter-spacing: .02em;
}
.source-icon {
  color: white;
  background: #0c3473;
  border-color: #2f72c9;
  box-shadow: 0 6px 16px rgba(0,8,25,.24);
}
.source-icon:hover,
.source-icon:focus-visible { background: #1565e8; border-color: #71bdff; }
.tiktok-icon { background: #101722; border-color: #52647d; }
.tiktok-icon svg { fill: currentColor; stroke: none; }
.tiktok-icon img { width: 20px; height: 20px; display: block; object-fit: contain; }
.precedent-trigger {
  color: white;
  background: rgba(3,18,45,.9);
  border-color: rgba(255,255,255,.72);
}
.precedent-trigger svg,
.precedent-mark svg { stroke-width: 1.65; }

/* Bloques institucionales sólidos */
.latest,
.official-sources {
  width: min(1420px, calc(100% - 40px));
  margin: 28px auto;
  color: white;
  background: #061a3f;
  border: 1px solid #164a98;
  border-radius: 24px;
  box-shadow: 0 24px 65px rgba(0,8,25,.28), 0 0 30px rgba(22,140,255,.09);
}
.latest-card {
  background: linear-gradient(115deg, color-mix(in srgb, var(--category-color) 34%, #0a2758), #0a2859);
  border-color: rgba(99,183,255,.25);
}
.official-grid a { background: #0a2a5f; border-color: #245ca7; }
.official-grid a:hover,
.official-grid a:focus-visible { background: #0d377c; border-color: #71bdff; }

@media (max-width: 720px) {
  .site-header { gap: 10px; padding-inline: 12px; }
  .site-header .brand { flex-basis: 48px; width: 48px; }
  .site-header .brand img { width: 46px; height: 46px; }
  .header-brand-group { gap: 5px; }
  .node-menu summary,
  .header-share { width: 38px; height: 38px; border-radius: 10px; }
  .node-menu summary svg { width: 24px; height: 24px; }
  .nav-cta { min-height: 38px; padding: 8px 10px; }
  .nav-cta span { font-size: .75rem; }
  .nav-cta svg { width: 18px; height: 18px; }
  .node-menu-panel { left: -54px; }
  .search-hero { padding-bottom: 42px; }
  .portal-dock {
    width: calc(100% - 24px);
    padding: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border-radius: 15px;
  }
  .portal-dock > a { min-height: 66px; padding: 9px 10px; display: flex !important; }
  .portal-dock strong { font-size: .82rem; }
  .portal-dock small { font-size: .63rem; }
  .group-grid { padding-right: 18vw; gap: 13px; }
  .group-grid .card { flex-basis: min(76vw, 304px); }
  .latest,
  .official-sources { width: calc(100% - 22px); margin: 18px auto; padding-inline: 17px; border-radius: 18px; }
}

@media (max-width: 390px) {
  .nav-cta span { display: none; }
  .nav-cta { width: 38px; padding: 0; justify-content: center; }
  .node-menu-panel { left: -48px; width: calc(100vw - 22px); }
}

/* Áreas maestras del portal v28 */
.portal-dock {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px;
  gap: 10px;
  background: rgba(2,15,38,.54);
}
.master-nav {
  min-width: 0;
  min-height: 88px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  color: white;
  text-align: left;
  background: rgba(5,34,80,.45);
  border: 1px solid rgba(99,183,255,.28);
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.master-nav svg {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  fill: none;
  stroke: white;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(22,140,255,.38));
}
.master-nav > span { min-width: 0; display: flex; flex-direction: column; }
.master-nav strong { color: white; font-size: .92rem; line-height: 1.15; }
.master-nav small { margin-top: 4px; color: #b7ccec; font-size: .69rem; line-height: 1.2; }
.master-nav:hover,
.master-nav:focus-visible,
.master-nav.active {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(22,140,255,.44), rgba(5,40,95,.84));
  border-color: #63b7ff;
  box-shadow: 0 12px 30px rgba(0,8,25,.24), 0 0 24px rgba(22,140,255,.2);
}
.master-nav.active svg { stroke: #fff; filter: drop-shadow(0 0 10px #168cff); }

.area-panel { position: relative; scroll-margin-top: 78px; }
.area-panel[hidden] { display: none !important; }
.family-area,
.services-area {
  min-height: 760px;
  padding: 82px clamp(20px, 7vw, 110px) 100px;
  color: white;
  background: linear-gradient(180deg, rgba(4,27,65,.2), rgba(2,13,33,.08));
  border-top: 1px solid rgba(99,183,255,.2);
}
.area-hero { max-width: 820px; margin-bottom: 38px; }
.area-hero h2 { color: white; font-size: clamp(2rem, 5vw, 4rem); }
.area-hero > p:last-child { max-width: 720px; margin: 16px 0 0; color: #bed0eb; font-size: 1.05rem; }
.family-hero .eyebrow { color: #f0cf82; }
.services-hero .eyebrow { color: #63b7ff; }

.family-categories { width: 100%; max-width: 100%; min-width: 0; display: grid; gap: 13px; overflow: hidden; }
.family-group { width: 100%; max-width: 100%; min-width: 0; scroll-margin-top: 86px; overflow: hidden; }
.family-toggle {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 78px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: white;
  text-align: left;
  background: linear-gradient(110deg, rgba(13,67,139,.82), rgba(6,30,70,.94));
  border: 1.5px solid #2d75cc;
  border-radius: 17px;
  box-shadow: 0 13px 34px rgba(0,8,25,.24), 0 0 20px rgba(22,140,255,.1);
}
.family-toggle > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.family-toggle strong { font-size: clamp(1.02rem, 2.2vw, 1.3rem); }
.family-toggle small { color: #c8d8ef; font-size: .78rem; font-weight: 700; }
.family-toggle svg {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}
.family-group.expanded .family-toggle { border-color: #82c9ff; background: linear-gradient(110deg, #1458b2, #082859); }
.family-group.expanded .family-toggle svg { transform: rotate(180deg); }
.family-carousel { width: 100%; max-width: 100%; min-width: 0; margin-top: 14px; overflow: hidden; }
.family-grid {
  padding: 3px 3px 17px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  scrollbar-color: white rgba(255,255,255,.12);
}
.family-grid::-webkit-scrollbar { height: 8px; }
.family-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.12); border-radius: 99px; }
.family-grid::-webkit-scrollbar-thumb { background: white; border-radius: 99px; }
.family-grid article {
  min-height: 210px;
  padding: 24px;
  flex: 0 0 clamp(280px, 31vw, 370px);
  scroll-snap-align: start;
  color: white;
  background: #071f4d;
  border: 1px solid #2869bc;
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(0,8,25,.25);
}
.family-grid article span { color: #f0cf82; font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.family-grid article h3 { margin: 23px 0 9px; color: white; font-size: 1.25rem; }
.family-grid article p { margin: 0; color: #c1d2ec; }

.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.services-grid article {
  min-height: 220px;
  padding: 28px;
  color: white;
  background: #061a3f;
  border: 1px solid #1b57a7;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,8,25,.24);
}
.services-grid span { color: #63b7ff; font-size: .76rem; font-weight: 950; letter-spacing: .12em; }
.services-grid h3 { margin: 38px 0 10px; color: white; font-size: 1.45rem; }
.services-grid p { margin: 0; color: #bfd0e9; }
.area-contact {
  width: fit-content;
  min-height: 54px;
  margin-top: 30px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: white;
  background: #0b42b7;
  border: 1px solid #63b7ff;
  border-radius: 13px;
  box-shadow: 0 13px 32px rgba(0,26,77,.3);
  font-weight: 850;
  text-decoration: none;
}
.area-contact span { font-size: 1.35rem; }
.area-contact:hover,
.area-contact:focus-visible { background: #1565e8; }

/* Iconos sociales grandes, blancos y sin cápsulas */
.social-row { gap: 20px; }
.social-row a { width: 42px; height: 42px; background: none; border: 0; box-shadow: none; }
.social-row svg { width: 31px; height: 31px; stroke-width: 2.05; }

/* Refinamiento de navegación e iconografía v29 */
.header-brand-group { gap: 4px; }
.node-menu summary {
  color: #0b42b7;
  background: transparent;
  border-color: transparent;
}
.node-menu summary:hover,
.node-menu summary:focus-visible { background: #edf4ff; border-color: #bed7fb; }
.node-menu summary path { stroke-width: 2.25; }

.social-row a img {
  width: 33px;
  height: 33px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.38));
  transition: transform .18s ease, filter .18s ease;
}
.social-row a:hover img,
.social-row a:focus-visible img { transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 0 9px rgba(99,183,255,.72)); }

.portal-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  overflow: visible;
  scroll-snap-type: none;
  background: rgba(2,15,38,.46);
}
.master-nav {
  min-height: 84px;
  justify-content: center;
  padding: 13px 10px;
  text-align: center;
  background: rgba(5,34,80,.34);
  border-radius: 12px;
}
.master-nav:nth-child(3) {
  width: calc(50% - 5px);
  grid-column: 1 / -1;
  justify-self: center;
}
.master-nav > span { align-items: center; }
.master-nav strong { font-size: clamp(.98rem, 1.9vw, 1.13rem); white-space: normal; }
.master-nav small { font-size: .75rem; }

.family-toggle {
  background: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 62%, #061d43), #061a3f);
  border-color: color-mix(in srgb, var(--category-color) 78%, #81c8ff);
  box-shadow: 0 13px 34px rgba(0,8,25,.24), 0 0 20px color-mix(in srgb, var(--category-color) 17%, transparent);
}
.family-group.expanded .family-toggle {
  background: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 78%, #09224a), #082859);
  border-color: color-mix(in srgb, var(--category-color) 82%, white);
  width: 100%;
  max-width: 100%;
}
.family-grid {
  align-items: stretch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.family-grid::-webkit-scrollbar { display: none; }
.family-scroll-control {
  width: 100%;
  height: 25px;
  margin: 5px 0 0;
  padding: 0;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
  background: transparent;
}
.family-scroll-control:active { cursor: grabbing; }
.family-scroll-control:disabled { opacity: .4; cursor: default; }
.family-scroll-control::-webkit-slider-runnable-track {
  height: 6px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 999px;
}
.family-scroll-control::-webkit-slider-thumb {
  width: 25px;
  height: 25px;
  margin-top: -10px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 3px solid #168cff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22,140,255,.2), 0 4px 12px rgba(0,0,0,.28);
}
.family-scroll-control::-moz-range-track {
  height: 6px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 999px;
}
.family-scroll-control::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border: 3px solid #168cff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22,140,255,.2), 0 4px 12px rgba(0,0,0,.28);
}
.family-grid .family-card {
  position: relative;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--category-color) 24%, #061a3f), #061a3f);
  border: 1.5px solid color-mix(in srgb, var(--category-color) 72%, #abd8ff);
}
.family-grid .family-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 7px;
  background: var(--category-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--category-color) 65%, transparent);
}
.family-card-media {
  aspect-ratio: 1 / 1;
  padding: 27px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--category-color) 68%, white), transparent 24%),
    linear-gradient(145deg, #04132f 0%, color-mix(in srgb, var(--category-color) 78%, #082454) 115%);
}
.family-card-media::before {
  content: "";
  width: 56px;
  height: 3px;
  margin-bottom: auto;
  background: white;
  border-radius: 999px;
  opacity: .9;
}
.family-card-media span {
  color: rgba(255,255,255,.82);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .11em;
}
.family-card-media strong { margin-top: 8px; max-width: 13ch; font-size: 1.65rem; line-height: 1.02; }
.family-card-body {
  min-height: 190px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  color: white;
  background: #061a3f;
  border-top: 3px solid var(--category-color);
}
.family-card-body > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.family-card-body small { color: color-mix(in srgb, var(--category-color) 58%, #c7e5ff); font-size: .73rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.family-card-body b {
  min-width: 44px;
  padding: 4px 8px;
  color: white;
  text-align: center;
  background: #103b7e;
  border: 1px solid rgba(99,183,255,.4);
  border-radius: 999px;
  font-size: .72rem;
}
.family-card-body h3 { margin: 16px 0 10px; color: white; font-size: 1.2rem; }
.family-card-body p { margin: 0; color: #c1d2ec; font-size: .91rem; }
.services-grid h3 { margin-top: 0; }

@media (max-width: 720px) {
  .portal-dock {
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  .master-nav {
    min-width: 0;
    min-height: 78px;
    padding: 10px 7px;
  }
  .master-nav:nth-child(3) { width: calc(50% - 4px); }
  .master-nav strong { font-size: clamp(.86rem, 3.7vw, 1rem); line-height: 1.12; }
  .master-nav small { display: block; font-size: clamp(.62rem, 2.6vw, .72rem); }
  .family-area,
  .services-area { min-height: 640px; padding: 58px 14px 72px; }
  .area-hero { padding-inline: 6px; margin-bottom: 27px; }
  .area-hero > p:last-child { font-size: .96rem; }
  .family-toggle { min-height: 70px; padding: 13px 15px; border-radius: 15px; }
  .family-grid { padding-right: 18vw; gap: 13px; }
  .family-grid article { min-height: 0; flex-basis: min(76vw, 304px); }
  .family-card-media { padding: 22px; }
  .family-card-media strong { font-size: 1.45rem; }
  .family-card-body { min-height: 184px; padding: 16px 17px 18px; }
  .services-grid { grid-template-columns: 1fr; }
  .services-grid article { min-height: 180px; padding: 23px; }
  .services-grid h3 { margin-top: 0; }
  .area-contact { width: 100%; justify-content: space-between; }
  .social-row { gap: 15px; }
  .social-row a { width: 38px; height: 38px; }
  .social-row svg,
  .social-row a img { width: 30px; height: 30px; }
}

/* Sistema visual mate v31: jerarquía sobria, sin azul eléctrico */
:root {
  --navy: #091b32;
  --blue: #244b75;
  --bright-blue: #426b94;
  --electric-blue: #6685a3;
  --electric-blue-soft: #9bb2c8;
  --line: #64788d;
}

.catalog {
  border-top-color: rgba(139,163,187,.18);
  box-shadow: inset 0 42px 64px -76px rgba(145,170,194,.34);
}
.catalog .eyebrow,
.methodology .eyebrow,
.services-hero .eyebrow { color: #9bb2c8; }
.catalog h2,
.methodology h2,
.latest-heading h2,
.official-heading h2,
.area-hero h2 { color: #f2f5f8; }

.node-menu summary { color: #244b75; }
.node-menu summary:hover,
.node-menu summary:focus-visible { background: #e9eef4; border-color: #c4d0dc; }
.node-menu[open] summary { color: #fff; background: #172f4a; border-color: #6f879f; }
.node-menu-panel {
  background: #0c2038;
  border-color: #415a73;
  box-shadow: 0 22px 48px rgba(0,8,25,.38);
}
.node-menu-panel::before { background: #0c2038; border-color: #415a73; }
.node-menu-panel p { color: #9bb2c8; }
.node-menu-panel a::before { background: #7892aa; box-shadow: 6px 0 0 #7892aa; }
.node-menu-panel a::after { background: #a6b8c9; box-shadow: none; }
.node-menu-panel a:hover,
.node-menu-panel a:focus-visible { background: #173553; }

.nav-cta {
  background: #102843;
  border-color: #526d87;
  box-shadow: 0 7px 18px rgba(4,19,47,.16);
}
.header-share { color: #244b75; background: #edf1f5; border-color: #c8d2dc; }
.header-share:hover,
.header-share:focus-visible { color: #fff; background: #2c5278; border-color: #5f7891; }

.portal-dock {
  background: #091b32;
  border-color: #435a70;
  box-shadow: 0 20px 48px rgba(0,8,25,.32);
  backdrop-filter: none;
}
.master-nav {
  position: relative;
  overflow: hidden;
  background-color: #112b47;
  background-image: linear-gradient(rgba(255,255,255,.012), rgba(255,255,255,.012)), url("assets/network-nodes.svg");
  background-position: center;
  background-size: auto, 760px auto;
  border-color: #3f5972;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.master-nav strong { color: #f4f6f8; }
.master-nav small { color: #aebfd0; }
.master-nav:hover,
.master-nav:focus-visible {
  transform: translateY(-1px);
  background-color: #173654;
  background-image: url("assets/network-nodes.svg");
  border-color: #6f879f;
  box-shadow: 0 10px 24px rgba(0,8,25,.22);
}
.master-nav.active {
  transform: none;
  background-color: #1b3b5d;
  background-image: url("assets/network-nodes.svg");
  border-color: #8095a9;
  box-shadow: inset 3px 0 0 #a8b8c8, 0 10px 25px rgba(0,8,25,.2);
}

.group-toggle,
.family-toggle {
  background-color: #102943;
  background-image: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 18%, transparent), transparent 58%), url("assets/network-nodes.svg");
  background-size: auto, 1080px auto;
  border-color: color-mix(in srgb, var(--category-color) 38%, #62778b);
  box-shadow: 0 12px 28px rgba(0,8,25,.2);
  backdrop-filter: none;
}
.group-toggle:hover,
.group-toggle:focus-visible,
.family-group.expanded .family-toggle {
  transform: translateY(-1px);
  background-color: #173552;
  background-image: linear-gradient(110deg, color-mix(in srgb, var(--category-color) 22%, transparent), transparent 62%), url("assets/network-nodes.svg");
  border-color: color-mix(in srgb, var(--category-color) 50%, #8294a6);
  box-shadow: 0 15px 32px rgba(0,8,25,.24);
}

.card,
.family-grid .family-card {
  background: #0b2039;
  border-color: color-mix(in srgb, var(--category-color) 38%, #536a80);
  box-shadow: 0 16px 34px rgba(0,8,25,.23);
  backdrop-filter: none;
}
.card::before,
.family-grid .family-card::before {
  background: color-mix(in srgb, var(--category-color) 58%, #718397);
  box-shadow: none;
}
.card:hover {
  border-color: color-mix(in srgb, var(--category-color) 48%, #7f92a4);
  box-shadow: 0 20px 40px rgba(0,8,25,.28);
}
.card.linked { outline-color: rgba(126,150,174,.38); box-shadow: 0 20px 42px rgba(0,8,25,.3); }
.card-body,
.family-card-body { background: #0b2039; box-shadow: 0 -8px 20px rgba(0,8,25,.16); }
.category-tag,
.family-card-body small { color: color-mix(in srgb, var(--category-color) 52%, #c2cfda); }
.item-number,
.family-card-body b { background: #213d5b; border-color: #4f6982; }
.source-icon { background: #1a3653; border-color: #506c86; box-shadow: 0 5px 14px rgba(0,8,25,.22); }
.source-icon:hover,
.source-icon:focus-visible { background: #294c70; border-color: #8298ad; }

.precedent-mark { background: #294d72; box-shadow: 0 8px 20px rgba(0,8,25,.24); }
.precedent-text { border-left-color: #7792aa; }
.precedent-trigger:hover,
.precedent-trigger:focus-visible { background: #294d72; box-shadow: 0 9px 24px rgba(0,0,0,.26); }
.research-actions button:hover,
.research-actions button:focus-visible { border-color: #8098ae; background: #294a6a; }

.latest,
.official-sources {
  background: #0b2039;
  border-color: #3d5872;
  box-shadow: 0 23px 54px rgba(0,8,25,.28);
}
.latest-card {
  background: color-mix(in srgb, var(--category-color) 14%, #102944);
  border-color: #405b75;
}
.latest-card:hover,
.latest-card:focus-visible {
  background: color-mix(in srgb, var(--category-color) 20%, #16324f);
  border-color: #71879d;
}
.latest-copy small,
.official-grid span { color: #9fb3c7; }
.official-grid a { background: #132c47; border-color: #415d77; }
.official-grid a:hover,
.official-grid a:focus-visible { background: #193754; border-color: #71899f; }

.methodology,
.family-area,
.services-area { border-top-color: rgba(139,163,187,.16); }
.method-grid article {
  background: #102944;
  border-color: #3c5771;
  border-left-color: #b59b62;
  box-shadow: 0 16px 34px rgba(0,8,25,.2);
  backdrop-filter: none;
}
.services-grid article {
  background-color: #0f2843;
  background-image: url("assets/network-nodes.svg");
  background-size: 980px auto;
  border-color: #3f5b75;
  box-shadow: 0 17px 38px rgba(0,8,25,.22);
}
.area-contact {
  background: #244b73;
  border-color: #688098;
  box-shadow: 0 12px 28px rgba(0,18,48,.26);
}
.area-contact:hover,
.area-contact:focus-visible { background: #315a81; }

.group-grid::-webkit-scrollbar-thumb { background: #d7dfe7; box-shadow: none; }
.family-scroll-control::-webkit-slider-thumb,
.family-scroll-control::-moz-range-thumb { border-color: #607f9d; box-shadow: 0 4px 11px rgba(0,0,0,.26); }

@media (max-width: 720px) {
  .master-nav { background-size: auto, 590px auto; }
  .master-nav.active { box-shadow: inset 3px 0 0 #a8b8c8, 0 8px 20px rgba(0,8,25,.2); }
}
