@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);
  --orange: #ed6b06;
  --orange-soft: rgba(237, 107, 6, .10);
  --orange-line: rgba(237, 107, 6, .38);
  --line: rgba(0, 109, 64, .26);
  --text: #101010;
  --page-width: 600px;
  --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,
select { font: inherit; }

.page-shell {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 36px 18px 52px;
}

.report__header {
  display: none;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
  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; }

.trade-card {
  border-top: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
}

.trade-controls {
  display: grid;
  grid-template-columns: minmax(190px, .42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.country-select-label,
.view-select-label {
  position: relative;
  display: block;
  width: 100%;
}

.country-select-label::after,
.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);
}

.country-select,
.view-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 36px;
  padding: 5px 44px 5px 15px;
  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: 16px;
  font-weight: 700;
  line-height: 1;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.trade-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trade-tab {
  min-height: 38px;
  padding: 6px 10px;
  color: var(--orange);
  background: #fff;
  border: 1.5px solid var(--orange-line);
  border-radius: 999px;
  cursor: pointer;
  font-family: "Gotham", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.08;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 220ms ease;
}

.trade-tab:hover,
.trade-tab:focus-visible {
  background: var(--orange-soft);
  outline: 0;
}

.trade-tab.is-active {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 8px 18px rgba(237, 107, 6, .16);
}

.trade-summary {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
}

.trade-country {
  margin: 0 0 6px;
  color: var(--green);
  font-family: "Gotham", Arial, sans-serif;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
}

.trade-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.trade-panel {
  min-height: 285px;
  padding: 24px 0 18px;
  opacity: 0;
  transform: translateY(14px);
  animation: panel-in 420ms cubic-bezier(.22,.8,.25,1) forwards;
}

.trade-panel__title {
  margin: 0 0 16px;
  color: var(--green);
  font-family: "Gotham", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.trade-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trade-list li {
  position: relative;
  padding-left: 16px;
  font-size: 16px;
  line-height: 1.34;
}

.trade-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.trade-block,
.full-block {
  margin: 0 0 16px;
}

.trade-block:last-child,
.full-block:last-child {
  margin-bottom: 0;
}

.trade-block__heading,
.full-block__heading {
  margin: 0 0 7px;
  color: var(--text);
  font-family: "Mercury", Georgia, serif;
  font-size: 16px;
  line-height: 1.28;
  font-weight: 700;
}

.full-block__heading {
  font-size: 13px;
}

.trade-block__heading--italic,
.full-block__heading--italic {
  font-style: italic;
}

.sentence-value {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.34;
  font-weight: 400;
}

.empty-note {
  margin: 0;
  color: rgba(16, 16, 16, .62);
  font-style: italic;
}

@keyframes panel-in {
  to { opacity: 1; transform: translateY(0); }
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--green) var(--green-pale);
  scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar { height: 11px; }
.table-wrap::-webkit-scrollbar-track { background: var(--green-pale); }
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--green);
  border: 3px solid var(--green-pale);
  border-radius: 999px;
}

.trade-full-table {
  width: 100%;
  min-width: 0;
  border-top: 2px solid var(--green);
  border-left: 1px solid var(--line);
  font-size: 8.5px;
  line-height: 1.18;
}

.full-head,
.full-row,
.full-country-row {
  display: grid;
  grid-template-columns: 1.05fr 2.7fr .62fr;
}

.full-head {
  min-height: 42px;
  color: var(--green);
  font-family: "Gotham", Arial, sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 2px solid var(--green);
}

.full-head > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.12;
}

.full-head > div:last-child span {
  display: block;
  max-width: 100%;
  font-size: 7px;
  line-height: 1.08;
}

.full-head > div,
.full-row > div,
.full-country-row > div {
  padding: 5px 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.full-row > div,
.full-country-row > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.full-country-row {
  grid-template-columns: 1fr;
  text-align: center;
  font-weight: 700;
  background: var(--green-soft);
}

.full-country-row > div { grid-column: 1 / -1; }
.full-country-row span { display: block; font-weight: 400; }
.full-cell-title { display: none; }
.full-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.full-cell--acuerdo .full-list {
  display: block;
  padding-left: 1.05em;
  list-style: disc;
}

.full-cell--acuerdo .full-list li {
  padding-left: .15em;
}

.full-list li + li { padding-top: 3px; border-top: 0; }
.full-block + .full-block { padding-top: 5px; border-top: 0; }
.full-cell--sentencia { text-align: left; font-weight: 400; }

.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 { 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); }
.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); }

.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;
}

