/* Money pages: money-transfer.html, send-money-to-*.html, currency-converter.html and
   convert-*.html (built by tools/build-money-pages.mjs). One layout for every country and every
   pair; only the words, the flags and the numbers change. Loaded after styles.css and
   features.css, on a body with class "home-page feature-page money-page". */

.money-page {
  --money-width: var(--feature-width);
  --money-soft: #59606f;
  --money-tile: 0 22px 44px rgba(22, 28, 46, 0.05);
}

.money-page main > section {
  width: min(100%, var(--money-width));
  margin-inline: auto;
}

.money-page main > section + section {
  margin-top: clamp(104px, 10vw, 156px);
}

.money-page main > section + section::before {
  top: calc(0px - clamp(52px, 5vw, 78px));
}

.money-page .feature-icon {
  font-family: "MonMaterialIcons";
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
}

.money-flag {
  display: block;
  flex: none;
  width: var(--flag, 28px);
  height: var(--flag, 28px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(17, 18, 24, 0.06), 0 3px 8px rgba(42, 48, 95, 0.12);
}

/* Hero: the promise on the left, the app (or the converter) on the right. */
.money-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-top: clamp(8px, 2vw, 28px);
}

.money-eyebrow {
  margin: 0 0 clamp(16px, 1.8vw, 24px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.money-eyebrow .money-flag {
  --flag: 30px;
}

.money-page .money-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 4.9vw, 70px);
  font-weight: 600;
  line-height: max(1.02, var(--title-leading, 0));
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.money-title small {
  display: block;
  margin-top: 0.22em;
  color: var(--money-soft);
  font-size: 0.42em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.money-lede {
  max-width: 34ch;
  margin: clamp(18px, 2vw, 28px) 0 0;
  color: var(--money-soft);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.42;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.money-lede strong {
  color: var(--ink);
  font-weight: 600;
}

.money-actions {
  margin-top: clamp(26px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
}

.money-cta {
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #212121;
  box-shadow: 0 6px 14px rgba(33, 33, 33, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 320ms var(--ease-premium), box-shadow 320ms var(--ease-premium);
}

.money-cta:hover,
.money-cta:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(33, 33, 33, 0.18);
}

.money-more {
  color: var(--mon-indigo-deep);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.money-more::after {
  content: "\e15f";
  display: inline-block;
  margin-left: -1px;
  font-family: "MonMaterialIcons";
  font-size: 1.25em;
  font-weight: 400;
  line-height: 0;
  vertical-align: -0.27em;
  transition: transform 420ms var(--ease-premium);
}

.money-more:hover {
  text-decoration: none;
}

.money-more:hover::after {
  transform: translateX(3px);
}

.money-visual {
  justify-self: end;
  width: min(100%, clamp(300px, 25.5vw, 368px));
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.money-visual figcaption {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* The working calculator follows the Mon app's glass conversion sheet. */
.money-converter {
  justify-self: end;
  width: min(100%, 400px);
  margin: 0;
  text-align: left;
}

.money-converter__sheet {
  padding: 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(198, 201, 222, 0.97), rgba(181, 186, 212, 0.97));
  box-shadow: 0 26px 46px rgba(70, 82, 180, 0.17), 0 8px 22px rgba(109, 123, 255, 0.12);
}

.money-converter__title {
  margin: 0 0 32px;
  color: #fff;
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-align: center;
}

.money-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(112px, 0.95fr) minmax(0, 1.1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 90px;
  padding: 15px 14px;
  border: 1px solid rgba(255, 255, 255, 0.29);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 220ms ease;
}

html:not([data-money-focus="pointer"]) .money-field:focus-within {
  box-shadow: inset 0 0 0 2px rgba(65, 71, 147, 0.38);
}

.money-field__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.money-field__amount {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: #292c39;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.money-field input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
}

.money-field [data-symbol] {
  flex: none;
  max-width: 3em;
  font-size: 0.9em;
}

.money-currency {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding-right: 6px;
  border-radius: 8px;
  color: #292c39;
  cursor: pointer;
}

html:not([data-money-focus="pointer"]) .money-currency:focus-within {
  outline: 2px solid rgba(65, 71, 147, 0.55);
  outline-offset: 5px;
}

.money-currency .money-flag {
  --flag: 38px;
  box-shadow: 0 5px 12px rgba(42, 48, 95, 0.2);
}

.money-currency__copy {
  display: grid;
  gap: 2px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.money-currency__copy small {
  color: #515767;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.money-currency::after {
  content: "\f720";
  position: absolute;
  top: 50%;
  left: 40px;
  color: #292c39;
  font-family: "MonMaterialIcons";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.money-currency select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}

.money-swap {
  width: 48px;
  height: 48px;
  margin: 15px auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 25px;
  cursor: pointer;
  transition: transform 420ms var(--ease-premium), background 200ms ease;
}

.money-swap:hover {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.18);
}

.money-swap:focus-visible {
  outline: 2px solid rgba(65, 71, 147, 0.55);
  outline-offset: 3px;
}

.money-summary {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.29);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.money-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
}

.money-summary > div:first-child {
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.money-summary dt {
  flex: none;
  color: #515767;
  font-weight: 500;
}

.money-summary dd {
  min-width: 0;
  margin: 0;
  color: #343746;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.money-summary strong {
  font-weight: inherit;
}

.money-reading {
  margin: 16px 7px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.money-reading__source {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.money-converter .money-cta {
  width: 100%;
  min-height: 58px;
  margin-top: 16px;
  padding-inline: 12px;
  border-radius: 23px;
  background: linear-gradient(110deg, #6c79ff, #7959ff);
  box-shadow: 0 13px 24px rgba(77, 83, 174, 0.2);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.money-converter .money-cta:hover,
.money-converter .money-cta:focus-visible {
  color: #fff;
  box-shadow: 0 16px 28px rgba(77, 83, 174, 0.27);
}

/* Section headings: the site's own, left or centred. */
.money-heading {
  max-width: 760px;
  margin: 0 0 clamp(30px, 3.4vw, 46px);
}

.money-heading--center {
  margin-inline: auto;
  text-align: center;
}

.money-heading--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
}

.money-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 600;
  line-height: max(1.02, var(--title-leading, 0));
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.money-heading p {
  margin: 14px 0 0;
  color: var(--money-soft);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

/* Equal side columns keep the history title centered beside the reverse-pair link. */
.money-history-heading {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.money-history-heading h2 {
  grid-column: 2;
  grid-row: 1;
}

.money-heading .money-history-intro {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: min(100%, 64ch);
  margin: clamp(18px, 2vw, 26px) auto 0;
  line-height: 1.55;
}

.money-history-reverse {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.money-card {
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--money-tile);
}

/* Ninety days of the rate. */
.money-chart {
  padding: clamp(22px, 2.6vw, 34px);
}

.money-stats {
  margin: 0 0 clamp(18px, 2vw, 26px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}

.money-stats li {
  display: grid;
  gap: 4px;
}

.money-stats span {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: -0.01em;
}

.money-stats strong {
  color: var(--ink);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.money-stats .is-up { color: #1f8a5b; }
.money-stats .is-down { color: #c2414b; }

.money-plot {
  position: relative;
  touch-action: pan-y;
}

.money-plot:focus-visible {
  outline: 2px solid rgba(109, 123, 255, 0.45);
  outline-offset: 8px;
  border-radius: 12px;
}

.money-plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.money-plot__axis {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.money-plot__tip {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 11px;
  border-radius: 12px;
  background: #212121;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 160ms ease;
  font-variant-numeric: tabular-nums;
}

.money-plot.is-reading .money-plot__tip {
  opacity: 1;
}

.money-plot__tip strong {
  display: block;
  font-weight: 600;
}

.money-note {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Quick conversions: two tables, one each way. */
.money-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.money-table {
  padding: clamp(18px, 2vw, 26px) clamp(20px, 2.2vw, 30px);
}

.money-table h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.money-table h3 .money-flag {
  --flag: 22px;
}

.money-table table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.money-table th,
.money-table td {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.money-table th {
  color: var(--ink);
  font-weight: 500;
  text-align: left;
}

.money-table td {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.money-table thead th {
  padding-top: 4px;
  border-top: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.money-table thead th + th {
  text-align: right;
}

/* Steps: three short lines, as in the app. */
.money-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  list-style: none;
  counter-reset: step;
}

.money-steps li {
  padding: clamp(22px, 2.4vw, 30px);
  counter-increment: step;
}

.money-steps li::before {
  content: counter(step);
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(148deg, #7581ff 0%, #6470f6 56%, #735eff 100%);
  box-shadow: 0 8px 14px rgba(42, 48, 95, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.money-steps h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.money-steps p {
  margin: 8px 0 0;
  color: var(--money-soft);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.money-aside {
  margin: clamp(22px, 2.4vw, 30px) 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}

/* A section that ends with the way in: the button stands alone, centred under its cards. */
.money-page main > section > .money-cta {
  display: flex;
  width: fit-content;
  margin: clamp(32px, 3.6vw, 48px) auto 0;
}

/* Ways to send: one card each, the facts that matter. */
.money-routes {
  display: grid;
  grid-template-columns: repeat(var(--routes, 2), minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.money-routes--one {
  grid-template-columns: minmax(0, 600px);
}

.money-route {
  padding: clamp(24px, 2.6vw, 34px);
}

.money-route__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(148deg, #7581ff 0%, #6470f6 56%, #735eff 100%);
  box-shadow: 0 10px 18px rgba(42, 48, 95, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.96);
  font-size: 26px;
}

.money-route__kind {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.money-route h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 600;
  line-height: max(1.15, var(--title-leading, 0));
  letter-spacing: -0.04em;
}

.money-route > p {
  margin: 8px 0 0;
  color: var(--money-soft);
  font-size: 15px;
  line-height: 1.5;
}

.money-facts {
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.money-facts li {
  padding: 12px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.money-facts span {
  color: var(--ink-soft);
}

.money-facts strong {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* What you need, and today's rate beside it. */
.money-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}

.money-needs {
  padding: clamp(24px, 2.6vw, 34px);
}

.money-needs h3,
.money-ratecard h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.money-needs ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.money-needs li {
  position: relative;
  padding: 13px 0 13px 34px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.money-needs li:first-child {
  border-top: 0;
}

.money-needs li::before {
  content: "\f636";
  position: absolute;
  top: 13px;
  left: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(109, 123, 255, 0.12);
  color: var(--mon-indigo-deep);
  font-family: "MonMaterialIcons";
  font-size: 15px;
  line-height: 1;
}

.money-needs li span {
  display: block;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.money-ratecard {
  padding: clamp(24px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #ffffff 0%, #f6f7ff 100%);
}

.money-ratecard__pair {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.money-ratecard__pair .money-flag {
  --flag: 30px;
}

.money-ratecard__pair .money-flag + .money-flag {
  margin-left: -14px;
  box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(42, 48, 95, 0.12);
}

.money-ratecard strong {
  margin-top: 16px;
  color: var(--ink);
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.money-ratecard p {
  margin: 10px 0 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.money-ratecard .money-more {
  margin-top: auto;
}

/* Questions. */
.money-faq {
  max-width: 860px;
  margin-inline: auto;
}

.money-faq details {
  border-top: 1px solid var(--line);
}

.money-faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.money-faq summary {
  padding: 22px 44px 22px 0;
  position: relative;
  display: block;
  color: var(--ink);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  cursor: pointer;
  list-style: none;
}

.money-faq summary::-webkit-details-marker {
  display: none;
}

.money-faq summary::after {
  content: "\f537";
  position: absolute;
  top: 50%;
  right: 4px;
  color: var(--mon-indigo-deep);
  font-family: "MonMaterialIcons";
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 320ms var(--ease-premium);
}

.money-faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.money-faq summary:focus-visible {
  outline: 2px solid rgba(109, 123, 255, 0.45);
  outline-offset: 4px;
  border-radius: 8px;
}

.money-faq details p {
  max-width: 64ch;
  margin: -6px 0 22px;
  color: var(--money-soft);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.015em;
}

.money-faq details a {
  color: var(--mon-indigo-deep);
  font-weight: 600;
}

/* Other countries and other pairs: flags and names, two taps from anywhere. */
.money-chips {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  list-style: none;
}

.money-chip {
  min-height: 60px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 28, 46, 0.04);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: transform 420ms var(--ease-premium), box-shadow 420ms var(--ease-premium);
}

.money-chip:hover,
.money-chip:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(22, 28, 46, 0.08);
}

.money-chip[aria-current="page"] {
  box-shadow: inset 0 0 0 2px rgba(109, 123, 255, 0.4);
}

.money-chip .money-flag {
  --flag: 30px;
}

.money-chip__flags {
  display: flex;
  flex: none;
}

.money-chip__flags .money-flag + .money-flag {
  margin-left: -10px;
  box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(42, 48, 95, 0.12);
}

.money-chip small {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.money-chips--wide {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

/* Every rate against the euro, on the converter's own page. */
.money-board {
  padding: clamp(10px, 1.4vw, 18px) clamp(20px, 2.2vw, 30px);
}

.money-board table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.money-board th,
.money-board td {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: -0.015em;
  text-align: right;
}

.money-board tr:first-child th,
.money-board tr:first-child td {
  border-top: 0;
}

.money-board th {
  text-align: left;
  font-weight: 500;
}

.money-board th a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.money-board th a:hover {
  color: var(--mon-indigo-deep);
  text-decoration: none;
}

.money-board th .money-flag {
  --flag: 26px;
}

.money-board th small {
  color: var(--ink-soft);
  font-size: 13px;
}

.money-board td {
  color: var(--ink);
  font-weight: 600;
}

.money-board td + td {
  width: 22%;
  color: var(--ink-soft);
  font-weight: 500;
}

@media (max-width: 1100px) {
  .money-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .money-eyebrow,
  .money-actions {
    justify-content: center;
  }

  .money-lede {
    margin-inline: auto;
  }

  .money-converter,
  .money-visual {
    justify-self: center;
  }

  /* Stacked, the cards stand apart, each with room to breathe. */
  .money-steps,
  .money-split {
    grid-template-columns: 1fr;
    gap: clamp(28px, 8vw, 36px);
  }

  .money-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .money-history-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .money-history-heading h2,
  .money-heading .money-history-intro,
  .money-history-reverse {
    grid-column: 1;
    grid-row: auto;
  }

  .money-history-reverse {
    justify-self: center;
    margin-top: 20px;
  }

  .money-tables,
  .money-routes {
    grid-template-columns: 1fr;
    gap: clamp(28px, 8vw, 36px);
  }
}

@media (max-width: 640px) {
  .money-page .money-title {
    font-size: clamp(38px, 10.6vw, 46px);
  }

  .money-chips {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* A long list of countries, as the App Store sets a long list on a phone: three rows to a page,
     and pages to swipe through sideways, the next one showing at the right edge. The row reaches
     both edges of the screen, and its padding keeps the cards' shadows whole. It is the browser's
     own scrolling, nothing scripted. */
  :is(.money-chips--wide, section[aria-labelledby="pairs"] > .money-chips) {
    --chips-edge: var(--site-content-edge, 24px);
    margin: 0 calc(-1 * var(--chips-edge)) -22px;
    padding: 6px var(--chips-edge) 28px;
    grid-template-columns: none;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 300px);
    gap: 10px 12px;
    overflow: auto hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--chips-edge);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  :is(.money-chips--wide, section[aria-labelledby="pairs"] > .money-chips)::-webkit-scrollbar {
    display: none;
  }

  :is(.money-chips--wide, section[aria-labelledby="pairs"] > .money-chips) > li {
    scroll-snap-align: start;
  }

  .money-board td + td {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .money-cta,
  .money-swap,
  .money-chip,
  .money-more::after,
  .money-faq summary::after {
    transition: none;
  }
}

.money-plot [data-guide] {
  opacity: 0;
  transition: opacity 160ms ease;
}

.money-plot.is-reading [data-guide] {
  opacity: 1;
}

.money-board__name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.money-board__name .money-flag {
  --flag: 26px;
}

/* The site's own table style (for long legal tables) stays out of these small ones. */
.money-table table,
.money-board table {
  min-width: 0;
  table-layout: fixed;
}

.money-table th,
.money-table td,
.money-board th,
.money-board td {
  background: none;
  border-bottom: 0;
  vertical-align: middle;
  text-transform: none;
}

/* Currency picker (money.js): the app's list. Round flags, the currency's name over its code,
   the chosen one lit as in the app. A popover under the currency on a wide screen; on a phone, a
   sheet from the bottom over the app's own dimming. */
.money-currency__button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

html:not([data-money-focus="pointer"]) .money-currency__button:focus-visible {
  outline: 2px solid rgba(109, 123, 255, 0.55);
  outline-offset: 4px;
}

.money-picker {
  box-sizing: border-box;
  position: fixed;
  z-index: 70;
  width: min(296px, calc(100vw - 24px));
  max-height: min(430px, calc(100vh - 24px));
  max-height: min(430px, calc(100dvh - 24px));
  padding: 24px 12px 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(208, 211, 231, 0.9), rgba(186, 191, 217, 0.9));
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 10px 30px 5px rgba(83, 109, 254, 0.2), 0 2px 8px rgba(22, 28, 46, 0.06);
  color: #292c39;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.97);
  transition: opacity 180ms ease, transform 300ms var(--ease-premium);
  outline: none;
}

.money-picker.is-open {
  opacity: 1;
  transform: none;
}

/* The app's grabber. */
.money-picker::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: rgba(41, 44, 57, 0.18);
}

.money-picker__list {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 296px;
  margin: 0 -2px;
  padding: 2px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.money-picker__list::-webkit-scrollbar {
  display: none;
}

.money-picker__option {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.money-picker__option.is-active {
  background: rgba(255, 255, 255, 0.3);
}

.money-picker__option[aria-selected="true"] {
  border-color: rgba(255, 255, 255, 0.44);
  background: linear-gradient(135deg, #eef2ff, #dde4ff);
}

.money-picker__option img {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 3px 8px rgba(42, 48, 95, 0.14);
}

.money-picker__option span {
  min-width: 0;
  display: grid;
}

.money-picker__option strong {
  overflow: hidden;
  color: #292c39;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.007em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.money-picker__option small {
  color: rgba(41, 44, 57, 0.62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.money-picker-scrim {
  display: none;
}

@media (max-width: 640px) {
  .money-picker {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(520px, 72vh);
    max-height: min(520px, 72dvh);
    transform: translate3d(0, 28px, 0);
    transform-origin: bottom center;
    transition: opacity 200ms ease, transform 420ms var(--ease-premium);
  }

  .money-picker__list {
    max-height: none;
    flex: 1;
  }

  .money-picker-scrim {
    position: fixed;
    inset: 0;
    z-index: 69;
    display: block;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 260ms ease;
    touch-action: none;
  }

  .money-picker-scrim.is-open {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .money-picker,
  .money-picker-scrim {
    transition: none;
  }
}
