/* Sealed Route / concept prototype
   Aesthetic: archival document, ledger, sealed record. Warm paper.
   Typography: editorial serif + monospace for record metadata.
   No public marketplace UI. Hairlines only. Restraint over color.
*/

:root {
  --paper:        #f3eee2;
  --paper-2:      #ece5d3;
  --paper-deep:   #e4dcc4;
  --ink:          #15110b;
  --ink-soft:     #3c3527;
  --ink-muted:    #8a7e69;
  --rule:         #c6bba0;
  --rule-soft:    #d8cfb7;
  --seal:         #7a2820;
  --seal-tint:    rgba(122, 40, 32, 0.06);
  --hold:         #876618;
  --ok:           #4d6b3e;

  --serif:  ui-serif, "Iowan Old Style", "Charter", "Hoefler Text", Georgia, serif;
  --sans:   ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono:   ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(rgba(21, 17, 11, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  background-position: 0 0;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--rule); }
a:hover { color: var(--seal); text-decoration-color: var(--seal); }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

/* Site head / foot */
.site-head {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
}
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 12px;
}
.brand .mark {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--seal);
  transform: translateY(1px);
}
.brand b { font-weight: 600; letter-spacing: 0.2em; }
.brand .sub { color: var(--ink-muted); }

.site-nav {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); border-bottom-color: var(--seal); }

.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  padding: 28px 0 56px;
  color: var(--ink-muted);
  font-size: 0.86rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}
.site-foot .disclaim { max-width: 70ch; line-height: 1.6; }
.site-foot .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
}

/* Hero */
.hero { padding: 72px 0 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--seal);
}

h1.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0 0 22px;
  max-width: 22ch;
}
h1.display em { font-style: italic; color: var(--ink-soft); }

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 12px;
  line-height: 1.55;
}
.lede strong { font-weight: 500; color: var(--ink); }
.note-inline {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  margin-top: 18px;
}

/* Trio diagram (above the fold, plain language) */
.trio {
  margin: 40px 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0 30px;
}
.trio-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 22px;
  flex-wrap: wrap; gap: 10px;
}
.trio-grid {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  align-items: stretch;
}
.trio-cell {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 168px;
}
.trio-cell__role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--seal);
}
.trio-cell__what {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.005em;
  margin: 0;
}
.trio-cell__why {
  font-family: var(--serif);
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
.trio-arrow {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.trio-arrow::before {
  content: "";
  position: absolute; top: 50%; left: 0; right: 0;
  border-top: 1px solid var(--rule);
}
.trio-arrow .glyph {
  position: relative; z-index: 1;
  background: var(--paper);
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1;
}

.trio-caption {
  margin: 24px 0 0;
  max-width: 78ch;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
}
.trio-caption strong { font-weight: 500; color: var(--seal); }

/* How it works (6 steps) */
.how { padding: 72px 0 0; }
.how h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 22px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.how-step {
  padding: 24px 28px 26px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: baseline;
}
.how-step:nth-child(2n) { padding-left: 28px; padding-right: 0; }
.how-step:nth-child(2n) { border-left: 1px solid var(--rule); }
.how-step__n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--seal);
}
.how-step__t {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}
.how-step__t b { font-weight: 500; }
.how-step__t .muted { color: var(--ink-muted); }

/* Personas (homepage cards) */
.personas { padding: 72px 0 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.section-head .aside {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  margin-top: -1px;
}
.persona-card {
  border-right: 1px solid var(--rule);
  padding: 32px 26px 28px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  min-height: 240px;
  transition: background 0.18s ease;
}
.persona-card:hover { background: var(--seal-tint); }
.persona-card:hover .persona-card__cta { color: var(--seal); }
.persona-card:last-child { border-right: none; }
.persona-card__num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.persona-card__title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.persona-card__line {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
}
.persona-card__cta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Sample event reference (homepage) */
.sample {
  margin: 64px 0 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: center;
}
.sample .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.sample .ids {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--seal);
  letter-spacing: 0.04em;
}
.sample .body {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0;
  grid-column: 1 / -1;
  line-height: 1.55;
  max-width: 78ch;
}

/* Statement strip */
.statement {
  margin: 64px 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 32px 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.statement .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.statement .body {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 60ch;
  margin: 0;
}
.statement .body strong { font-weight: 500; color: var(--seal); font-style: italic; }

/* Persona page heads */
.page-head { padding: 64px 0 4px; }

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.008em;
  margin: 0 0 20px;
  max-width: 22ch;
}

.promise {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
  border-left: 2px solid var(--seal);
  padding: 4px 0 4px 22px;
  margin: 22px 0 8px;
  max-width: 62ch;
}
.promise em { font-style: italic; color: var(--ink-soft); }