@media (max-width: 760px) {
  .page-shell { padding: 32px 12px 48px; }

  .report__header {
    display: block;
    margin-bottom: 28px;
  }

  .report__eyebrow { margin-bottom: 4px; font-size: 13px; }
  .report__header h1 { font-size: 14px; letter-spacing: .02em; }
  .report__footer { margin-top: 20px; font-size: 10px; }

  .trade-controls {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 12px;
  }

  .country-select,
  .view-select { min-height: 34px; font-size: 15px; }

  .trade-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .trade-tabs::-webkit-scrollbar { display: none; }
  .trade-tab { flex: 1 0 auto; min-height: 34px; padding: 6px 10px; font-size: 10px; }
  .trade-country { font-size: 22px; }
  .trade-subtitle { font-size: 12px; }
  .trade-panel { min-height: 0; padding-top: 18px; }
  .trade-panel__title { font-size: 12px; }
  .trade-list li { font-size: 12px; line-height: 1.35; }
  .trade-block__heading { font-size: 13px; }
  .sentence-value { font-size: 12px; color: var(--text); font-weight: 400; }
  .trade-text { font-size: 12px; line-height: 1.35; }

  .trade-full-table { width: 100%; min-width: 0; border-left: 1px solid var(--line); font-size: 8px; }
  .full-head,
  .full-row,
  .full-country-row { display: grid; grid-template-columns: 1.05fr 2.7fr .62fr; }
  .full-head { display: grid; min-height: 40px; font-size: 8px; }
  .full-head > div:last-child span { font-size: 6.5px; }
  .full-row { border-bottom: 0; }
  .full-row > div { padding: 4px 3px; border-right: 1px solid var(--line); }
  .full-country-row { grid-template-columns: 1fr; }
  .full-country-row > div { grid-column: 1 / -1; }
  .full-cell-title { display: none; }
  .full-cell--sentencia { text-align: left; font-weight: 400; }
}

.trade-full-table,
.trade-full-table * {
  font-size: 16px !important;
}

.trade-full-table .full-head,
.trade-full-table .full-head * {
  font-size: 11.2px !important;
}

.trade-full-table .full-head > div,
.trade-full-table .full-row > div,
.trade-full-table .full-country-row > div {
  padding: 10px 9px;
}

.trade-full-table .full-cell--sentencia {
  align-items: center;
  text-align: center;
}

@media (max-width: 760px) {
  .trade-card {
    padding: 28px 18px;
  }

  .report__header {
    display: block;
    margin-bottom: 44px;
  }

  .report__eyebrow {
    margin-bottom: 12px;
    font-size: 45px;
    line-height: 1.05;
  }

  .report__header h1 {
    font-size: 50px;
    line-height: 1.18;
    letter-spacing: .02em;
  }

  .report__footer {
    margin-top: 34px;
    font-size: 32.5px;
    line-height: 1.35;
  }

  .country-select,
  .view-select {
    min-height: 70px;
    font-size: 37.5px;
  }

  .trade-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .trade-tab {
    width: 100%;
    flex: none;
    min-height: 70px;
    padding: 16px 18px;
    font-size: 27.5px;
  }

  .trade-country {
    font-size: 65px;
  }

  .trade-subtitle,
  .trade-panel__title,
  .trade-list li,
  .sentence-value,
  .trade-text {
    font-size: 40px;
    line-height: 1.42;
  }

  .trade-block__heading {
    font-size: 40px;
  }

  .table-action {
    margin-top: 46px;
  }

  .detail-toggle {
    width: 100%;
    min-width: 0;
    min-height: 76px;
    gap: 18px;
    padding: 18px 22px;
    font-size: 27.5px;
    line-height: 1.15;
  }

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

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

  .table-wrap {
    overflow-x: visible;
  }

  .trade-full-table,
  .trade-full-table * {
    font-size: 40px !important;
    line-height: 1.36;
  }

  .trade-full-table .full-head {
    display: none;
  }

  .trade-full-table .full-country-row,
  .trade-full-table .full-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trade-full-table .full-row > div,
  .trade-full-table .full-country-row > div {
    align-items: stretch;
    padding: 28px 20px;
    border-right: 1px solid var(--line);
  }

  .trade-full-table .full-cell-title {
    display: block;
    margin: 0 0 18px;
    color: var(--green);
    font-family: "Gotham", Arial, sans-serif;
    font-size: 28px !important;
    font-weight: 700;
    line-height: 1.18;
    text-align: left;
    text-transform: uppercase;
  }

  .trade-full-table .full-cell--sentencia {
    align-items: center;
    text-align: center;
  }
}

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