:root {
  --paper: #f6f7f9;
  --paper-deep: #eef1f6;
  --sheet: #ffffff;
  --ink: #1d2766;
  --ink-soft: #4a5385;
  --carbon: #2b3a9e;
  --rule: #ccd5eb;
  --rule-faint: #e7ecf6;
  --canary: #f2e6a2;
  --serial: #c33a2c;
  --code-bg: #121736;
  --code-fg: #e3e7f7;
  --code-dim: #8e98c7;
  --code-key: #a9c1ff;
  --code-num: #ffb4a8;

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow-sheet: 0 22px 44px -28px rgba(29, 39, 102, 0.45);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  left: 12px;
}

/* ---------- Type ---------- */

h1,
h2 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-stretch: 82%;
  font-weight: 760;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

h2 {
  font-stretch: 82%;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

h3 {
  font: 600 1.05rem/1.35 var(--font-body);
  margin: 0 0 6px;
}

p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.section-intro {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1.06rem;
  margin-bottom: 32px;
}

code,
pre {
  font-family: var(--font-mono);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font: 600 0.98rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.08s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #121a4f;
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

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

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
  transition: text-decoration-color 0.18s ease;
}

.text-link:hover {
  text-decoration-color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 247, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.wordmark span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .site-header .btn {
    margin-left: auto;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 112px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* a scrap of carbon copy, the page's one motif */
.status-dot {
  flex: none;
  width: 12px;
  height: 9px;
  background: var(--canary);
  border: 1px solid rgba(29, 39, 102, 0.35);
  rotate: -4deg;
}

.lede {
  font-size: 1.16rem;
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 32em;
  margin-bottom: 30px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.hero-note {
  margin: 26px 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* The duplicate: request on top, carbon copy underneath */

.duplicate {
  margin: 0;
}

.sheet-top {
  position: relative;
  z-index: 2;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.sheet-head strong {
  color: var(--ink);
  font-weight: 600;
}

.sheet-top pre {
  margin: 0;
  padding: 14px 18px 18px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink);
  background-image: linear-gradient(to bottom, transparent calc(1.7em - 1px), var(--rule-faint) calc(1.7em - 1px));
  background-size: 100% 1.7em;
  background-position: 0 14px;
}

.sheet-top .p {
  color: var(--ink-soft);
}

.sheet-top .k {
  font-weight: 500;
}

.sheet-copy {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  margin: -6px 0 0 clamp(14px, 5%, 44px);
  padding: 16px 18px 14px;
  background: var(--canary);
  border-radius: 3px;
  rotate: -0.7deg;
  box-shadow: 0 14px 30px -24px rgba(29, 39, 102, 0.5);
}

/* perforated top edge */
.sheet-copy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: radial-gradient(circle at 50% 0, var(--paper) 2.4px, transparent 2.9px) 0 0 / 10px 6px repeat-x;
}

.copy-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1.5px solid rgba(29, 39, 102, 0.55);
}

.copy-title {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.serial {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--serial);
}

.copy-scroll {
  overflow-x: auto;
}

.daybook {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.daybook th {
  text-align: left;
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(29, 39, 102, 0.72);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid rgba(29, 39, 102, 0.22);
  white-space: nowrap;
}

.daybook td {
  padding: 9px 10px 4px 0;
  white-space: nowrap;
  color: var(--carbon);
  text-shadow: 0 0 0.6px rgba(43, 58, 158, 0.6);
}

.daybook th:last-child,
.daybook td:last-child {
  padding-right: 0;
}

.daybook .num {
  text-align: right;
}

/* Drop columns as the sheet narrows, the way a printed report would. */
@container (max-width: 470px) {
  .daybook .optional {
    display: none;
  }
}

@container (max-width: 330px) {
  .daybook .ref {
    display: none;
  }

  .daybook th,
  .daybook td {
    padding-right: 8px;
  }
}

.duplicate figcaption {
  margin: 14px 0 0 clamp(14px, 5%, 44px);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .sheet-top {
    animation: rise 0.6s ease-out both;
  }

  .sheet-copy {
    animation: rise 0.6s 0.15s ease-out both;
  }

  .daybook td {
    animation: impress 0.55s 1s ease-out both;
  }

  .copy-head .serial {
    animation: stamp 0.35s 1.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes impress {
  from {
    opacity: 0;
    filter: blur(3px);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    scale: 1.7;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 9vw, 108px) 0 clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--rule);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.split-even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

@media (max-width: 900px) {
  .split,
  .split-even {
    grid-template-columns: minmax(0, 1fr);
  }
}

.split .section-intro {
  margin-bottom: 0;
}

/* Today's options */

.options {
  margin: 0;
  border-top: 1.5px solid var(--ink);
}

.option {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 6px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.option dt {
  font-weight: 600;
}

.option dd {
  margin: 0;
  color: var(--ink-soft);
}

.option-ours {
  border-bottom: 0;
  background: linear-gradient(to right, var(--canary) 0 4px, transparent 4px);
  padding-left: 16px;
}

.option-ours dd {
  color: var(--ink);
}

@media (max-width: 560px) {
  .option {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* How it works */

.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--ink-soft);
}

.steps p {
  color: var(--ink-soft);
  margin: 0;
}

.flow-figure {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.flow {
  display: grid;
  justify-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-node {
  padding: 11px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.flow-node small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.flow-node-sage {
  background: transparent;
  border-style: dashed;
}

/* a vertical line between nodes, with an arrowhead showing who opens the connection */
.flow-link {
  position: relative;
  padding: 12px 0 12px 30px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.flow-link::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  border-left: 1.5px solid var(--ink);
}

.flow-link.to-next::before,
.flow-link.to-prev::before {
  content: "";
  position: absolute;
  left: 12.5px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
}

.flow-link.to-next::before {
  bottom: 1px;
  rotate: 135deg;
}

.flow-link.to-prev::before {
  top: 1px;
  rotate: -45deg;
}

.flow-figure figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-faint);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* API */

.resources {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.resources caption {
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  padding-bottom: 10px;
}

.resources th,
.resources td {
  text-align: left;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.resources thead th {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--ink);
}

.resources tbody th {
  font-weight: 500;
}

.resources tbody th code {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.resources td {
  white-space: nowrap;
  color: var(--ink-soft);
  padding-right: 0;
}

.code-panel {
  position: sticky;
  top: 96px;
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .code-panel {
    position: static;
  }
}

.code-label {
  margin: 0;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-panel pre + .code-label {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.code-panel pre {
  margin: 0;
  padding: 16px 18px 20px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
}

.code-panel .c {
  color: var(--code-dim);
}

.code-panel .k {
  color: var(--code-key);
}

.code-panel .s {
  color: var(--canary);
}

.code-panel .n {
  color: var(--code-num);
}

/* Who's building this */

.section-note {
  background: var(--paper-deep);
}

.note {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  max-width: 900px;
}

.note-photo {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

.note-body p {
  max-width: 38em;
  color: var(--ink-soft);
}

.note-body .signoff {
  margin: 22px 0 0;
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 600px) {
  .note {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-photo {
    width: 112px;
    height: 112px;
  }
}

/* Pricing */

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 24px;
}

/* totals get a double underline, as in any set of books */
.price-amount {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 760;
  font-size: clamp(3.2rem, 6vw, 4.2rem);
  line-height: 1;
  padding-bottom: 6px;
  border-bottom: 4px double var(--ink);
  font-variant-numeric: tabular-nums;
}

.price-unit {
  color: var(--ink-soft);
}

.ticks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  max-width: 30em;
}

.ticks li {
  position: relative;
  padding: 9px 0 9px 28px;
  border-top: 1px solid var(--rule);
}

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

.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  rotate: -45deg;
}

.partner-offer {
  max-width: 30em;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.partner-offer strong {
  color: var(--ink);
}

/* Questions */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 64px);
  margin: 28px 0 0;
}

.faq > div {
  padding: 18px 0 20px;
  border-top: 1px solid var(--rule);
}

.faq dt {
  font-weight: 600;
  margin-bottom: 6px;
}

.faq dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 34em;
}

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

/* Access form */

.form-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(20px, 3vw, 32px);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  margin: 0 0 22px;
}

.field > label,
.field legend {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding: 0;
}

.field .hint {
  font-weight: 400;
  color: var(--ink-soft);
}

.field .hint::before {
  content: "· ";
}

fieldset.field {
  border: 0;
  padding: 0;
  min-width: 0;
}

.field input[type="email"],
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #aab6d8;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color 0.15s ease;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: #8794bf;
}

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

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

.radios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 4px 16px;
}

.radios label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.95rem;
  cursor: pointer;
}

.radios input,
.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
  accent-color: var(--ink);
}

.field > .check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-weight: 400;
  font-size: 0.95rem;
  cursor: pointer;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--serial);
  background: #fbeceb;
  color: #8e2219;
  font-size: 0.95rem;
}

.form-error:empty {
  display: none;
}

.form-small {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.form-done {
  padding: 8px 0;
}

/* focus moves here so screen readers announce it; no ring needed */
.form-done:focus {
  outline: none;
}

.form-done h3 {
  font-family: var(--font-display);
  font-stretch: 82%;
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: grid;
  gap: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer .legal {
  font-size: 0.8rem;
  max-width: 60em;
}

/* ---------- Simple pages ---------- */

.page {
  padding: clamp(48px, 8vw, 96px) 0;
}

.page .wrap {
  max-width: 760px;
}

.page h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
}

.page h2 {
  font-size: 1.45rem;
  margin-top: 36px;
}

.page p,
.page li {
  color: var(--ink-soft);
}

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

  .btn,
  .text-link {
    transition: none;
  }
}