/* Why this exists for X (incentive block, persona pages) */
.why {
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.why-cell {
  padding: 24px 28px 26px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.why-cell:nth-child(2n) {
  padding-left: 28px;
  padding-right: 0;
  border-left: 1px solid var(--rule);
}
.why-cell:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.why-cell__t {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seal);
  margin: 0;
}
.why-cell__b {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* Subhead inside persona pages */
.subhead {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  margin: 56px 0 20px;
}
.subhead .ref { color: var(--seal); }

/* Artifact (record card) */
.artifact {
  border: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
  margin: 0;
}
.artifact::after {
  content: "";
  position: absolute; inset: 4px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
}
.artifact__head {
  border-bottom: 1px solid var(--ink);
  padding: 14px 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--paper-deep);
  position: relative;
  z-index: 1;
}
.artifact__head .id { color: var(--seal); }

.artifact__body {
  padding: 22px 22px 24px;
  position: relative;
  z-index: 1;
  margin: 0;
}
.artifact__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 28px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.artifact__row:first-child { padding-top: 4px; }
.artifact__row:last-child { border-bottom: none; padding-bottom: 4px; }
.artifact__row dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.artifact__row dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.5;
}
.artifact__row dd.prose {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.artifact__row dd .muted { color: var(--ink-muted); }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.pill--sealed::before    { background: var(--ink); }
.pill--qualified::before { background: var(--hold); }
.pill--gated::before     { background: var(--seal); }
.pill--paid::before      { background: var(--ok); }
.pill--blocked::before   { background: var(--seal); }
.pill--released::before  { background: var(--ok); }
.pill--not-released::before { background: var(--ink-muted); }

/* Log table (event ledger) */
.log {
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
}
.log__row {
  display: grid;
  grid-template-columns: 180px 150px 1fr;
  border-bottom: 1px solid var(--rule);
}
.log__row:last-child { border-bottom: none; }
.log__row > * { padding: 11px 16px; }
.log__row .ts    { color: var(--ink-muted); border-right: 1px solid var(--rule); }
.log__row .verb  { color: var(--seal); border-right: 1px solid var(--rule); letter-spacing: 0.04em; }
.log__row .desc  { color: var(--ink); }
.log__row.head {
  background: var(--paper-deep);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.log__row.head .verb { color: var(--ink-muted); }

/* Bounty schedule table */
.bounty {
  width: 100%;
  border: 1px solid var(--rule);
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.95rem;
}
.bounty th, .bounty td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.bounty th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper-deep);
  font-weight: 500;
}
.bounty td.event {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--seal);
  width: 130px;
}
.bounty td.amt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  width: 200px;
}
.bounty tr:last-child td { border-bottom: none; }

/* Buyer firewall (prominent block) */
.firewall {
  margin: 24px 0 0;
  border: 1px solid var(--seal);
  background: var(--seal-tint);
  padding: 22px 24px;
}
.firewall .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 14px;
}
.firewall dl {
  margin: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px 24px;
}
.firewall dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.firewall dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}

/* Plain prose blocks (controls, actions) */
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-plain li {
  padding: 14px 0;
  border-bottom: 1px dotted var(--rule);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: baseline;
}
.list-plain li:last-child { border-bottom: none; }
.list-plain .term {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.list-plain .body {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Code-ish payload preview */
.payload {
  margin: 0;
  padding: 22px 24px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre;
  overflow-x: auto;
}
.payload .k { color: var(--ink-muted); }
.payload .v { color: var(--ink); }
.payload .seal { color: var(--seal); }

/* Crosslinks (bottom of persona page) */
.crosslinks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 80px 0 0;
}
.crosslinks a {
  padding: 26px 22px 24px;
  border-right: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  transition: background 0.18s ease;
}
.crosslinks a:last-child { border-right: none; }
.crosslinks a:hover { background: var(--seal-tint); }
.crosslinks a:hover .xl-title { color: var(--seal); }
.crosslinks .xl-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.crosslinks .xl-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
}
.crosslinks .xl-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.crosslinks a.is-current { background: var(--paper-2); pointer-events: none; }
.crosslinks a.is-current .xl-title { color: var(--ink-muted); }

/* Note (small caveat) */
.note {
  margin: 18px 0 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 64ch;
}

/* Two-column layout (buyer match + firewall) */
.cols-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Responsive */
@media (max-width: 880px) {
  .trio-grid { grid-template-columns: 1fr; }
  .trio-arrow { height: 36px; }
  .trio-arrow::before { left: 50%; right: auto; top: 0; bottom: 0; width: 1px; height: 100%; border-top: none; border-left: 1px solid var(--rule); }
  .trio-arrow .glyph { transform: rotate(90deg); padding: 6px 0; }
  .how-grid { grid-template-columns: 1fr; }
  .how-step:nth-child(2n) { padding-left: 0; border-left: none; }
  .why { grid-template-columns: 1fr; }
  .why-cell:nth-child(2n) { padding-left: 0; border-left: none; }
  .why-cell:nth-child(n + 2) { border-top: 1px solid var(--rule); }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-card { border-right: none; border-bottom: 1px solid var(--rule); min-height: 200px; }
  .persona-card:last-child { border-bottom: none; }
  .crosslinks { grid-template-columns: 1fr; }
  .crosslinks a { border-right: none; border-bottom: 1px solid var(--rule); }
  .crosslinks a:last-child { border-bottom: none; }
  .artifact__row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .firewall dl { grid-template-columns: 1fr; gap: 10px; }
  .list-plain li { grid-template-columns: 1fr; gap: 4px; }
  .log__row { grid-template-columns: 1fr; }
  .log__row > * { border-right: none !important; border-bottom: 1px dotted var(--rule); padding: 8px 14px; }
  .log__row > *:last-child { border-bottom: none; }
  .statement { grid-template-columns: 1fr; gap: 14px; }
  .cols-2 { grid-template-columns: 1fr; }
  .site-foot { grid-template-columns: 1fr; }
  .site-foot .meta { text-align: left; }
  .sample { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 28px); }
  .hero { padding-top: 48px; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; }
  .bounty th, .bounty td { padding: 10px 12px; font-size: 0.9rem; }
}
