@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: oklch(0.975 0.009 90);
  --paper-deep: oklch(0.944 0.014 90);
  --ink: oklch(0.22 0.02 165);
  --ink-soft: oklch(0.43 0.018 165);
  --green: oklch(0.34 0.075 165);
  --green-deep: oklch(0.26 0.065 165);
  --sage: oklch(0.9 0.025 145);
  --clay: oklch(0.58 0.12 38);
  --rule: oklch(0.79 0.015 90);
  --rule-soft: oklch(0.89 0.012 90);
  --focus: oklch(0.64 0.14 75);
  --error: oklch(0.5 0.17 28);
  --max-width: 92rem;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --section-space: clamp(3.5rem, 8vw, 8rem);
  --font-display: "Newsreader", Georgia, serif;
  --font-sans: "IBM Plex Sans", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

img,
svg {
  display: block;
  max-width: 100%;
}

picture {
  display: contents;
}

.trade-card__visual > picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.trade-card__visual > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--green);
  color: var(--paper);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-180%);
  background: var(--green-deep);
  color: var(--paper);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - (2 * var(--gutter))), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  background: color-mix(in oklch, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--rule);
}

.masthead-row {
  min-height: 5.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.masthead {
  grid-column: 2;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-decoration: none;
  color: var(--green-deep);
}

.header-note,
.header-tools {
  font-size: 0.78rem;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.1rem;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.4rem;
}

.primary-nav {
  border-top: 1px solid var(--rule-soft);
}

.primary-nav ul {
  min-height: 3.15rem;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3.4rem);
  list-style: none;
}

.primary-nav a {
  display: inline-block;
  padding-block: 0.95rem 0.75rem;
  border-bottom: 2px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a[aria-current="page"] {
  border-color: var(--green);
}

main {
  overflow: clip;
}

.section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--rule);
}

.section:first-child,
.no-top-rule {
  border-top: 0;
}

.eyebrow,
.kicker,
.meta,
.source-line,
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta,
.source-line {
  color: var(--ink-soft);
}

.display-title,
.page-title,
.section-title,
.article-title,
.metric,
.rate-figure {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--green-deep);
  text-wrap: balance;
}

.display-title {
  font-size: clamp(3.4rem, 9vw, 9.2rem);
  letter-spacing: -0.055em;
  line-height: 0.84;
}

.page-title {
  font-size: clamp(3.2rem, 7.5vw, 7.6rem);
  letter-spacing: -0.048em;
  line-height: 0.88;
}

.article-title {
  font-size: clamp(3rem, 6.5vw, 6.3rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.section-title {
  font-size: clamp(2.25rem, 4.3vw, 4.8rem);
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.standfirst {
  max-width: 68ch;
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.3;
  text-wrap: pretty;
}

.lede {
  max-width: 70ch;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.rule-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--green-deep);
  border-radius: 2px;
  background: var(--green-deep);
  color: var(--paper);
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 160ms ease, color 160ms ease;
}

.button::after {
  content: "→";
  font-size: 1rem;
}

.button:hover {
  background: transparent;
  color: var(--green-deep);
}

.button--outline {
  background: transparent;
  color: var(--green-deep);
}

.button--outline:hover {
  background: var(--green-deep);
  color: var(--paper);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.editorial-cell {
  min-width: 0;
  padding: clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--rule);
}

.editorial-cell:last-child {
  border-right: 0;
}

.metric {
  font-size: clamp(4rem, 8vw, 8.5rem);
  letter-spacing: -0.065em;
  line-height: 0.86;
  font-variant-numeric: tabular-nums;
}

.rate-figure {
  font-size: clamp(2.4rem, 4.5vw, 4.8rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.data-note,
.draft-notice {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--clay);
  background: color-mix(in oklch, var(--clay) 7%, var(--paper));
  font-size: 0.85rem;
}

.draft-notice strong {
  color: var(--error);
}

.trade-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.rate-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.rate-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rate-table th,
.rate-table td {
  padding: 1rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}

.rate-table th {
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rate-table tbody tr:hover {
  background: var(--sage);
}

.rate-table .number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--green-deep);
}

.region-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(8rem, 1fr));
  overflow-x: auto;
  border: 1px solid var(--rule);
}

.region-tabs button {
  min-height: 4rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 1rem;
}

.region-tabs button:last-child {
  border-right: 0;
}

.region-tabs button[aria-selected="true"] {
  background: var(--green-deep);
  color: var(--paper);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 23rem);
  gap: clamp(2rem, 7vw, 7rem);
}

.article-body {
  max-width: 76ch;
  font-size: 1.08rem;
}

.article-body h2,
.article-body h3 {
  color: var(--green-deep);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
}

.article-body h2 {
  margin: 4rem 0 1.2rem;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.article-body h3 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.8rem;
}

.article-body p,
.article-body ul,
.article-body ol {
  max-width: 70ch;
}

.article-aside {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  padding-top: 1rem;
  border-top: 3px solid var(--green-deep);
}

.takeaways {
  margin-block: 2rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border-top: 1px solid var(--green-deep);
  border-bottom: 1px solid var(--green-deep);
  background: var(--sage);
}

.takeaways ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.worked-example {
  margin-block: 2.5rem;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  background: var(--green-deep);
  color: var(--paper);
}

.worked-example h3,
.worked-example .rate-figure {
  color: var(--paper);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 0.45fr) 1fr;
  gap: 0 1.25rem;
  align-items: start;
}

.field {
  display: contents;
}

.field label,
.field .field-help,
.field input,
.field select,
.field textarea {
  margin-bottom: 1.2rem;
}

.field label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.15;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-deep);
}

.field-help {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.form-actions {
  grid-column: 2;
}

.footer {
  margin-top: var(--section-space);
  border-top: 1px solid var(--rule);
  background: var(--green-deep);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-block: 3.5rem;
}

.footer .masthead {
  color: var(--paper);
}

.footer h2,
.footer h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 400;
}

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

.footer li + li {
  margin-top: 0.5rem;
}

.footer a:hover {
  color: var(--paper-deep);
}

.footer-meta {
  padding-block: 1rem 1.5rem;
  border-top: 1px solid color-mix(in oklch, var(--paper) 25%, transparent);
  font-size: 0.75rem;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

@media (max-width: 64rem) {
  .masthead-row {
    grid-template-columns: auto 1fr auto;
  }

  .masthead {
    grid-column: 1;
  }

  .header-note {
    display: none;
  }

  .header-tools {
    grid-column: 3;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48rem) {
  :root {
    --section-space: 4rem;
  }

  .masthead-row {
    min-height: 4.25rem;
  }

  .masthead {
    font-size: 2rem;
  }

  .header-tools > a {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .primary-nav {
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    min-height: 0;
    padding-block: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .primary-nav a {
    width: 100%;
    padding-block: 0.7rem;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .editorial-cell {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .editorial-cell:last-child {
    border-bottom: 0;
  }

  .form-grid {
    display: block;
  }

  .field {
    display: block;
  }

  .field label {
    display: block;
    margin-bottom: 0.35rem;
  }

  .form-actions {
    width: 100%;
  }

  .form-actions .button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
