.theme-code {
  --mercury-blue: #5266eb;
  --mercury-night: #171721;
  --mercury-pearl: #ededf3;
  --mercury-paper: #f7f6fd;
  --mercury-gutter: clamp(1.25rem, 4vw, 2rem);
  --mercury-width: 64rem;
  --surface: var(--mercury-night);
  --panel: #1e1e2a;
  --ink: var(--mercury-pearl);
  --muted: #c3c3cc;
  --line: #4e4f5f;
  --accent: var(--mercury-blue);
  --on-accent: #fff;
  --radius: .75rem;
}

.theme-code .site-header {
  position: relative;
  background: #191922;
  --line: #343441;
}

.theme-code .site-header .wrap,
.theme-code .site-footer .wrap {
  max-width: 85rem;
  padding-inline: var(--mercury-gutter);
}

.theme-code .wordmark { font-size: 1.12rem; letter-spacing: -.045em; }
.theme-code .wordmark span { color: inherit; }
.theme-code .global-nav { min-height: 4.25rem; --bs-navbar-padding-y: .45rem; }
.theme-code .nav-link { font-weight: 480; }
.theme-code .section-nav .nav { gap: 0 clamp(.8rem, 1.8vw, 1.6rem); }
.theme-code .section-nav .nav-link { text-underline-offset: .4em; }
.theme-code .site-header .nav-contact { border-radius: 2rem; }

.theme-code .content {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
  padding: 0;
  color-scheme: light;
  color: #272735;
  background: var(--mercury-paper);
  --surface: #fff;
  --panel: #edecf9;
  --ink: #272735;
  --muted: #535461;
  --line: #d7d6e3;
  --code-input: #e5e3ef;
  --code-primary: var(--mercury-blue);
  --code-ring: #4053c8;
  --code-secondary: #e8e9fa;
}

