@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Medium.otf") format("opentype"),
       url("../fonts/Gotham-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Bold.otf") format("opentype"),
       url("../fonts/Gotham-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mercury";
  src: url("../fonts/Mercury Text G1 Roman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mercury";
  src: url("../fonts/Mercury Text G1 Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #006d40;
  --green-dark: #004d2e;
  --green-pale: #dcebe4;
  --green-soft: rgba(0, 109, 64, .06);
  --green-strong-soft: rgba(0, 109, 64, .11);
  --line: rgba(0, 109, 64, .26);
  --text: #101010;
  --page-width: 1100px;
  --body-size: 17px;
  --transition: 420ms cubic-bezier(.22,.8,.25,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--green) var(--green-pale);
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 11px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--green-pale);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--green);
  border: 3px solid var(--green-pale);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: "Mercury", Georgia, serif;
}

button { font: inherit; }

.page-shell {
  width: min(100%, calc(var(--page-width) + 72px));
  margin: 0 auto;
  padding: 44px 36px 58px;
}

.report__header {
  display: none;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 74px;
  font-family: "Gotham", Arial, sans-serif;
}

.report__eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.report__header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: .035em;
}

.report__footer {
  margin-top: 26px;
  color: rgba(16, 16, 16, .72);
  font-family: "Mercury", Georgia, serif;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.interactive-stage {
  display: block;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.table-wrap::-webkit-scrollbar { width: 0; height: 0; }

.retirement-table {
  width: 100%;
  font-size: var(--body-size);
  font-variant-numeric: tabular-nums;
}

.table-header,
.table-row {
  display: grid;
}

.table-header {
  min-height: 166px;
  grid-template-rows: 40px 28px 98px;
  align-items: end;
  border-bottom: 2px solid var(--green);
}

.retirement-table[data-view="interactive"] .table-header {
  min-height: 112px;
  grid-template-rows: 48px 28px 36px;
}

.header-cell {
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  height: auto;
  padding: 8px 7px 10px;
  text-align: center;
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.header-cell--modalidad {
  grid-row: 3;
  align-items: flex-end;
  justify-content: flex-start;
  grid-column: 1;
  font-family: "Mercury", Georgia, serif;
  font-size: 17px;
}

.header-cell--group {
  grid-row: 1;
  position: relative;
  align-items: flex-end;
  align-self: end;
  padding-top: 0;
  padding-bottom: 8px;
  font-size: 17px;
  line-height: 1.06;
}

.header-cell--group::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 0;
  height: 2px;
  background: var(--green);
}

.header-cell--var {
  grid-row: 2;
  padding-bottom: 6px;
}

.header-cell--var::after { bottom: 0; }

.header-cell--view::after { display: none; }

.header-cell--view {
  justify-content: center;
  padding-inline: 0;
}

.header-cell--edad {
  grid-row: 1 / 3;
  align-items: flex-end;
  padding-bottom: 6px;
}

.header-cell--edad::after { display: none; }

.view-select-label {
  position: relative;
  display: block;
  width: min(100%, 480px);
}

.view-select-label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 180ms ease;
}

.view-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 5px 52px 5px 18px;
  color: var(--green);
  background: #fff;
  border: 1.5px solid rgba(0, 109, 64, .38);
  border-radius: 999px;
  box-shadow: 0 7px 18px rgba(0, 109, 64, .1);
  cursor: pointer;
  font-family: "Mercury", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.view-select:hover {
  background: var(--green-soft);
  border-color: var(--green);
  box-shadow: 0 9px 22px rgba(0, 109, 64, .14);
}

.view-select:focus-visible {
  outline: 2px solid var(--green-line-soft, rgba(0, 109, 64, .22));
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-cell--vertical {
  align-items: flex-end;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 3px 10px;
  font-size: 15px;
}
.header-cell--small {
  align-items: flex-end;
  font-size: 15px;
}

.retirement-table[data-view="interactive"] .header-cell--small {
  padding-bottom: 8px;
  line-height: 1.05;
}

.table-row {
  min-height: 66px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 109, 64, .16);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 360ms ease, transform 440ms cubic-bezier(.22,.8,.25,1), background-color 180ms ease;
}

.detail-control-row {
  display: grid;
  grid-column: 1 / -1;
  min-height: 40px;
  background: var(--green-soft);
  border-bottom: 1px solid rgba(0, 109, 64, .16);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 360ms ease, transform 440ms cubic-bezier(.22,.8,.25,1), background-color 180ms ease;
}

.detail-control-row.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.detail-control-button {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  color: var(--green);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: "Gotham", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease;
}

.detail-control-button:hover,
.detail-control-button:focus-visible {
  color: var(--green-dark);
  background: var(--green-strong-soft);
  outline: 0;
}

.detail-control-arrow {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.detail-control-arrow img {
  display: block;
  width: 12px;
  height: 12px;
}

.detail-control-button[aria-expanded="true"] .detail-control-arrow {
  transform: rotate(180deg);
}

.table-row.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.table-row:hover { background: var(--green-soft); }

.table-row.is-main {
  font-weight: 700;
  background: transparent;
}

.table-row.is-main + .table-row.is-detail,
.table-row.is-total {
  border-top: 2px solid var(--green);
}

.table-row.is-total {
  font-weight: 700;
}

.table-row.is-detail {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
}

.retirement-table.is-expanded .table-row.is-detail.is-visible {
  display: grid;
}

.retirement-table.is-expanded .table-row.is-detail.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
  padding: 18px 7px;
  text-align: right;
  line-height: 1.2;
}

.retirement-table[data-view="interactive"] .cell--value {
  justify-content: center;
  text-align: center;
}

.cell--label {
  gap: 12px;
  justify-content: flex-start;
  text-align: left;
  font-size: var(--body-size);
  line-height: 1.25;
}

.cell--label > span {
  min-width: 0;
}

.table-row.is-detail .cell--label {
  padding-left: 18px;
}

.table-row.is-subdetail .cell--label {
  padding-left: 34px;
}

.cell--value.is-positive::before,
.cell--value.is-negative::before {
  content: "";
  width: 0;
  height: 0;
  margin-right: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.cell--value.is-positive::before { border-bottom: 7px solid var(--green); }
.cell--value.is-negative::before { border-top: 7px solid #8a1f11; }

.table-action {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

.detail-toggle {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 178px;
  padding: 9px 16px;
  color: #fff;
  background: var(--green);
  border: 2px solid var(--green);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 109, 64, .14);
  cursor: pointer;
  font-family: "Gotham", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.detail-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.28) 44%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 650ms cubic-bezier(.22,.8,.25,1);
}

.detail-toggle > span {
  position: relative;
  z-index: 1;
}

.detail-toggle:hover,
.detail-toggle:focus-visible {
  color: var(--green);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 109, 64, .2);
  transform: translateY(-2px);
  outline: 0;
}

.detail-toggle:hover::before,
.detail-toggle:focus-visible::before {
  transform: translateX(120%);
}

.detail-toggle:active {
  transform: translateY(0) scale(.98);
}

.button-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  line-height: 1;
  transition: transform var(--transition);
}

