/* Mercatrix site. Self-contained: one font (Archivo, OFL, subset to Latin), no framework. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-1.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #eceee9;
  --surface: #f8f9f6;
  --ink: #1b2631;
  --steel: #4f5b66;
  --rule: #c3c9c4;
  --signal: #f2c230;
  --on-signal: #1b2631;
  --on-signal-soft: #45402f;
  --go: #1e6b4e;
  --stop: #a3321f;
  --band: #1b2631;
  --band-ink: #eceee9;
  --band-soft: #b8c2ca;
  --band-rule: #3a4752;
  --focus: #1b2631;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #1d242a;
    --surface: #252d34;
    --ink: #e8ebe6;
    --steel: #a9b3ba;
    --rule: #3b454d;
    --go: #6cc9a0;
    --stop: #f29a85;
    --band: #283139;
    --band-ink: #e8ebe6;
    --band-soft: #a9b3ba;
    --band-rule: #3f4a53;
    --focus: #f2c230;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  font-kerning: normal;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 750;
  line-height: 1.15;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  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;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--signal);
  color: var(--on-signal);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .wrap {
    width: min(100% - 4rem, 72rem);
  }
}

/* Header and footer */

.top {
  border-bottom: 1px solid var(--rule);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  font-size: 1.1875rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.01em;
}

.brand svg {
  width: 1.25rem;
  height: 1.5rem;
  flex: none;
}

.brand .hole {
  fill: var(--paper);
}

.top-link {
  font-weight: 650;
  font-size: 0.9375rem;
  padding: 0.5rem 0.875rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
}

.top-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.5rem;
  color: var(--steel);
  font-size: 0.9375rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
}

.foot .brand {
  color: var(--ink);
  font-size: 1rem;
  margin-right: auto;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-signal {
  background: var(--signal);
  border-color: var(--on-signal);
  color: var(--on-signal);
}

.btn-signal:hover {
  background: var(--on-signal);
  color: var(--signal);
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.7;
}

/* Hero */

.hero {
  padding-block: 2.25rem 3.5rem;
}

.hero .wrap {
  display: grid;
  gap: 3rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  color: var(--go);
  font-size: 0.9375rem;
  font-weight: 650;
}

.status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.625rem);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 36rem;
  margin-bottom: 1rem;
  font-size: 1.1875rem;
  line-height: 1.5;
}

.facts {
  max-width: 36rem;
  margin-bottom: 2rem;
  color: var(--steel);
  font-size: 0.9375rem;
}

.ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 24rem;
}

@media (min-width: 40rem) {
  .hero h1 {
    font-stretch: 125%;
  }
}

@media (min-width: 62rem) {
  .hero {
    padding-block: 3.5rem 5.5rem;
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 4rem;
  }
}

/* The hero tag: an example spending limit, printed like a parts tag. */

.tag-fig {
  margin: 0;
  justify-self: center;
  width: min(100%, 23rem);
}

.tag-hang {
  filter: drop-shadow(0 1px 0 rgb(27 38 49 / 0.3)) drop-shadow(0 16px 18px rgb(27 38 49 / 0.22));
  transform-origin: 50% 0.9rem;
  transform: rotate(-1.5deg);
}

@media (prefers-reduced-motion: no-preference) {
  .tag-hang {
    animation: settle 1.4s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  }
}

@keyframes settle {
  from {
    transform: rotate(-7deg);
  }
  to {
    transform: rotate(-1.5deg);
  }
}

.tag {
  position: relative;
  padding: 2.75rem 1.25rem 1.25rem;
  background: var(--signal);
  color: var(--on-signal);
  border-radius: 0 0 4px 4px;
  clip-path: polygon(2.25rem 0, calc(100% - 2.25rem) 0, 100% 2.25rem, 100% 100%, 0 100%, 0 2.25rem);
  font-variant-numeric: tabular-nums lining-nums;
}

.tag-hole {
  position: absolute;
  top: 0.9rem;
  left: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: -0.55rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px #d9a91c;
}

.tag-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--on-signal);
}

.tag-title {
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.1;
}

.tag-kind {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--on-signal-soft);
}

.tag-rows > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid rgb(27 38 49 / 0.22);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.tag-rows dt {
  color: var(--on-signal-soft);
  font-weight: 500;
}

.tag-rows dd {
  font-weight: 650;
}

.tag-stub {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 2px dashed rgb(27 38 49 / 0.55);
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.35;
}

.tag-code {
  display: block;
  width: 100%;
  height: 2.25rem;
  margin-top: 0.875rem;
  fill: var(--on-signal);
}

.tag-fig figcaption {
  margin-top: 1.25rem;
  color: var(--steel);
  font-size: 0.875rem;
  text-align: center;
}

/* Sections */

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

.section h2 {
  max-width: 22ch;
  margin-bottom: 1rem;
  font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.5rem);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.intro {
  max-width: 38rem;
  margin-bottom: 2.25rem;
  color: var(--steel);
}

@media (min-width: 62rem) {
  .section {
    padding-block: 5.5rem;
  }
}

/* How it works: two paths, each a real sequence of steps. */

.paths {
  display: grid;
  gap: 3rem;
}