.theme-code .content:not(.mercury-home) { padding-bottom: clamp(4rem, 8vw, 7rem); }
.theme-code .content > :not(.mercury-band, .mercury-hero, script, link) {
  width: min(var(--mercury-width), calc(100% - var(--mercury-gutter) * 2));
  margin-inline: auto;
}
.theme-code .content > .interactive { max-width: 54rem; }
.theme-code .content > .row { row-gap: 1rem; }
.theme-code .content .form-control::placeholder { color: var(--muted); }
.theme-code .content :is(h2, h3, h4) {
  font-weight: 480;
  letter-spacing: .012em;
  line-height: 1.17;
  text-wrap: balance;
}
.theme-code .content h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.theme-code .content h3 { font-size: clamp(1.5rem, 2.4vw, 1.75rem); }
.theme-code .content .card .eyebrow { color: #4152c5; }
.theme-code .content .joint .eyebrow { color: #4152c5; }
.theme-code .content .service-list > :is(article, section) { padding-block: clamp(1.65rem, 4vw, 3rem); }
.theme-code .content .service-list p { max-width: 68ch; }
.theme-code .content .service-list :is(h2, h3) { margin-bottom: .8rem; }
.theme-code .content .joint { background: #edecf9; }
.theme-code .content .oni-code-table-scroll { background: #fff; border-radius: .75rem; }
.theme-code .content .oni-code-comparison { background: #fff; }
.theme-code .content .oni-code-comparison caption { padding-inline: .6rem; }

.theme-code :is(.button, #invoice-search [data-slot="button"]) {
  min-height: 2.55rem;
  padding-inline: 1.25rem;
  border-radius: 2rem;
  font-weight: 550;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.theme-code .button--primary {
  --bs-btn-hover-bg: #4354c8;
  --bs-btn-hover-border-color: #4354c8;
  --bs-btn-active-bg: #3442a6;
  --bs-btn-active-border-color: #3442a6;
}
.theme-code .button--outline {
  --bs-btn-bg: #5266eb14;
  --bs-btn-border-color: #5266eb26;
  --bs-btn-hover-bg: #5266eb26;
  --bs-btn-hover-border-color: #5266eb4d;
}
.theme-code .button:hover { text-decoration: none; }
.theme-code #invoice-search [data-slot="button"] {
  border: 1px solid var(--mercury-blue);
  background: var(--mercury-blue);
  color: #fff;
}
.theme-code #invoice-search [data-slot="button"]:hover { background: #4354c8; }
.theme-code #invoice-search [data-invoice-query] {
  background: #e8e9fa;
  color: var(--ink);
  border-color: #cbcee9;
}
.theme-code #invoice-search [data-invoice-query]:hover { background: #dcdef8; }
.theme-code #invoice-search [data-slot="button"]:focus-visible {
  outline: 2px solid var(--code-ring);
  outline-offset: 3px;
  box-shadow: none;
}
.theme-code #invoice-results :is(.summary, .invoice-list) { font-variant-numeric: tabular-nums; }

.mercury-wrap {
  width: min(var(--mercury-width), calc(100% - var(--mercury-gutter) * 2));
  margin-inline: auto;
}
.mercury-hero,
.mercury-proof,
.mercury-closing {
  --ink: var(--mercury-pearl);
  --muted: #c3c3cc;
  --line: #4e4f5f;
  color: var(--ink);
  color-scheme: dark;
}
.mercury-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: clamp(2.75rem, 7vw, 6.25rem);
  background: #262b3c;
}
.mercury-hero::after,
.mercury-landscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mercury-landscape { z-index: -2; object-fit: cover; object-position: center 65%; }
.mercury-hero::after {
  content: '';
  z-index: -1;
  background: #171721a3;
  background: linear-gradient(90deg, #171721dc, #1717217d 65%, #17172150);
}
.mercury-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 19rem);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  min-height: 23rem;
  padding-block: clamp(2.75rem, 7vw, 6rem);
}
.mercury-hero h1 {
  max-width: 24ch;
  font-size: clamp(2.15rem, 4.4vw, 3.08rem);
  font-weight: 480;
  line-height: 1.1;
  letter-spacing: -.032em;
  text-wrap: balance;
}
.mercury-kicker { margin-bottom: .8rem; color: #d4d9ed; font-size: .85rem; font-weight: 650; }
.mercury-lead { max-width: 53ch; margin-top: .85rem; color: #e0e0eb; font-size: clamp(1rem, 1.45vw, 1.25rem); line-height: 1.45; }
.mercury-hero-object {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid #ededf35e;
  border-radius: .75rem;
  box-shadow: 0 18px 56px #0c102a80;
}
.mercury-hero--landing { margin-bottom: 0; }
.mercury-hero--landing .mercury-hero-inner {
  display: block;
  min-height: clamp(40rem, calc(100svh - 4.25rem), 52rem);
  padding-top: clamp(3.25rem, 8.5vh, 6rem);
  text-align: center;
}
.mercury-hero--landing .mercury-landscape { object-position: center 67%; }
.mercury-hero--landing::after { background: linear-gradient(#10132152, #15162626 44%, #15162600 72%, #17172152); }
.mercury-hero--landing :is(h1, .mercury-lead) { margin-inline: auto; }
.mercury-hero--landing h1 { max-width: 30ch; }
.mercury-hero .actions { justify-content: center; }
.mercury-hero .button--outline {
  --bs-btn-bg: #d5ddfa26;
  --bs-btn-border-color: #e0e4ff52;
  --bs-btn-hover-bg: #d5ddfa45;
  --bs-btn-hover-border-color: #e0e4ff7a;
  backdrop-filter: blur(10px);
}

.mercury-band { padding-block: clamp(3.5rem, 8.5vw, 8rem); }
.theme-code .content .mercury-promise {
  max-width: 24ch;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.65rem);
}
.mercury-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(1rem, 3vw, 2rem);
}
.mercury-feature-grid > article {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background: #fff;
  border: 1px solid #c9c9da;
  border-radius: 1rem;
}
.theme-code .mercury-feature-grid article h3 {
  margin: .35rem 0 0;
  font: 500 clamp(1.5rem, 2.5vw, 2rem)/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
.mercury-feature-grid article > p {
  max-width: 45ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.mercury-feature-grid .mercury-text-link {
  justify-self: start;
  align-self: end;
  margin-top: .25rem;
}
.mercury-feature-image,
.mercury-demo-stage {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: .55rem;
}
.mercury-demo-stage {
  display: grid;
  align-items: center;
  padding: clamp(1rem, 3.5vw, 3rem);
  background: radial-gradient(ellipse at 55% 38%, #f0efff, #c9cce6 72%);
}
.mercury-demo-stage .demo-preview {
  min-width: 0;
  padding: clamp(.85rem, 2vw, 1.4rem);
  border-color: #fff;
  background: #f9f8ffed;
  box-shadow: 0 15px 35px #46457224;
  font-variant-numeric: tabular-nums;
}
.mercury-demo-stage .demo-preview .eyebrow { color: #535461; font-family: inherit; margin-bottom: .45rem; }
.mercury-demo-heading {
  margin: 0 0 .65rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 480;
  line-height: 1.17;
}
.mercury-demo-stage .demo-preview dl { font-size: clamp(.73rem, 1.2vw, .9rem); }
.mercury-text-link { display: inline-block; margin-top: 1rem; color: #3546bb; text-decoration-thickness: 1px; }
.mercury-text-link span { margin-inline-start: .3rem; }

.mercury-proof { background: var(--mercury-night); }
.mercury-proof h2 { margin-bottom: 2rem; }
.mercury-projects { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.mercury-projects a {
  display: grid;
  grid-template-columns: minmax(6rem, 11rem) 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: 1.35rem .2rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.mercury-projects a:hover strong { text-decoration: underline; text-underline-offset: .18em; }
.mercury-projects a > span { color: var(--muted); font-size: .9rem; }
.mercury-projects a strong { font-size: clamp(1.25rem, 3vw, 2.15rem); font-weight: 480; line-height: 1.15; }
.mercury-projects a .mercury-arrow { font-size: 1.15rem; }
.mercury-closing {
  border-top: 1px solid #353543;
  background: #1e1e2a;
  text-align: center;
}
.mercury-closing p { color: var(--muted); margin: .8rem auto 1.45rem; }

@media (min-width: 80rem) {
  .theme-code .section-nav {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 0;
  }
  .theme-code .section-nav .nav { width: max-content; min-height: 4.25rem; padding-inline: 0; align-items: center; }
}

@media (max-width: 47.99rem) {
  .mercury-hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 1.5rem; }
  .mercury-hero-object { width: min(100%, 16rem); }
  .mercury-hero--landing .mercury-hero-inner { min-height: clamp(33rem, 74svh, 40rem); }
  .mercury-hero--landing .mercury-landscape { object-position: 50% 62%; }
  .mercury-feature-grid { grid-template-columns: 1fr; row-gap: 1rem; }
}

@media (max-width: 28rem) {
  .mercury-projects a { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .8rem; }
  .mercury-projects a > span:first-child { grid-column: 1; }
  .mercury-projects a .mercury-arrow { grid-area: 1 / 2 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-code :is(.button, #invoice-search [data-slot="button"]) { transition: none; }
}
