:root {
  /* Ecuador flag: yellow, blue and red in 2:1:1 bands. */
  --flag-yellow: #ffd100;
  --flag-blue: #034ea2;
  --flag-red: #d52b1e;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #0b2545;
  --muted: #5a6b85;
  --line: #dde3ee;
  --brand: var(--flag-blue);
  --brand-ink: #ffffff;
  --accent: var(--flag-yellow);
  --bar: var(--flag-blue);
  --bar-soft: #e6edf8;
  --warn-bg: #fff4c2;
  --warn-ink: #6b5200;
}
body::before {
  content: "";
  display: block;
  height: 12px;
  background: linear-gradient(
    var(--flag-yellow) 0 50%,
    var(--flag-blue) 50% 75%,
    var(--flag-red) 75%
  );
}
* {
  box-sizing: border-box;
}
html {
  /* Stops Android Chrome from inflating small text into ragged lines. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: var(--brand);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  text-underline-offset: 4px;
}
.wrap {
  max-width: 1220px;
  margin: auto;
  padding-left: 32px;
  padding-right: 32px;
}
.topbar {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar a {
  text-decoration: none;
}
.wordmark {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark-light {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0;
}
.mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}
.topbar > div {
  display: flex;
  gap: 30px;
  font-size: 13px;
  font-weight: 600;
}
header {
  border-top: 1px solid var(--line);
  padding: 55px 0 0;
  background: radial-gradient(ellipse at 90% 5%, #fff3c4 0, transparent 55%);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 750;
  margin-bottom: 18px;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--bar);
  border-radius: 50%;
  margin-right: 8px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -3px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  margin: 0 0 22px;
}
h1 em {
  font-weight: 400;
  color: var(--brand);
}
.intro {
  max-width: 500px;
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.8;
}
.hero-link {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.hero-link span {
  padding-left: 18px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
  border-top: 1px solid #d3dbe8;
  border-bottom: 1px solid #d3dbe8;
}
.kpi {
  padding: 23px 0 25px;
}
.kpi + .kpi {
  padding-left: 35px;
  border-left: 1px solid #d3dbe8;
}
.kpi b {
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -1px;
  display: block;
  font-variant-numeric: tabular-nums;
}
.kpi span {
  font-size: 12px;
  color: var(--muted);
}
main {
  padding-top: 40px;
  padding-bottom: 40px;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  gap: 26px;
  align-items: start;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 3px 5px #0b254505;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.search {
  display: flex;
  margin-top: 24px;
}
.search input {
  width: 100%;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #c5d0e2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 2px 3px #0b254505;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0 24px;
}
.chip {
  font-size: 11px;
  font-weight: 550;
  padding: 7px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}
.chip[aria-pressed="true"] {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.chip:hover {
  border-color: var(--bar);
}
.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  padding: 0 0 12px;
}
.result-toolbar select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  padding: 5px;
}
.results {
  list-style: none;
  padding: 0;
  margin: 0;
}
.results li {
  border-top: 1px solid var(--line);
}
.results a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 0;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}
.results a:hover {
  background: #edf2fa;
}
.entity-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  background: #edf2fa;
  border-radius: 8px;
  color: #5a76a3;
  font-size: 20px;
}
.entity-name {
  flex: 1;
  min-width: 0;
}
.nm {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.sub {
  font-size: 10px;
  color: var(--muted);
}
.amt {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.arrow {
  font-size: 13px;
  margin-left: 10px;
  color: #7d8ba3;
}
.more {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4f9;
  color: var(--brand);
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
}
.province-card h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}
.bars {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}
.lbl {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.val {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: right;
}
.track {
  grid-column: 1/-1;
  height: 5px;
  background: var(--bar-soft);
  border-radius: 4px;
  overflow: hidden;
}
.fill {
  height: 100%;
  background: var(--bar);
  border-radius: 4px;
}
/* Budget bars: the faint layer is the budget, the solid layer what was spent. */
.track.split {
  position: relative;
}
.track.split .fill {
  position: absolute;
  inset: 0 auto 0 0;
}
.track.split .fill.planned {
  opacity: 0.3;
}
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
}
.linkish:hover {
  text-decoration: underline;
}
.province-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.agent-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  background: #e6edf8;
  border-radius: 18px;
  padding: 32px;
  max-width: 1156px;
  margin-bottom: 25px;
}
.agent-strip .eyebrow {
  margin-bottom: 10px;
}
.agent-strip h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}
.agent-strip p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.button {
  display: inline-block;
  background: var(--brand);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 13px 20px;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
footer {
  color: var(--muted);
  font-size: 11px;
  padding-top: 20px;
  padding-bottom: 35px;
}
footer p {
  max-width: 920px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.stat {
  background: var(--bg);
  padding: 20px;
  border-radius: 12px;
}
.stat b {
  display: block;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.signal {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 16px;
  border-radius: 10px;
  margin-top: 20px;
  font-size: 13px;
}
.months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  align-items: end;
  height: 180px;
  margin-top: 25px;
}
.months div {
  min-height: 2px;
  background: var(--bar);
  border-radius: 5px 5px 0 0;
}
.months-lbl {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
.back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
td,
th {
  text-align: left;
  padding: 14px 8px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.date {
  white-space: nowrap;
}
.hidden,
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  background: white;
  padding: 15px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
.docs {
  max-width: 900px;
}
.docs h1 {
  font-size: 48px;
}
.docs pre {
  padding: 22px;
  background: var(--ink);
  color: #e6edf8;
  border-radius: 10px;
  overflow: auto;
  font-size: 13px;
}
.docs code {
  overflow-wrap: anywhere;
}
.docs .card {
  margin-top: 25px;
}
.docs li {
  margin-bottom: 10px;
}
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
}
.module {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  color: inherit;
  text-decoration: none;
}
a.module:hover {
  border-color: var(--bar);
}
.module-stat {
  font-weight: 600;
  margin: 16px 0 0;
}
.module-go {
  margin-top: auto;
  padding-top: 16px;
  color: var(--brand);
  font-size: 13px;
}
.module.soon {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}
@media (min-width: 1000px) {
  header .wrap {
    position: relative;
  }
  header .wrap:after {
    content: "EC / 2026";
    position: absolute;
    right: 40px;
    top: 80px;
    writing-mode: vertical-rl;
    letter-spacing: 7px;
    font-size: 12px;
    color: #7d8ba3;
  }
}
@media (max-width: 850px) {
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .province-card .bars {
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
  }
  .agent-strip {
    margin-left: 24px;
    margin-right: 24px;
  }
  .wordmark-light {
    display: none;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .topbar {
    height: 74px;
  }
  .topbar > div {
    gap: 18px;
    font-size: 12px;
  }
  .topbar > div > a:first-child {
    display: none;
  }
  header {
    padding-top: 35px;
  }
  h1 {
    letter-spacing: -1.8px;
  }
  .intro {
    font-size: 14px;
  }
  .kpi b {
    font-size: 24px;
  }
  .kpi + .kpi {
    padding-left: 14px;
  }
  .kpi span {
    font-size: 10px;
  }
  .kpi {
    padding: 20px 6px 20px 0;
  }
  .card {
    padding: 20px;
    border-radius: 12px;
  }
  main {
    padding-top: 25px;
  }
  .entity-icon {
    display: none;
  }
  .results a {
    gap: 10px;
  }
  .nm {
    font-size: 12px;
  }
  .amt {
    font-size: 13px;
  }
  .arrow {
    display: none;
  }
  .province-card .bars {
    grid-template-columns: 1fr;
  }
  .agent-strip {
    display: block;
    margin-left: 20px;
    margin-right: 20px;
    padding: 25px;
  }
  .agent-strip .button {
    margin-top: 20px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stat {
    padding: 14px;
  }
  .hide-sm {
    display: none;
  }
  .months,
  .months-lbl {
    gap: 5px;
  }
  .docs h1 {
    font-size: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

.detail-view header {
  display: none;
}
.tabbar {
  display: none;
}

/* Phones: an app-like shell. Sticky title bar, edge-to-edge sections, list
   rows with the amount beside the name, and a bottom tab bar. */
@media (max-width: 560px) {
  html {
    scroll-padding-top: 72px;
  }
  body {
    font-size: 16px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  body::before {
    height: 6px;
  }
  .wrap {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 56px;
    background: rgb(244 246 250 / 0.88);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .wordmark {
    font-size: 17px;
  }
  .mark {
    width: 28px;
    height: 28px;
  }
  .topbar > div {
    font-size: 13px;
  }
  /* The tab bar carries section navigation; the title bar keeps only the API link. */
  .topbar > div > a:not([href="/developers"]) {
    display: none;
  }
  header {
    border-top: 0;
    padding-top: 28px;
  }
  .eyebrow {
    font-size: 11px;
    margin-bottom: 12px;
  }
  h1 {
    font-size: 40px;
  }
  .intro {
    font-size: 16px;
    line-height: 1.6;
  }
  .hero-link {
    font-size: 15px;
  }
  .kpis {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .kpi,
  .kpi + .kpi {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-left: 0;
  }
  .kpi + .kpi {
    border-top: 1px solid #d3dbe8;
  }
  .kpi b {
    font-size: 26px;
  }
  .kpi span {
    font-size: 14px;
  }

  /* Sections run edge to edge, separated by a strip of background. */
  main.wrap:not(.docs) {
    padding-left: 0;
    padding-right: 0;
  }
  main {
    padding-top: 12px;
  }
  .card {
    padding: 22px max(20px, env(safe-area-inset-right)) 22px
      max(20px, env(safe-area-inset-left));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    margin-bottom: 12px;
  }
  .docs .card {
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 20px;
  }
  .modules {
    gap: 12px;
  }
  .back {
    margin: 8px 20px 16px;
    font-size: 15px;
  }
  h2 {
    font-size: 21px;
  }
  .muted {
    font-size: 15px;
    line-height: 1.55;
  }

  /* The search box stays under the title bar while scrolling the list. */
  .search {
    position: sticky;
    top: 56px;
    z-index: 10;
    margin: 18px -20px 0;
    padding: 8px 20px;
    background: var(--card);
  }
  .search input {
    font-size: 16px;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--bg);
    border-color: transparent;
    box-shadow: none;
  }
  .search input:focus {
    background: #fff;
    border-color: var(--brand);
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 8px -20px 16px;
    padding: 0 20px;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: none;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
  }
  .result-toolbar {
    flex-wrap: wrap;
    row-gap: 4px;
    font-size: 14px;
    padding-bottom: 6px;
  }
  .result-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
  }
  /* The option already says how it sorts; "Ordenar" stays for screen readers. */
  .result-toolbar .sort {
    font-size: 0;
  }
  .result-toolbar select {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    flex: 0 1 auto;
    min-width: 0;
    padding-right: 0;
    text-overflow: ellipsis;
  }
  .search + .result-toolbar {
    margin-top: 12px;
  }

  /* List rows: name and amount on top, details underneath, full-width tap. */
  .results a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    align-items: baseline;
    margin: 0 -20px;
    padding: 14px 20px;
  }
  .results a:hover {
    background: transparent;
  }
  .results a:active {
    background: #edf2fa;
  }
  .entity-name {
    display: contents;
  }
  .entity-name br {
    display: none;
  }
  .nm {
    grid-column: 1;
    font-size: 16px;
    line-height: 1.35;
  }
  .amt {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
  }
  .sub {
    grid-column: 1 / -1;
    font-size: 13.5px;
    line-height: 1.4;
  }
  .more {
    font-size: 15px;
    padding: 14px;
    border-radius: 12px;
  }
  .lbl,
  .val {
    font-size: 14px;
  }
  .province-note {
    font-size: 13px;
  }
  .stat b {
    font-size: 22px;
  }
  .stat span {
    font-size: 14px;
  }
  .months-lbl {
    font-size: 10px;
  }
  table {
    font-size: 14px;
  }
  td,
  th {
    padding: 12px 6px;
  }
  .agent-strip {
    border-radius: 14px;
  }
  .agent-strip p {
    font-size: 15px;
  }
  .button {
    font-size: 15px;
  }
  footer {
    font-size: 13px;
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom)
      env(safe-area-inset-left);
    background: rgb(255 255 255 / 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
  }
  .tabbar svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
  }
  .tabbar a[aria-current="page"] {
    color: var(--brand);
  }
  .tabbar a[aria-current="page"] svg {
    fill: var(--bar-soft);
  }
}
