:root {
  color-scheme: dark;
  --navy: #071729;
  --surface: #0b2036;
  --panel: #102941;
  --line: #29445c;
  --text: #eef5fc;
  --muted: #b2c3d5;
  --gold: #f2c575;
  --ink: #151d28;
  --head: "Arial", "Helvetica Neue", sans-serif;
  font: 100%/1.55 var(--head);
  background: var(--navy);
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #86cbff; outline-offset: 4px; }
.wrap { width: min(100% - 96px, 1250px); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; translate: 0 -200%; z-index: 20; background: var(--navy); padding: 12px; }
.skip:focus { translate: 0; }
.masthead { background: #f8fafc; color: var(--ink); border-bottom: 1px solid #e6ecf2; }
.mast-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 84px; }
.signature { display: inline-flex; align-items: center; gap: 14px; }
.signature img:first-child { width: clamp(134px, 19vw, 225px); }
.signature img:last-child { width: clamp(76px, 9vw, 120px); }
.signature span { height: 28px; width: 1px; background: #ae8a49; }
.mast-inner nav { display: flex; align-items: center; gap: clamp(14px,2.4vw,34px); }
.mast-inner nav a { color: #142c45; text-decoration: none; font-weight: 700; font-size: .9rem; }
.mast-inner nav a:hover { text-decoration: underline; }
.mast-inner nav .nav-button { padding: 10px 15px; border: 1px solid #b7c6d2; border-radius: 7px; white-space: nowrap; }
.hero { min-height: 480px; position: relative; display: grid; align-items: center; isolation: isolate; overflow: clip; border-bottom: 1px solid #a9864c; background: #0a1d32; }
.hero-image { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#071727 1%, rgba(7,23,39,.99) 22%, rgba(7,23,39,.91) 34%,rgba(7,23,39,.4) 54%,transparent 72%), linear-gradient(0deg,rgba(7,23,39,.36),transparent 64%); }
.hero-copy { max-width: 590px; padding-block: 58px 68px; }
.kicker { display: flex; align-items: center; gap: 12px; color: var(--gold); font-size: .77rem; font-weight: 700; letter-spacing: .16em; }
.kicker span { height: 1px; width: 34px; background: var(--gold); }
h1,h2,h3,p { margin: 0; }
h1, h2 { text-wrap: balance; line-height: 1.06; letter-spacing: -.045em; }
h1 { margin-block: 18px 20px; font-size: clamp(2.65rem,5.5vw,5rem); font-weight: 800; }
h1 span { display: block; color: var(--gold); font-size: .47em; letter-spacing: .04em; margin-top: 11px; }
.hero-copy > p:not(.kicker) { max-width: 440px; color: #d5e3f0; font-size: 1.05rem; margin-bottom: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid transparent; border-radius: 7px; padding: 11px 19px; font-weight: 700; text-decoration: none; line-height: 1.25; }
.primary { color: #102032; background: var(--gold); }
.primary:hover { background: #ffe0a5; }
.photo-label { position: absolute; bottom: 12px; right: max(14px, calc((100vw - 1250px)/2)); padding: 3px 7px; border-radius: 4px; background: rgba(7,23,41,.84); color: #e9f0f6; font-size: .65rem; letter-spacing: .11em; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin-block: 22px 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.quick a { padding: 21px 25px; text-decoration: none; display: grid; gap: 2px; color: var(--text); }
.quick a + a { border-left: 1px solid var(--line); }
.quick a:hover { background: var(--panel); }
.quick strong { font-size: 1.25rem; letter-spacing: -.025em; }
.quick a > span:last-child { color: var(--muted); font-size: .89rem; }
.quick-code, .eyebrow { color: var(--gold); font-size: .73rem; font-weight: 700; letter-spacing: .13em; }
.library { display: grid; grid-template-columns: minmax(250px,.8fr) minmax(0,1.65fr); gap: clamp(35px,6vw,100px); align-items: start; padding-bottom: 64px; }
h2 { font-size: clamp(2rem,3.4vw,3.25rem); margin-top: 9px; margin-bottom: 15px; }
.library-intro > p:not(.eyebrow), .archive-call p:not(.eyebrow), .coord p:not(.eyebrow) { color: var(--muted); max-width: 54ch; }
.controls { margin-top: 26px; }
.controls label, legend { font-size: .9rem; font-weight: 700; }
.controls input, .login input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #506b84; border-radius: 7px; color: var(--text); background: var(--surface); min-height: 46px; }
.controls input::placeholder { color: var(--muted); }
.controls fieldset { padding: 0; margin: 15px 0 7px; border: 0; }
.filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.filter-buttons button, .secondary, .close { border-radius: 7px; padding: 7px 10px; color: var(--text); background: var(--surface); border: 1px solid #4a667f; min-height: 40px; }
.filter-buttons button[aria-pressed=true] { color: #142337; background: var(--gold); border-color: var(--gold); font-weight: 700; }
#conteo { font-size: .86rem; color: var(--muted); }
.catalog { border-top: 1px solid var(--line); }
.doc-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(125px,auto); gap: 14px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.doc-row:target { background: #10243b; outline: 1px solid #47617b; outline-offset: 4px; }
.doc-row h3 { font-size: 1.14rem; margin-block: 3px 4px; line-height: 1.3; }
.doc-row p { color: var(--muted); font-size: .93rem; }
.doc-row .meta { color: #a7bed2; font-size: .83rem; margin-top: 5px; }
.row-action { font-size: .9rem; font-weight: 700; padding: 9px 0 9px 7px; text-align: right; }
.row-action:hover { color: white; }
.empty { padding: 28px 0; }
.coord { background: var(--surface); border-block: 1px solid var(--line); padding-block: 55px; }
.coord-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.3fr); gap: clamp(25px,6vw,85px); align-items: start; }
.roles details { border-top: 1px solid var(--line); padding: 13px 0; }
.roles details:last-child { border-bottom: 1px solid var(--line); }
.roles summary { cursor: pointer; padding: 6px; font-weight: 700; }
.roles details p, .roles details a { margin-left: 22px; }
.roles details a { display: inline-block; margin-top: 8px; }
.archive-call { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-block: 45px; flex-wrap: wrap; }
.archive-call h2 { font-size: clamp(1.9rem,3vw,2.7rem); }
.archive-call .preview-note { flex-basis: 100%; }
.footer { border-top: 1px solid var(--line); padding-block: 24px; background: #061322; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; }
.footer strong { color: var(--text); }
.footer-inner > :last-child { text-align: right; }
.dossier { border-top: 1px solid var(--line); padding: 25px 0; }
.dossier p + p, .modal-body p + p { margin-top: 10px; }
dialog { width: min(770px,calc(100% - 30px)); max-height: calc(100dvh - 42px); color: var(--text); background: var(--surface); border: 1px solid #536e87; border-radius: 12px; padding: 22px 27px 27px; }
dialog::backdrop { background: rgba(2,10,20,.76); }
dialog form { display: flex; justify-content: flex-end; margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; margin-block: 15px; font-size: .9rem; }
td, th { border: 1px solid #426079; padding: 9px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { background: #17324a; }
.inner-page { padding-block: 42px; }
.inner-page > a { display: inline-block; margin-bottom: 24px; }
.inner-page h1 { font-size: clamp(2.3rem,5vw,4rem); }
.login { max-width: 560px; }
.login form { display: grid; max-width: 380px; margin-top: 22px; gap: 7px; }
.login button { justify-self: start; margin-top: 8px; }
.status { padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface); margin-block: 16px; color: #f9d9a7; }
.restricted-layout { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 15px; margin-bottom: 25px; }
.viewer { width: min(1220px,calc(100% - 20px)); }
.viewer iframe { width: 100%; height: min(65dvh,850px); border: 1px solid var(--line); background: var(--navy); margin-top: 10px; }
.viewer .pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.viewer input { width: 75px; min-height: 40px; }
@media (max-width: 920px) {
  .wrap { width: min(100% - 52px,1250px); }
  .hero-image { width: 100%; object-position: 62% 50%; }
  .hero::after { background: linear-gradient(90deg,#071727 5%,rgba(7,23,39,.96) 27%,rgba(7,23,39,.64) 49%,rgba(7,23,39,.14) 84%); }
  .quick a { padding: 16px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .mast-inner { flex-direction: column; gap: 0; padding-block: 12px 5px; min-height: 0; }
  .mast-inner nav { gap: 10px; width: 100%; justify-content: center; flex-wrap: wrap; margin-top: 3px; }
  .mast-inner nav a, .mast-inner nav .nav-button { padding: 8px 5px; border: 0; min-height: 40px; }
  .mast-inner nav a:last-child { color: #624915; }
  .hero { min-height: 0; align-items: end; padding-top: 160px; }
  .hero-image { height: 236px; object-position: 57% 50%; }
  .hero::after { background: linear-gradient(0deg,#071727 49%,rgba(7,23,39,.88) 59%,rgba(7,23,39,.22) 82%,rgba(7,23,39,.04)); }
  .hero-copy { padding-block: 16px 37px; }
  .hero-copy > p:not(.kicker) { font-size: 1rem; margin-bottom: 16px; }
  .hero h1 { margin-block: 12px; }
  .kicker span { width: 17px; }
  .photo-label { top: 12px; bottom: auto; }
  .quick { grid-template-columns: 1fr; margin-block: 16px 34px; }
  .quick a + a { border-left: 0; border-top: 1px solid var(--line); }
  .quick a { padding: 12px 14px; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); column-gap: 8px; }
  .quick-code { grid-row: span 2; align-self: center; }
  .quick strong { font-size: 1.03rem; }
  .quick a > span:last-child { font-size: .82rem; }
  .library, .coord-layout { grid-template-columns: 1fr; gap: 18px; }
  .library { padding-bottom: 38px; }
  .coord { padding-block: 35px; }
  .doc-row { grid-template-columns: 1fr; gap: 1px; padding: 14px 0; }
  .row-action { text-align: left; padding-left: 0; width: fit-content; }
  .archive-call { padding-block: 33px; }
  .footer-inner { display: grid; }
  .footer-inner > :last-child { text-align: left; }
  dialog { padding: 16px; }
  td,th { padding: 6px; }
  .restricted-layout { grid-template-columns: 1fr; }
}
.reader { max-width: 1050px; }
.reader h1 { margin-top: 8px; font-size: clamp(2.2rem,5vw,3.9rem); }
.reader-note { color: var(--muted); max-width: 72ch; }
.reader-controls, .reader-index { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 11px; margin-block: 20px; }
.reader-controls input, .reader-controls select { min-height: 41px; padding: 5px 8px; background: var(--surface); color: var(--text); border: 1px solid #4a667f; border-radius: 6px; }
.reader-controls input { width: 74px; }
.reader-controls button:disabled { opacity: .64; cursor: default; }
.reader-index { padding-block: 10px; border-block: 1px solid var(--line); }
.reader-index a { display: inline-block; padding: 5px; }
.reader-page { width: 100%; overflow: auto; background: #e7eaf0; margin-top: 12px; border-radius: 7px; }
.reader-page img { width: 100%; max-width: none; display: block; }
.reader-page[data-zoom="150"] img { width: 150%; }
.reader-page[data-zoom="200"] img { width: 200%; }
.row-actions { display: grid; align-items: end; }
.row-actions .row-action + .row-action { padding-top: 0; }