@media (min-width: 62rem) {
  .paths {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.path h3 {
  padding-top: 0.875rem;
  margin-bottom: 1.5rem;
  border-top: 4px solid var(--ink);
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 125%;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.75rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-size: 2.25rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.steps h4 {
  margin-bottom: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.steps p {
  color: var(--steel);
  max-width: 34rem;
}

/* Trust: the one dark band. */

.band {
  background: var(--band);
  color: var(--band-ink);
  border-top: 0;
}

.band .wrap {
  display: grid;
  gap: 2rem;
}

.points > div {
  padding-block: 1.25rem;
  border-top: 1px solid var(--band-rule);
}

.points > div:last-child {
  border-bottom: 1px solid var(--band-rule);
}

.points dt {
  margin-bottom: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 112%;
}

.points dd {
  color: var(--band-soft);
  max-width: 36rem;
}

.band :focus-visible {
  outline-color: var(--signal);
}

@media (min-width: 62rem) {
  .band .wrap {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 4rem;
  }

  .points > div {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2rem;
  }

  .points dt {
    margin-bottom: 0;
  }
}

/* Who it is for */

.segments {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.segments li {
  padding-top: 1rem;
  border-top: 4px solid var(--signal);
}

.segments h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1875rem;
  font-weight: 750;
  font-stretch: 112%;
}

.segments p {
  color: var(--steel);
}

.segments .items {
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: 0.9375rem;
}

.supply {
  max-width: 40rem;
  margin-top: 2.5rem;
}

@media (min-width: 62rem) {
  .segments {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* Fees */

.fees {
  width: 100%;
  max-width: 48rem;
  border-collapse: collapse;
}

.fees tr {
  border-top: 1px solid var(--rule);
}

.fees tr:last-child {
  border-bottom: 1px solid var(--rule);
}

.fees th,
.fees td {
  display: block;
  padding: 0;
  text-align: left;
  vertical-align: baseline;
}

.fees th {
  padding-top: 1rem;
  color: var(--steel);
  font-size: 0.9375rem;
  font-weight: 650;
}

.fees td {
  padding: 0.125rem 0 1rem;
}

@media (min-width: 40rem) {
  .fees th,
  .fees td {
    display: table-cell;
    padding-block: 1.125rem;
  }

  .fees th {
    width: 40%;
    padding-right: 1.5rem;
    color: var(--ink);
    font-size: 1.0625rem;
    font-weight: 700;
  }
}

.fees .amount {
  display: block;
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.2;
}

.fees .terms {
  display: block;
  margin-top: 0.25rem;
  color: var(--steel);
  font-size: 0.9375rem;
}

/* Design partners */

.terms-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .terms-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.terms-grid h3 {
  padding-top: 0.875rem;
  margin-bottom: 1rem;
  border-top: 4px solid var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 118%;
}

.ticks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--signal);
  box-shadow: 0 0 0 1px var(--ink);
}

/* FAQ */

.faq {
  max-width: 48rem;
}

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

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

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.125rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-weight: 700;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  max-width: 40rem;
  padding-bottom: 1.25rem;
  color: var(--steel);
}

/* Sign-up form */

.signup .wrap {
  display: grid;
  gap: 2rem;
}

@media (min-width: 62rem) {
  .signup .wrap {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 4rem;
  }
}

.form {
  max-width: 40rem;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border-top: 6px solid var(--ink);
}

@media (min-width: 40rem) {
  .form {
    padding: 2rem;
  }
}

.field {
  margin-bottom: 1.5rem;
}

.field > label,
fieldset legend {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.optional {
  color: var(--steel);
  font-weight: 400;
}

.hint {
  margin-top: -0.2rem;
  margin-bottom: 0.5rem;
  color: var(--steel);
  font-size: 0.9375rem;
}

fieldset {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

input[type="text"],
input[type="email"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--steel);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
}

select {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 1.25rem) 50%,
    calc(100% - 0.85rem) 50%;
  background-size: 0.4rem 0.4rem;
  background-repeat: no-repeat;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--ink);
  outline-offset: 1px;
}

.form [aria-invalid="true"] {
  border-color: var(--stop);
}

.error {
  margin-top: 0.4rem;
  color: var(--stop);
  font-size: 0.9375rem;
  font-weight: 600;
}

.error:empty {
  display: none;
}

.count {
  margin-top: 0.35rem;
  color: var(--steel);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.choices {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 40rem) {
  .choices {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.25rem 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 2px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  cursor: pointer;
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}

.choice strong {
  font-weight: 700;
}

.choice span {
  grid-column: 2;
  color: var(--steel);
  font-size: 0.875rem;
  line-height: 1.35;
}

.choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice input:focus-visible {
  outline: none;
}

.field > .consent {
  display: grid;
  font-weight: 400;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.consent input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.1rem 0 0;
  accent-color: var(--ink);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 1.75rem;
}

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

@media (min-width: 40rem) {
  .form-actions .btn {
    width: auto;
    min-width: 12rem;
  }
}

.summary {
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  border-left: 4px solid var(--stop);
  background: var(--paper);
  font-weight: 600;
}

.summary:empty {
  display: none;
}

.done {
  max-width: 40rem;
  padding: 1.75rem 1.25rem;
  background: var(--surface);
  border-top: 6px solid var(--go);
}

.done h3 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 118%;
}

.done p + p {
  margin-top: 0.75rem;
}

.done h3:focus {
  outline: none;
}

.noscript {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--signal);
  background: var(--paper);
}

/* Plain pages (privacy, not found) */

.page {
  padding-block: 2.5rem 4rem;
}

.page .wrap > * {
  max-width: 42rem;
}

.page h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.page h2 {
  margin: 2.25rem 0 0.625rem;
  font-size: 1.3125rem;
  font-weight: 750;
  font-stretch: 112%;
}

.page ul {
  padding-left: 1.25rem;
}

.page p + p,
.page p + ul,
.page ul + p {
  margin-top: 0.75rem;
}

.page li + li {
  margin-top: 0.375rem;
}

.updated {
  color: var(--steel);
}
