:root {
  --paper: #f5f6ef;
  --white: #fcfdf8;
  --ink: #173d36;
  --body: #415750;
  --teal: #176b59;
  --edge: #dbe4d7;
  --soft: #e7eee4;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.55;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
p { color: var(--body); }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #438864; outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; inset: 8px auto auto 8px; transform: translateY(-170%); background: var(--white); padding: 9px 16px; z-index: 10; }
.skip:focus { transform: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 8px 15px; text-decoration: none; font-size: 15px; line-height: 1.35; font-weight: 700; color: var(--ink); background: var(--white); }
.btn:hover { filter: brightness(.95); }
.btn .icon { width: 18px; height: 18px; }
.btn.member-btn { justify-self: end; border-color: #bfcfc4; max-width: 100%; }
#member-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.solid { color: white; background: var(--teal); }
.btn.outline { background: transparent; border-color: #b9cec1; }
.btn.soft { background: var(--soft); }
.text-link { display: inline-flex; align-items: center; width: max-content; max-width: 100%; border: 0; padding: 0; min-height: 28px; color: #126451; background: transparent; font-size: 15px; font-weight: 750; text-decoration: underline; text-decoration-color: #73a395; text-underline-offset: 4px; text-align: left; }
.text-link:hover { text-decoration-color: currentColor; }
.eyebrow { color: var(--teal); font-size: 13px; font-weight: 750; letter-spacing: .12em; margin-bottom: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section { padding-top: 44px; scroll-margin-top: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(29px, 3.3vw, 42px); line-height: 1.16; letter-spacing: -.045em; }
.section-heading p { margin-top: 6px; }
.two-col, .three-col { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0,1fr)); }
.action-card h3 { font-size: 18px; line-height: 1.24; margin: 10px 0 6px; }
.action-card p { margin-bottom: 8px; }
.tile-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: var(--teal); background: #f8fbef; border: 1px solid #cfdfd1; flex: none; }
.agenda-panel, .action-card { border-radius: 22px; background: var(--white); border: 1px solid var(--edge); min-width: 0; }
.panel-top { padding: 14px 17px; display: flex; gap: 11px; align-items: center; border-bottom: 1px solid var(--edge); }
.panel-top h3 { font-size: 18px; }
.panel-top button { margin-left: auto; }
.stack { max-height: 560px; overflow: auto; }
.empty { padding: 21px; text-align: center; }
.empty .text-link { margin-top: 6px; }
.action-card { padding: 20px; }
.action-card .tile-icon { background: var(--soft); }
.board { margin-top: 16px; }
.record { padding: 16px; overflow-wrap: anywhere; }
.record + .record { border-top: 1px solid var(--edge); }
.record h4 { font-size: 19px; margin: 0; }
.record .description { white-space: pre-wrap; margin-top: 6px; }
.record .meta { color: #50675d; font-size: 14px; margin-top: 3px; }
.record .actions { margin-top: 8px; column-gap: 16px; align-items: center; }
.dialog { border: 1px solid var(--edge); background: var(--white); color: var(--ink); border-radius: 22px; width: min(476px, calc(100% - 26px)); max-height: calc(100% - 26px); padding: 22px 25px; box-shadow: 0 22px 88px #153f3640; }
.dialog::backdrop { background: #102c25a8; }
.dialog[open] { animation: reveal .22s var(--ease-out); }
@keyframes reveal { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.manual-dialog { width: min(680px, calc(100% - 26px)); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { letter-spacing: -.035em; line-height: 1.1; font-size: 29px; }
.close { display: grid; place-items: center; flex: none; width: 37px; height: 37px; background: var(--soft); color: var(--ink); border: 0; border-radius: 50%; }
.switch { display: flex; gap: 7px; margin-bottom: 14px; }
.switch [aria-pressed="true"] { background: var(--teal); color: white; }
form { display: grid; gap: 11px; }
form > .btn { justify-self: start; }
label { display: grid; gap: 4px; color: var(--ink); font-size: 15px; font-weight: 700; }
input, textarea { background: white; color: var(--ink); border: 1px solid #a8c0b2; border-radius: 8px; padding: 8px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
.form-row { gap: 9px; }
.form-status { margin-top: 10px; color: #952f23; font-size: 14px; }
.form-status:empty { display: none; }
.muted { color: var(--body); font-size: 14px; }
.admin-tools { display: grid; gap: 10px; padding-block: 13px; margin-block: 8px; border-block: 1px solid var(--edge); }
.admin-tools > .btn { justify-self: start; }
.search { display: flex; align-items: center; gap: 8px; padding-left: 10px; border: 1px solid #a8c0b2; border-radius: 8px; margin-top: 14px; }
.search input { border: 0; background: transparent; }
.chapters { padding: 0; margin: 10px 0 0; list-style: none; }
.chapters a { padding: 8px 4px; border-bottom: 1px solid var(--edge); display: flex; gap: 12px; align-items: center; justify-content: space-between; text-decoration: none; }
.chapters a:hover { text-decoration: underline; }
.chapters span { flex: none; color: var(--body); font-size: 14px; }
.notice { position: fixed; z-index: 5; inset: auto 14px 14px auto; color: white; background: var(--ink); border-radius: 11px; padding: 11px 14px; max-width: min(420px,calc(100vw - 28px)); box-shadow: 0 6px 28px #09251d44; }
@media (max-width: 670px) {
  .member-btn { padding-inline: 9px; font-size: 14px; }
  .section { padding-top: 32px; }
  .section-heading { align-items: start; flex-direction: column; gap: 9px; }
  .two-col, .three-col { grid-template-columns: 1fr; gap: 12px; }
  .panel-top { flex-wrap: wrap; }
  .panel-top button { margin-left: 0; }
  .form-row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  background: #e9ebe2;
}
.archive-stage {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 46px 24px;
  overflow: clip;
  background: radial-gradient(ellipse at 50% 35%, #fbfaf2 1%, #e8ece1 63%, #dadecf);
}
.archive {
  position: relative;
  width: min(420px, 100%);
}
.archive-case {
  position: relative;
  min-height: 490px;
  isolation: isolate;
  perspective: 1500px;
  transform: rotate(-2.4deg);
  transition: transform 360ms var(--ease-drawer);
}
.archive.is-open .archive-case {
  transform: translateX(47%) rotate(0deg);
}
.archive-papers, .archive-tray, .archive-cover {
  position: absolute;
  inset: 0;
  border-radius: 9px 19px 19px 9px;
}
.archive-papers { z-index: -1; }
.archive-papers span {
  position: absolute;
  inset: 2% 5% 6%;
  border: 1px solid #a7b7a3;
  border-radius: 4px;
  background: #f5f4e9;
  transform-origin: 50% 80%;
}
.archive-papers span:nth-child(1) { transform: translateY(-20px) rotate(4deg); background: #dbe6d6; }
.archive-papers span:nth-child(2) { transform: translateY(-12px) rotate(-5deg); }
.archive-papers span:nth-child(3) { transform: translateY(-18px) rotate(-.5deg); background: #e8ecdc; }
.archive-cover {
  z-index: 2;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 410ms var(--ease-drawer);
}
.archive.is-open .archive-cover { transform: rotateY(-174deg); pointer-events: none; }
.archive-front, .archive-back {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid #719687;
  border-left-width: 11px;
  backface-visibility: hidden;
}
.archive-front {
  background: linear-gradient(154deg, #bcd6c8, #8bb4a8 54%, #a4c8b9);
  box-shadow: inset 0 0 1px 2px #fbfff36e, inset 0 -8px 18px #214e452c, 9px 18px 25px #304b322c, 22px 45px 64px #304b3229;
}
.archive-back {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 28px;
  transform: rotateY(180deg);
  color: #376b5e;
  background: linear-gradient(135deg, #a4cbbb, #b4d1c5);
  box-shadow: inset 0 0 0 2px #edf5e46b, 10px 24px 47px #304b322c;
}
.archive-back span {
  justify-self: end;
  font: italic 17px Georgia, serif;
}
.archive-back div {
  border: 1px solid #759c8c;
  border-radius: 4px 4px 9px 9px;
  background: repeating-linear-gradient(0deg, transparent 0 20px, #e1f1e32c 20px 21px), linear-gradient(140deg, #d5e6d85e, #6d9e8d40);
}
.archive-card {
  display: grid;
  grid-template-rows: auto 1fr;
  position: absolute;
  inset: 28px 27px 81px 24px;
  padding: 25px 23px 21px;
  border: 1px solid #cbd8c2;
  border-radius: 5px;
  box-shadow: 1px 7px 15px #1d413234;
  background: #f4f3e8;
}
.archive-card h1 {
  margin: 5px 0 22px;
  color: #1e4136;
  font: normal clamp(3.05rem, 6.4vw, 4.15rem)/.94 Georgia, "Times New Roman", serif;
  letter-spacing: -.065em;
}
.archive-card h1 span { white-space: nowrap; }
.archive-photo {
  min-height: 88px;
  background: linear-gradient(5deg, #163e3145, #41695913), url("recursos/costa.jpg") 58% 60% / cover;
}
.archive-open {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0 22px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border: 0;
  border-radius: inherit;
  color: #103f36;
  background: linear-gradient(152deg,#e8fbf329,transparent 53%,#74a49727);
}
.archive-open span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 4px 10px 4px 15px;
  border-radius: 7px;
  background: #eff6e6;
  border: 1px solid #7fa68b;
  font-size: .9375rem;
  font-weight: 750;
  transition: transform 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.archive-open:hover span { background: #f8fff2; transform: translateY(-2px); }
.archive-open:active span { transform: scale(.97); }
.archive-open .icon { width: 16px; height: 16px; }
.archive-tray {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 18px 12px;
  z-index: 1;
  background: linear-gradient(130deg,#cfdfd0,#a6c5b3);
  border: 1px solid #7eaa97;
  border-left-width: 11px;
  box-shadow: inset 0 0 0 2px #ebf7ea73, 6px 25px 50px #345f3240;
}
.archive-list { list-style: none; display: grid; padding: 0; margin: 0; gap: 9px; }
.file-tab {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  text-align: left;
  text-decoration: none;
  padding: 11px 12px;
  width: 100%;
  min-height: 66px;
  border-radius: 6px;
  border: 1px solid #c6d2c1;
  color: var(--ink);
  background: #fffdf4;
  box-shadow: 0 2px 4px #2c50341d;
  transition: transform 155ms var(--ease-out), box-shadow 155ms var(--ease-out);
}
.file-tab:hover { transform: translateY(-2px); box-shadow: 0 5px 10px #2c503430; }
.file-tab:active { transform: scale(.985); }
.file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #e4eee0;
  color: #206452;
}
.archive-list li:nth-child(2) .file-icon { background: #dcebe9; color: #205b5f; }
.archive-list li:nth-child(3) .file-icon { background: #e9e8df; color: #565645; }
.archive-list li:nth-child(4) .file-icon { background: #f4e5cf; color: #805226; }
.file-meta { color: #4d655b; font-size: .875rem; }
.archive-noscript { margin-top: 4rem; }
.loteria-actions { margin-top: 15px; }

@media (max-width: 850px) {
  .archive.is-open .archive-case { transform: rotate(0deg); }
  .archive.is-open .archive-cover { opacity: 0; transform: rotateY(-100deg); }
  .archive-cover { transition: transform 310ms var(--ease-drawer), opacity 210ms var(--ease-out); }
  .archive-back { display: none; }
}
@media (max-width: 480px) {
  .archive-stage { padding: 85px 20px 50px; }
  .archive-case { min-height: min(464px, max(380px, calc(100svh - 142px))); }
  .archive-card { inset: 24px 19px 68px 17px; padding: 22px 16px 16px; }
  .archive-card h1 { font-size: clamp(2.62rem, 12vw, 3.9rem); margin: 14px 0 15px; }
  .archive-tray { padding: 12px 9px 10px; }
  .archive-list { gap: 7px; }
  .file-tab { gap: 8px; padding: 8px; min-height: 55px; }
  .file-meta { font-size: .75rem; }
}
@media (max-height: 520px) {
  .archive-case { min-height: 388px; }
  .archive-card h1 { font-size: clamp(2.4rem, 8vw, 3.3rem); margin-block: 10px 13px; }
  .archive-photo { min-height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-case, .archive-cover, .archive-open span, .file-tab { transition: none; }
}

.site-tools {
  position: absolute;
  z-index: 4;
  inset: 20px 25px auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}
.site-tools .btn { pointer-events: auto; }
.site-tools .archive-close { margin-right: auto; }
.archive-stage { padding-top: 87px; }
.sheet-stack {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #c6d3c0;
  border-radius: 5px;
  background: #fffdf4;
  box-shadow: 0 3px 8px #2c50342c;
}
.archive-sheet { padding: 17px 17px 22px; }
.sheet-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(1.65rem, 3vw, 2.08rem);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -.035em;
}
.sheet-title:focus { outline: none; }
.archive-sheet .file-tab {
  min-height: 55px;
  padding: 7px 8px;
  background: #f8f9ef;
}
.archive-sheet .section { padding-top: 16px; }
.archive-sheet .section:first-of-type { padding-top: 0; }
.archive-sheet .two-col, .archive-sheet .three-col { grid-template-columns: 1fr; gap: 9px; }
.archive-sheet .action-card { padding: 13px; }
.archive-sheet .action-card .tile-icon { display: none; }
.archive-sheet .action-card h3 { margin-top: 0; }
.archive-sheet .panel-top { padding: 11px; flex-wrap: wrap; }
.archive-sheet .panel-top button { margin-left: 0; }
.archive-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 6px;
}
.page-previous { grid-column: 1; grid-row: 1; justify-self: start; }
.page-next { grid-column: 3; grid-row: 1; justify-self: end; }
.page-counter { grid-column: 2; grid-row: 1; font-size: .875rem; color: #244c3e; }
.archive-pager a { min-height: 33px; }
.sheet-map { display: block; width: 100%; height: auto; max-height: 175px; object-fit: cover; border-radius: 5px; }
.sheet-actions, .sheet-topics { margin-top: 14px; }
.sheet-topics summary { cursor: pointer; font-weight: 700; color: #126451; }
@media (max-width: 480px) {
  .site-tools { inset: 13px 17px auto; }
  .archive-sheet { padding: 13px 11px 17px; }
  .archive-sheet .file-tab { grid-template-columns: 30px 1fr auto; }
  .archive-sheet .file-icon { width: 30px; height: 33px; }
  .archive-sheet .file-tab strong { line-height: 1.28; }
  .file-meta { white-space: nowrap; }
}

.dialog.access-notice { width: min(340px, calc(100% - 30px)); padding: 17px 19px 20px; }
.access-notice .dialog-head { align-items: center; margin-bottom: 7px; }
.access-notice .dialog-head h2 { font-size: 22px; }