.button-icon--image img {
  display: block;
  width: 20px;
  height: 20px;
}

.detail-toggle--secondary:hover .button-icon--image img,
.detail-toggle--secondary:focus-visible .button-icon--image img,
.detail-toggle--secondary[aria-pressed="true"] .button-icon--image img {
  filter: brightness(0) invert(1);
}

.detail-toggle[aria-expanded="true"] .button-icon {
  transform: rotate(45deg);
}

.detail-toggle--secondary {
  color: var(--green);
  background: #fff;
}

.detail-toggle--secondary:hover,
.detail-toggle--secondary:focus-visible,
.detail-toggle--secondary[aria-pressed="true"] {
  color: #fff;
  background: var(--green);
}

.retirement-table[data-view="full"] {
  --body-size: 16px;
}

.retirement-table[data-view="full"] .table-header {
  min-height: 166px;
}

.retirement-table[data-view="full"] .header-cell--group {
  font-size: 17px;
}

@media (max-width: 760px) {
  :root { --body-size: 40px; }

  .page-shell { padding: 38px 22px 58px; }

  .report__header {
    display: none;
    margin-bottom: 34px;
  }

  .report__eyebrow {
    margin-bottom: 4px;
    font-size: 40px;
  }

  .report__header h1 {
    font-size: 40px;
    letter-spacing: .02em;
  }

  .report__footer {
    margin-top: 20px;
    font-size: 32px;
  }

  .interactive-stage {
    display: block;
  }

  .table-wrap {
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: thin;
  }

  .table-header {
    min-height: 108px;
    grid-template-rows: 28px 20px 60px;
  }

  .retirement-table[data-view="interactive"] .table-header {
    display: block;
    min-height: 0;
    margin-bottom: 28px;
    border-bottom: 0;
  }

  .retirement-table[data-view="interactive"] .header-cell:not(.header-cell--view) {
    display: none;
  }

  .retirement-table[data-view="interactive"] .header-cell--view {
    display: block;
    padding: 0;
  }

  .header-cell { padding-inline: 2px; font-size: 40px; }
  .header-cell--modalidad { font-size: 40px; }
  .header-cell--group {
    font-size: 40px;
    padding-top: 0;
    padding-bottom: 5px;
  }
  .header-cell--group::after { bottom: 0; }
  .header-cell--var { padding-bottom: 4px; }
  .header-cell--var::after { bottom: 0; }
  .header-cell--edad { padding-bottom: 4px; }
  .header-cell--vertical,
  .header-cell--small { font-size: 40px; }
  .retirement-table[data-view="interactive"] .header-cell--small {
    padding-bottom: 6px;
    line-height: 1.05;
  }
  .view-select-label {
    width: 100%;
    max-width: none;
  }
  .view-select-label::after {
    right: 24px;
    width: 14px;
    height: 14px;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }
  .view-select {
    min-height: 72px;
    padding: 14px 78px 14px 30px;
    font-size: 40px;
    line-height: 1.12;
  }

  .retirement-table[data-view="interactive"] .table-row {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 18px;
    min-height: 0;
    padding: 28px 24px;
    border: 1px solid rgba(0, 109, 64, .18);
    border-radius: 8px;
    margin-bottom: 26px;
    background: rgba(0, 109, 64, .035);
  }

  .retirement-table[data-view="interactive"] .table-row.is-detail:not(.is-visible) {
    display: none;
    margin: 0;
    padding: 0;
  }

  .retirement-table[data-view="interactive"].is-expanded .table-row.is-detail.is-visible {
    display: grid;
  }

  .retirement-table[data-view="interactive"] .table-row.is-main,
  .retirement-table[data-view="interactive"] .table-row.is-total {
    border-color: rgba(0, 109, 64, .34);
    background: rgba(0, 109, 64, .07);
  }

  .retirement-table[data-view="interactive"] .table-row.is-detail {
    margin-left: 24px;
    margin-top: 0;
    margin-bottom: 16px;
    background: #fff;
  }

  .retirement-table[data-view="interactive"] .table-row.is-subdetail {
    margin-left: 44px;
  }

  .retirement-table[data-view="interactive"] .cell {
    width: 100%;
    height: auto;
    padding: 0;
  }

  .retirement-table[data-view="interactive"] .cell--label {
    display: block;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 109, 64, .18);
    font-size: 40px;
    line-height: 1.12;
  }

  .retirement-table[data-view="interactive"] .table-row.is-detail .cell--label,
  .retirement-table[data-view="interactive"] .table-row.is-subdetail .cell--label {
    padding-left: 0;
  }

  .retirement-table[data-view="interactive"] .cell--value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: baseline;
    justify-content: stretch;
    text-align: right;
    font-size: var(--body-size);
    line-height: 1.14;
  }

  .retirement-table[data-view="interactive"] .cell--value::before {
    content: attr(data-label);
    color: rgba(16, 16, 16, .72);
    font-family: "Gotham", Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    text-align: left;
  }

  .retirement-table[data-view="interactive"] .cell--value.is-positive::before,
  .retirement-table[data-view="interactive"] .cell--value.is-negative::before {
    width: auto;
    height: auto;
    margin-right: 0;
    border: 0;
  }

  .retirement-table[data-view="interactive"] .cell--value.is-positive span::before,
  .retirement-table[data-view="interactive"] .cell--value.is-negative span::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 6px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    vertical-align: middle;
  }

  .retirement-table[data-view="interactive"] .cell--value.is-positive span::before {
    border-bottom: 9px solid var(--green);
  }

  .retirement-table[data-view="interactive"] .cell--value.is-negative span::before {
    border-top: 9px solid #8a1f11;
  }

  .table-row { min-height: 44px; }
  .detail-control-row {
    min-height: 44px;
    margin: -10px 0 36px;
  }
  .detail-control-button {
    min-height: 44px;
    padding: 6px 18px;
    font-size: 32px;
  }
  .detail-control-arrow {
    width: 15px;
    height: 15px;
  }
  .detail-control-arrow img {
    width: 10px;
    height: 10px;
  }
  .cell {
    padding: 10px 2px;
    line-height: 1.18;
  }
  .cell--label { gap: 6px; }
  .table-row.is-detail .cell--label { padding-left: 10px; }
  .table-row.is-subdetail .cell--label { padding-left: 18px; }
  .detail-toggle {
    min-width: 154px;
    padding: 8px 12px;
    font-size: 32px;
  }

  .retirement-table[data-view="full"] {
    min-width: 1480px;
  }

  .interactive-stage.is-full .table-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--green) rgba(0, 109, 64, .12);
    padding-bottom: 18px;
  }

  .interactive-stage.is-full .table-wrap::-webkit-scrollbar {
    height: 16px;
  }

  .interactive-stage.is-full .table-wrap::-webkit-scrollbar-track {
    background: rgba(0, 109, 64, .12);
    border-radius: 999px;
  }

  .interactive-stage.is-full .table-wrap::-webkit-scrollbar-thumb {
    background: var(--green);
    border: 3px solid #fff;
    border-radius: 999px;
  }

  .interactive-stage.is-full::after {
    content: "Desliza →";
    display: flex;
    justify-content: flex-end;
    margin: 10px 4px 0;
    color: var(--green);
    font-family: "Gotham", Arial, sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    animation: swipe-hint 1400ms ease-in-out infinite;
  }

  .retirement-table[data-view="full"] {
    --body-size: 40px;
    min-width: 2100px;
  }

  .retirement-table[data-view="full"] .table-header {
    min-height: 360px;
    grid-template-rows: 72px 56px 232px;
  }

  .retirement-table[data-view="full"] .header-cell {
    padding: 10px 8px 14px;
    font-size: 24px;
    line-height: 1.08;
  }

  .retirement-table[data-view="full"] .header-cell--group,
  .retirement-table[data-view="full"] .header-cell--modalidad,
  .retirement-table[data-view="full"] .header-cell--edad {
    font-size: 32px;
  }

  .retirement-table[data-view="full"] .header-cell--vertical,
  .retirement-table[data-view="full"] .header-cell--small {
    font-size: 22px;
    line-height: 1;
  }

  .retirement-table[data-view="full"] .header-cell--vertical {
    padding: 8px 4px 16px;
  }

  .button-icon {
    width: 20px;
    height: 20px;
  }

  .button-icon--image img {
    width: 17px;
    height: 17px;
  }

  .cell--value.is-positive::before,
  .cell--value.is-negative::before {
    margin-right: 2px;
    border-left-width: 3px;
    border-right-width: 3px;
  }

  .cell--value.is-positive::before { border-bottom-width: 6px; }
  .cell--value.is-negative::before { border-top-width: 6px; }
}

@keyframes swipe-hint {
  0%, 100% { transform: translateX(0); opacity: .72; }
  50% { transform: translateX(10px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
