:root {
  --paper: #e4dccb;
  --paper-deep: #d5cbb6;
  --card: #f7f3ea;
  --ink: #1b1714;
  --muted: #4a433b;
  --paid: #0e5b45;
  --paid-wash: #d7efe4;
  --unpaid: #8d3412;
  --unpaid-wash: #f6e1d4;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 23, 20, 0.04), transparent 180px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.5rem 0.8rem;
  z-index: 5;
}

.skip:focus { top: 1rem; }

.top, .foot, main {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--ink);
}

.mark {
  margin-right: auto;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.mark span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
}

.price-pill {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav a { text-decoration: none; }

.nav a:hover { text-decoration: underline; }

.nav-cta {
  border: 1px solid var(--ink);
  padding: 0.25rem 0.6rem;
  background: var(--ink);
  color: var(--card);
}

.nav-cta:hover { text-decoration: none; background: #322c27; }

main { padding: 2.2rem 0 3rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.98;
  margin: 0.2rem 0 1rem;
}

h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 0.8rem; }

h3 { font-size: 1.35rem; margin: 0 0 0.3rem; }

.lede { font-size: 1.15rem; max-width: 40rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.eyebrow a { color: var(--muted); }

.hero, .split, .agent-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem 2.5rem;
  align-items: start;
}

.hero { margin-bottom: 3rem; }

.hero-actions, .stack button, .notice + form {
  margin-top: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
}

.button, button, .text-link {
  font: inherit;
}

.button, button {
  display: inline-block;
  background: var(--ink);
  color: var(--card);
  border: 1px solid var(--ink);
  text-decoration: none;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.button:hover, button:hover { background: #322c27; }

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

.ledger { margin: 1rem 0 3rem; }

.ledger ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.ledger li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--ink);
}

.ledger li span {
  font-family: var(--mono);
  color: var(--muted);
}

.ledger p, .split p { margin-top: 0; }

.split { margin-top: 1rem; }

.split.tight { margin-top: 2.5rem; }

.passport {
  background: var(--card);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 1.1rem 1.15rem 1rem;
}

.passport-top, .passport-main, .passport-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.passport-top {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.55rem;
  margin: 0;
}

.passport-top p { margin: 0; }

.passport-main {
  align-items: flex-start;
  padding: 1rem 0 0.4rem;
}

.passport-name {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
  line-height: 1;
}

.passport-id, .mono {
  font-family: var(--mono);
  font-size: 0.92rem;
}

.passport-id { margin: 0.45rem 0 0; }

.stamp {
  margin: 0.2rem 0 0;
  border: 2px solid currentColor;
  padding: 0.28rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  transform: rotate(-8deg);
  align-self: center;
}

.stamp.paid { color: var(--paid); background: var(--paid-wash); }
.stamp.unpaid { color: var(--unpaid); background: var(--unpaid-wash); }
.stamp.small { transform: none; font-size: 0.68rem; }

/* Standalone stamp, e.g. on the checkout result page: keep it small and in flow. */
.narrow > .stamp {
  display: inline-block;
  margin: 0.4rem 0 0.6rem 0.25rem;
}

.passport-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
  margin: 0.6rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--ink);
}

.passport-meta div { margin: 0; }

.passport-meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.passport-meta dd { margin: 0.1rem 0 0; word-break: break-word; }

code, .terminal {
  font-family: var(--mono);
  font-size: 0.86rem;
}

code {
  background: rgba(27, 23, 20, 0.06);
  padding: 0.05rem 0.28rem;
}

.terminal {
  background: #1b1714;
  color: #f3ecdf;
  padding: 1rem 1.05rem;
  overflow: auto;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal.quiet { margin-top: 0.4rem; background: #3a332c; }

.verify-form label, .stack label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.verify-row {
  display: flex;
  gap: 0.5rem;
}

.verify-row input { flex: 1; min-width: 0; }

input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--ink);
  padding: 0.7rem 0.75rem;
}

input:focus, button:focus, a:focus {
  outline: 2px solid var(--paid);
  outline-offset: 2px;
}

.hint, .muted, .foot {
  color: var(--muted);
}

.hint { font-size: 0.92rem; }

.notice {
  background: var(--unpaid-wash);
  border-left: 4px solid var(--unpaid);
  padding: 0.75rem 0.9rem;
  margin: 1rem 0;
}

.field-error {
  color: var(--unpaid);
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.narrow { max-width: 38rem; }

.stack { display: grid; gap: 1rem; margin-top: 1.2rem; }

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.agent-list a {
  display: grid;
  grid-template-columns: 5.5rem 1.4fr 1fr 0.8fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

.agent-list a:hover { background: rgba(255, 253, 248, 0.45); }

.agent-list strong, .agent-list .mono { display: block; }

.empty { padding: 1rem 0; }

.foot {
  border-top: 1px solid var(--ink);
  padding: 1rem 0 2rem;
  font-size: 0.92rem;
}

.foot p { margin: 0.2rem 0; }

@media (max-width: 800px) {
  .hero, .split, .agent-layout, .agent-list a, .page-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-head { align-items: start; }

  .passport { box-shadow: 5px 5px 0 var(--ink); }

  .verify-row { flex-direction: column; }

  .ledger li { grid-template-columns: 2.5rem 1fr; }
}
