:root {
  --bg: #0b0b0b;
  --ink: #f4f0e6;
  --mute: rgba(244, 240, 230, 0.62);
  --line: rgba(244, 240, 230, 0.16);
  --banner: 3rem;
  --tabs: 3.25rem;
  --chrome: calc(var(--banner) + var(--tabs));
  --pad: clamp(1.25rem, 4vw, 4.5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--chrome);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

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

a:hover { opacity: 0.7; }

.chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.paper-bar {
  min-height: var(--banner);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.paper-bar-copy {
  min-width: 0;
}

.paper-bar .patent {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.18rem 0.55rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.paper-bar .patent-short { display: none; }

@media (max-width: 560px) {
  .paper-bar .patent-long { display: none; }
  .paper-bar .patent-short { display: inline; }
}

.paper-dl {
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  white-space: nowrap;
}

.tabs {
  height: var(--tabs);
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 var(--pad);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 1rem 0 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--mute);
}

.tabs a.is-on { color: var(--ink); }

.tabs a.brand {
  padding-right: 1.15rem;
  opacity: 1;
}

.brand-mark {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.15rem;
  box-sizing: border-box;
}

.brand-mark img,
.brand-mark svg {
  width: 2.35rem;
  height: auto;
  display: block;
}

.tabs a.brand:hover { opacity: 0.75; }

.panel {
  min-height: 100vh;
  padding: calc(var(--pad) + 1rem) var(--pad) calc(var(--pad) + 2rem);
}

.eyebrow {
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--mute);
}

h1, h2, h3 {
  font-weight: 400;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 8.6vw, 9.4rem);
  line-height: 0.92;
  max-width: 18ch;
}

h1 em {
  font-style: normal;
  color: var(--mute);
}

h2 {
  font-size: clamp(2.05rem, 6.2vw, 6.4rem);
  line-height: 0.96;
}

h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0.2rem 0 0.8rem;
}

.lede {
  margin: 2rem 0 0;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  max-width: 36ch;
  color: var(--mute);
  text-wrap: pretty;
}

.body {
  max-width: 42rem;
  color: var(--mute);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - var(--chrome));
  background:
    linear-gradient(180deg, rgba(11, 11, 11, 0.15) 0%, rgba(11, 11, 11, 0.92) 72%, var(--bg) 100%),
    url("assets/hero.jpg") center 18% / cover no-repeat;
}

.hero .mark {
  margin: 0 0 1.5rem;
  letter-spacing: 0.16em;
  text-transform: none;
  font-size: 13px;
  color: var(--mute);
}

.thesis-panel {
  min-height: 0;
  padding-top: var(--pad);
  padding-bottom: calc(var(--pad) + 1.5rem);
}

.thesis-panel .thesis {
  margin: 0;
  max-width: 28ch;
}

.humanity h2 {
  max-width: 20ch;
}

.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;
}

.ledger-pull {
  position: relative;
  margin: 3.5rem 0 0;
  z-index: 2;
}

.ledger-tab {
  position: absolute;
  top: -1.15rem;
  left: 1.6rem;
  margin: 0;
  background: #efe6d2;
  color: #1a1712;
  padding: 0.32rem 0.7rem 0.28rem;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.18);
}

.ledger-sheet {
  position: relative;
  background: #efe6d2;
  color: #1a1712;
  padding: 1.35rem 1.5rem 1.1rem 1.65rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 22px 48px rgba(0, 0, 0, 0.42);
  outline: 1px solid rgba(26, 23, 18, 0.16);
  overflow-x: auto;
}

.ledger-sheet::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(168, 42, 34, 0.55);
}

.ledger-mast {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1rem 0.85rem;
}

.ledger-kind,
.ledger-meta {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ledger-kind { color: #1a1712; }

.ledger-meta { color: rgba(26, 23, 18, 0.52); }

.ledger {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
}

.ledger th,
.ledger td {
  text-align: left;
  font-weight: 400;
  vertical-align: top;
  padding: 0.72rem 1rem 0.72rem 0;
  border-bottom: 1px solid rgba(26, 23, 18, 0.14);
}

.ledger thead th {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 23, 18, 0.5);
  padding-bottom: 0.55rem;
}

.ledger tbody th {
  width: 4.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.ledger-cite {
  margin: 0.95rem 0 0 0.85rem;
  color: rgba(26, 23, 18, 0.55);
  font-size: 0.82rem;
}

.ledger-cite a { color: inherit; }

.quiet {
  margin: 0;
  color: var(--mute);
  font-size: 0.95rem;
}

.protocol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.protocol-pin {
  position: sticky;
  top: calc(var(--chrome) + 1.5rem);
}

.pull {
  margin: 2.2rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  max-width: 16ch;
  letter-spacing: -0.03em;
}

.life {
  list-style: none;
  margin: 0;
  padding: 0;
}

.life li {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}

.life span {
  color: var(--mute);
  letter-spacing: 0.16em;
  font-size: 12px;
}

.life p { margin: 0; color: var(--mute); max-width: 34rem; }

.lexicon {
  min-height: auto;
  border-top: 1px solid var(--line);
}

.lexicon dl {
  margin: 0 0 3rem;
  display: grid;
  gap: 0;
}

.lexicon dl > div {
  display: grid;
  grid-template-columns: minmax(8rem, 16rem) 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.lexicon dt {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

.lexicon dd {
  margin: 0;
  color: var(--mute);
  align-self: center;
}

.ai-line {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  color: var(--ink);
  max-width: 22ch;
  line-height: 1.15;
}

.paper { padding-top: calc(var(--pad) + 2rem); }

.paper-head { margin-bottom: 4rem; }

.digest {
  display: grid;
  grid-template-columns: 4rem 1fr;
  column-gap: 1.5rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
  max-width: 52rem;
}

.digest .part {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  grid-row: span 2;
}

.digest h3 { grid-column: 2; }

.digest p {
  grid-column: 2;
  margin: 0;
  color: var(--mute);
  max-width: 40rem;
}

.thesis {
  margin: 4rem 0 0;
  padding: 0;
  border: 0;
  max-width: 28ch;
  font-size: clamp(1.75rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.humanity-feed {
  margin: 2.5rem 0 1.25rem;
  min-height: 24rem;
}

.humanity-cite {
  margin-top: 0.5rem;
}

.contact form {
  display: grid;
  gap: 1.4rem;
  max-width: 36rem;
  margin: 2.5rem 0 2rem;
}

.contact label {
  display: grid;
  gap: 0.45rem;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.contact input,
.contact textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0.7rem 0;
  border-radius: 0;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.contact button {
  justify-self: start;
  margin-top: 0.5rem;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
}

.contact button:disabled { opacity: 0.45; cursor: wait; }

.contact-status {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.contact-status.is-error { color: #e8b4a2; }

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

.foot {
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--mute);
  font-size: 13px;
}

.foot p { margin: 0; }

[data-reveal] {
  opacity: 0.55;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .protocol,
  .lexicon dl > div,
  .digest {
    grid-template-columns: 1fr;
  }

  h1 { max-width: none; }
  h2 { max-width: none; }
  .humanity h2 { max-width: none; }
  .lede { max-width: none; }
  .thesis-panel .thesis,
  .thesis { max-width: none; }

  .protocol-pin { position: static; }
  .ledger-pull { margin: 2rem 0 0; }

  .ledger { min-width: 0; }

  .ledger thead { display: none; }

  .ledger tbody tr {
    display: grid;
    grid-template-columns: 3.2rem 1fr;
    grid-template-areas:
      "blk val"
      "blk src"
      "blk rcv";
    gap: 0.12rem 0.85rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(26, 23, 18, 0.14);
  }

  .ledger tbody th,
  .ledger tbody td {
    display: block;
    width: auto;
    border-bottom: 0;
    padding: 0;
  }

  .ledger tbody th { grid-area: blk; align-self: start; }
  .ledger tbody td:nth-of-type(1) { grid-area: val; }
  .ledger tbody td:nth-of-type(2) { grid-area: src; color: rgba(26, 23, 18, 0.62); }
  .ledger tbody td:nth-of-type(3) { grid-area: rcv; color: rgba(26, 23, 18, 0.62); }
  .digest .part { grid-row: auto; }
  .foot { flex-direction: column; }
}
