/* Busta riservata: manila board, typewriter ink, one rubber-stamp red. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/courier-prime-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/courier-prime-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --manila: #e3c584;
  --manila-deep: #d6b46c;
  --sheet: #f4efe3;
  --ink: #1e1912;
  --ink-soft: #4a3d2a;
  --rule: #a47d45;
  --rule-soft: #c39c5c;
  --stamp: #9e241c;
  --stamp-ink: #f6e7c4;
  --board: #1e1912;
  --board-ink: #e3c584;
  --board-soft: #c2ac7e;
  --board-rule: #5e4b31;
  --board-stamp: #e8604f;

  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-typed: "Courier Prime", "Courier New", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(4.5rem, 3rem + 6vw, 8.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --manila: #332a21;
    --manila-deep: #3b3026;
    --sheet: #43382c;
    --ink: #ebd49e;
    --ink-soft: #d4bd8c;
    --rule: #7a6342;
    --rule-soft: #5a4a33;
    --stamp: #f27a6b;
    --stamp-ink: #332a21;
    --board: #e3c584;
    --board-ink: #1e1912;
    --board-soft: #4a3d2a;
    --board-rule: #a47d45;
    --board-stamp: #9e241c;
  }
}
:root[data-theme="dark"] {
  --manila: #332a21;
  --manila-deep: #3b3026;
  --sheet: #43382c;
  --ink: #ebd49e;
  --ink-soft: #d4bd8c;
  --rule: #7a6342;
  --rule-soft: #5a4a33;
  --stamp: #f27a6b;
  --stamp-ink: #332a21;
  --board: #e3c584;
  --board-ink: #1e1912;
  --board-soft: #4a3d2a;
  --board-rule: #a47d45;
  --board-stamp: #9e241c;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-3);
  scrollbar-color: var(--rule) var(--manila);
}

body {
  margin: 0;
  background: var(--manila);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variation-settings: normal;
  font-stretch: 100%;
  overflow-x: hidden;
}

::selection {
  background: var(--stamp);
  color: var(--stamp-ink);
}

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

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

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 850;
  font-stretch: 78%;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-wrap: balance;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--manila);
  padding: 0.6rem 1rem;
  font-weight: 700;
}
.skip-link:focus {
  top: var(--space-2);
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.typed {
  font-family: var(--font-typed);
  font-size: 0.95rem;
  letter-spacing: 0;
  line-height: 1.45;
}

/* ---------- Envelope front ---------- */

.envelope {
  position: relative;
  margin: var(--space-2) var(--gutter) 0;
  border: 2px solid var(--rule);
  max-width: calc(var(--max) + 2 * var(--gutter));
}
@media (min-width: 1340px) {
  .envelope {
    margin-inline: auto;
  }
}

.flap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) clamp(16px, 3vw, 40px);
  border-bottom: 2px dashed var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-weight: 900;
  font-stretch: 72%;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}

.flap-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem var(--space-3);
  margin: 0;
}
.flap-fields div {
  display: flex;
  gap: 0.6rem;
}
.flap-fields dt {
  font-weight: 700;
}
.flap-fields dd {
  margin: 0;
}

.nav ul {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
}
.nav a {
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  border-bottom-color: var(--ink);
}
.nav .nav-download {
  font-weight: 800;
  border-bottom-color: currentColor;
}

/* Logo lockup: the rose seal pressed just before the word, slightly turned like real wax */
.wordmark img {
  width: 1.55em;
  height: 1.55em;
  flex: none;
  margin-block: -0.2em;
  transform: rotate(-8deg);
  filter: drop-shadow(0 1px 1px rgb(30 25 18 / 0.3));
}

/* wax seal with the rose, pressed onto the flap's fold */
.flap .seal {
  position: absolute;
  left: calc(50% - 46px);
  bottom: -68px;
  width: 92px;
  height: 92px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 2px 2px rgb(30 25 18 / 0.35)) drop-shadow(0 6px 10px rgb(30 25 18 / 0.2));
  pointer-events: none;
}

/* string-and-button closure sitting on the fold */
.closure {
  position: absolute;
  right: clamp(24px, 9vw, 140px);
  bottom: -27px;
  width: 104px;
  height: 52px;
  color: var(--ink);
  pointer-events: none;
}

.front {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-4);
  padding: clamp(3.5rem, 2rem + 4vw, 6rem) clamp(16px, 3vw, 40px) clamp(3rem, 2rem + 3vw, 5rem);
}

.front-copy {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.front h1 {
  font-size: clamp(2.9rem, 1.2rem + 5vw, 5.5rem);
  font-stretch: 76%;
  font-weight: 860;
  letter-spacing: -0.012em;
  line-height: 0.92;
}

.lede {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  line-height: 1.4;
  max-width: 34ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-1);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 1.6rem 1.05rem 1.35rem;
  background: var(--ink);
  color: var(--manila);
  font-weight: 750;
  font-stretch: 90%;
  font-size: 1.2rem;
  line-height: 1;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn svg {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}
.btn:hover {
  background: var(--stamp);
  border-color: var(--stamp);
  color: var(--stamp-ink);
}
.btn:active {
  transform: translateY(1px);
}
.btn[aria-disabled="true"] {
  background: transparent;
  color: var(--ink);
  border-style: dashed;
  cursor: default;
}

.btn-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 26ch;
  line-height: 1.35;
}

.proof {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule);
  max-width: 40rem;
}
.proof strong {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* routing grid */
.routing {
  grid-column: 8 / span 5;
  align-self: center;
  position: relative;
}

.routing table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--manila) 70%, var(--sheet));
}
.routing caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-typed);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 0 0.5rem;
}
.routing th,
.routing td {
  text-align: left;
  font-family: var(--font-typed);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--ink);
  vertical-align: top;
}
.routing thead th {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom-width: 2px;
}
.routing th + th,
.routing td + td {
  border-left: 1px solid var(--ink);
}
.routing tbody th {
  font-weight: 400;
  width: 42%;
}
.routing td {
  font-weight: 700;
}
.routing s {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
}
.routing-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- Rubber stamp ---------- */

.stamp {
  --stamp-color: var(--stamp);
  display: inline-block;
  color: var(--stamp-color);
  border: 0.14em solid currentColor;
  border-radius: 0.12em;
  padding: 0.08em 0.32em 0.02em;
  font-weight: 900;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0.02em 0.015em 0 color-mix(in srgb, currentColor 45%, transparent);
  -webkit-mask-image: url("../img/ink-grain.svg");
  mask-image: url("../img/ink-grain.svg");
  -webkit-mask-size: 220px 220px;
  mask-size: 220px 220px;
  user-select: none;
}

.routing .stamp {
  position: absolute;
  right: -0.6rem;
  top: -4.3rem;
  font-size: clamp(1.4rem, 0.9rem + 1.3vw, 2.1rem);
  transform: rotate(-7deg);
}

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

.section {
  padding-block: var(--space-6);
}
.section-tail {
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  max-width: 46rem;
}
.section-head h2 {
  font-size: clamp(2.2rem, 1rem + 3.6vw, 4rem);
}
.section-head p {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.fold {
  height: 0;
  border: 0;
  border-top: 2px dashed var(--rule);
  margin: 0;
}

/* How it works */
.how {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-5);
  align-items: start;
}

.steps {
  grid-column: 1 / span 6;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 2px solid var(--ink);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.25rem var(--space-3);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-typed);
  font-weight: 700;
  font-size: 1.25rem;
}
.steps h3 {
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  font-stretch: 82%;
  font-weight: 800;
  line-height: 1.05;
  padding-top: 0.35rem;
}
.steps p {
  color: var(--ink-soft);
  max-width: 36ch;
}

.how-notes {
  grid-column: 1 / span 6;
  display: grid;
  gap: var(--space-2);
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 38rem;
}
.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.formats li {
  font-family: var(--font-typed);
  font-size: 0.9rem;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.15rem 0.5rem;
}

/* the transcript sheet pulled out of the envelope */
.sheet {
  grid-column: 8 / span 5;
  grid-row: 1 / span 2;
  position: relative;
  background: var(--sheet);
  color: var(--ink);
  padding: var(--space-4) var(--space-3) var(--space-3);
  box-shadow: 0 1px 2px rgb(30 25 18 / 0.18), 0 14px 30px -12px rgb(30 25 18 / 0.35);
  transform: rotate(1.2deg);
  transform-origin: top left;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: 0.75rem;
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.sheet-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.turn {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0 var(--space-2);
  padding-block: 0.55rem;
}
.turn + .turn {
  border-top: 1px dotted var(--rule-soft);
}
.turn .who {
  font-family: var(--font-typed);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
}
.turn .who time {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.turn p {
  font-size: 1rem;
  line-height: 1.45;
}
.sheet-foot {
  margin-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Privacy band: the chipboard folder */
.privacy {
  background: var(--board);
  color: var(--board-ink);
  position: relative;
  overflow: hidden;
}
.privacy ::selection {
  background: var(--board-stamp);
  color: var(--board);
}
.privacy :focus-visible {
  outline-color: var(--board-stamp);
}
.privacy .section-head p {
  color: var(--board-soft);
}
.privacy a {
  text-decoration-color: var(--board-rule);
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-4);
}

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--board-ink);
}
.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--board-rule);
  align-items: baseline;
}
.ledger .what {
  font-weight: 700;
  font-size: 1.15rem;
}
.ledger .where {
  font-family: var(--font-typed);
  font-size: 0.95rem;
  text-align: right;
}
.ledger-title {
  font-family: var(--font-typed);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.ledger-stays {
  grid-column: 1 / span 5;
}
.ledger-net {
  grid-column: 7 / span 6;
}
.ledger-net .where {
  max-width: 22ch;
}
.privacy-close {
  grid-column: 1 / span 6;
  padding-top: var(--space-3);
}
.ledger-net {
  position: relative;
}
.privacy-close .privacy-link {
  font-size: 1rem;
  font-weight: 400;
  margin-top: 1rem;
}
.privacy-close p {
  font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1.15;
  max-width: 28ch;
}

.privacy .stamp {
  --stamp-color: var(--board-stamp);
  position: absolute;
  right: 0.5rem;
  bottom: -5.6rem;
  font-size: clamp(2.2rem, 1rem + 2.8vw, 3.8rem);
  transform: rotate(-8deg);
}

/* Spec sheet */
.spec {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-5);
}
.timesheet {
  grid-column: 1 / span 6;
  align-self: start;
}
.timesheet table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
}
.timesheet caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.timesheet th,
.timesheet td {
  text-align: left;
  padding: 0.9rem 0.5rem 0.9rem 0;
  border-bottom: 1px solid var(--ink);
  vertical-align: baseline;
}
.timesheet thead th {
  font-family: var(--font-typed);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timesheet .num {
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem);
  font-weight: 850;
  font-stretch: 78%;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.timesheet .num small {
  font-size: 0.45em;
  font-weight: 700;
  letter-spacing: 0;
  margin-left: 0.15em;
}
.timesheet .num small.approx {
  margin: 0 0.15em 0 0;
}
.timesheet .machine {
  font-family: var(--font-typed);
  font-size: 0.95rem;
}

.requirements {
  grid-column: 8 / span 5;
  margin: 0;
  border-top: 2px solid var(--ink);
}
.requirements div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--space-2);
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--ink);
}
.requirements dt {
  font-family: var(--font-typed);
  font-weight: 700;
  font-size: 0.95rem;
}
.requirements dd {
  margin: 0;
  font-size: 1.05rem;
}

/* FAQ */
.faq-list {
  border-top: 2px solid var(--ink);
  max-width: 54rem;
}
.faq-list details {
  border-bottom: 1px solid var(--ink);
}
.faq-list summary {
  display: grid;
  grid-template-columns: 1fr 1.5rem;
  gap: var(--space-2);
  align-items: center;
  padding-block: 1.15rem;
  cursor: pointer;
  list-style: none;
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 750;
  font-stretch: 88%;
  line-height: 1.2;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s var(--ease-out);
}
.faq-list details[open] summary svg {
  transform: rotate(45deg);
}
.faq-list summary:hover {
  color: var(--stamp);
}
.faq-answer {
  padding: 0 2.5rem 1.4rem 0;
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
  color: var(--ink-soft);
}
.faq-answer strong {
  color: var(--ink);
}

/* Download: back of the envelope */
.download {
  padding-bottom: var(--space-6);
}
.envelope-back .closure {
  top: calc(clamp(2.2rem, 1rem + 3vw, 3.5rem) - 27px);
  bottom: auto;
}
.envelope-back {
  position: relative;
  border: 2px solid var(--rule);
  padding: clamp(3rem, 2rem + 4vw, 6rem) clamp(16px, 4vw, 64px) clamp(2.5rem, 2rem + 2vw, 4rem);
  overflow: hidden;
}
.envelope-back::before {
  /* the back flap */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(2.2rem, 1rem + 3vw, 3.5rem);
  border-bottom: 2px dashed var(--rule);
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-4);
  align-items: end;
}
.download-copy {
  grid-column: 1 / span 7;
  display: grid;
  gap: var(--space-3);
}
.download-copy h2 {
  font-size: clamp(2.6rem, 1rem + 4.6vw, 5.2rem);
  font-stretch: 74%;
}
.download-copy .btn {
  justify-self: start;
  font-size: 1.35rem;
  padding: 1.25rem 2rem 1.25rem 1.6rem;
}
.download-facts {
  grid-column: 9 / span 4;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.download-facts li {
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1rem;
}

/* Pricing: two ruled forms side by side */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.plan {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: var(--space-2);
  padding: var(--space-4) clamp(16px, 3vw, 40px) var(--space-4) 0;
}
.plan + .plan {
  border-left: 1px solid var(--ink);
  padding-left: clamp(16px, 3vw, 40px);
}
.plan h3 {
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.4rem);
  font-stretch: 80%;
}
.plan-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.plan-price .num {
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4rem);
  font-weight: 850;
  font-stretch: 78%;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
}
.plan-price .num small {
  font-size: 0.5em;
  margin-left: 0.1em;
}
.plan-after {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.plan-desc {
  font-size: 1.15rem;
  max-width: 30ch;
}
.plan .btn,
.plan .link-arrow {
  justify-self: start;
  align-self: end;
}
.plan-full {
  box-shadow: inset 0 3px 0 var(--ink);
}
.plans-note {
  margin-top: var(--space-3);
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* Credits */
.credits h2 {
  font-size: clamp(1.9rem, 1rem + 2.2vw, 2.8rem);
  margin-bottom: var(--space-3);
}
.link-arrow {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 750;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.15rem;
}
.link-arrow svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.25s var(--ease-out);
}
.link-arrow:hover svg {
  transform: translateX(3px);
}
.credits {
  max-width: 54rem;
}
.credits ul {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.credits li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1rem;
}
.credits li span:last-child {
  font-family: var(--font-typed);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--ink);
  padding-block: var(--space-4) var(--space-5);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: var(--space-3);
}
.footer-legal {
  grid-column: 1 / span 7;
  display: grid;
  gap: 0.75rem;
  color: var(--ink-soft);
  max-width: 60ch;
}
.footer-nav {
  grid-column: 9 / span 4;
}
.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

/* ---------- Document pages (legal) ---------- */

.doc-flap {
  margin: var(--space-2) var(--gutter) 0;
  max-width: calc(var(--max) + 2 * var(--gutter));
  border: 2px solid var(--rule);
  border-bottom: 0;
}
@media (min-width: 1340px) {
  .doc-flap {
    margin-inline: auto;
  }
}
.doc {
  padding-block: var(--space-5) var(--space-6);
}
.doc article {
  background: var(--sheet);
  max-width: 50rem;
  padding: clamp(1.5rem, 1rem + 3vw, 4rem);
  box-shadow: 0 1px 2px rgb(30 25 18 / 0.18), 0 14px 30px -12px rgb(30 25 18 / 0.3);
}
.doc h1 {
  font-size: clamp(2.2rem, 1rem + 3.4vw, 3.6rem);
  margin-bottom: var(--space-2);
}
.doc .updated {
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.doc h2 {
  font-size: clamp(1.4rem, 1rem + 1vw, 1.8rem);
  font-stretch: 85%;
  margin: var(--space-4) 0 var(--space-2);
}
.doc h3 {
  font-size: 1.2rem;
  font-stretch: 90%;
  margin: var(--space-3) 0 0.6rem;
}
.doc p,
.doc li {
  max-width: 68ch;
}
.doc p + p {
  margin-top: 0.9rem;
}
.doc ul,
.doc ol {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: var(--space-2);
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.6rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.doc thead th {
  border-bottom: 2px solid var(--ink);
}
.doc code {
  font-family: var(--font-typed);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.placeholder {
  outline: 1px dotted var(--ink);
  outline-offset: 1px;
  padding: 0 0.2em;
}
.doc-back {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.lang-switch {
  margin-top: var(--space-3);
  font-weight: 700;
}
.table-scroll {
  overflow-x: auto;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .privacy .stamp {
    transition: transform 0.55s var(--ease-out), opacity 0.2s linear, filter 0.55s var(--ease-out);
  }
  .js .privacy .stamp[data-pressed="false"] {
    opacity: 0;
    transform: rotate(-8deg) scale(1.35);
    filter: blur(6px);
  }
  .js .routing tbody tr {
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  }
  .js .routing[data-typed="false"] tbody tr {
    opacity: 0;
    transform: translateX(-6px);
  }
  .js .routing[data-typed="false"] .stamp {
    opacity: 0;
    transform: rotate(-7deg) scale(1.3);
  }
  .js .routing .stamp {
    transition: opacity 0.2s linear 0.9s, transform 0.5s var(--ease-out) 0.9s;
  }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .flap-fields div:last-child {
    display: none;
  }
}

@media (max-width: 1080px) {
  .flap {
    grid-template-columns: auto 1fr;
  }
  .flap-fields {
    display: none;
  }
  .front-copy,
  .routing {
    grid-column: 1 / -1;
  }
  .routing {
    max-width: 34rem;
    margin-top: var(--space-3);
  }
  .steps,
  .how-notes,
  .sheet {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .sheet {
    max-width: 36rem;
  }
  .ledger-stays,
  .ledger-net,
  .privacy-close {
    grid-column: 1 / -1;
  }
  .privacy .stamp {
    bottom: -3.5rem;
  }
  .timesheet,
  .requirements {
    grid-column: 1 / -1;
  }
  .download-copy,
  .download-facts {
    grid-column: 1 / -1;
  }
  .footer-legal,
  .footer-nav {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1.0625rem;
  }
  .flap {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .nav ul {
    flex-wrap: wrap;
    gap: 0.2rem 1.1rem;
    font-size: 0.95rem;
  }
  .privacy .stamp {
    position: static;
    margin-top: var(--space-4);
  }
  .closure {
    right: 18px;
    width: 80px;
    height: 40px;
    bottom: -21px;
  }
  .flap .seal {
    left: auto;
    right: 16px;
    bottom: -32px;
    width: 64px;
    height: 64px;
  }
  .routing .stamp {
    right: 0;
    top: -3.6rem;
  }
  .routing {
    margin-top: var(--space-4);
  }
  .requirements div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .ledger li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .ledger .where {
    text-align: left;
  }
  .sheet {
    transform: none;
    padding-inline: var(--space-2);
  }
  .turn {
    grid-template-columns: 1fr;
  }
  .turn .who {
    display: flex;
    gap: 0.6rem;
  }
  .faq-answer {
    padding-right: 0;
  }
  .credits li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .plan,
  .plan + .plan {
    padding-inline: 0;
    border-left: 0;
  }
  .plan + .plan {
    border-top: 1px solid var(--ink);
  }
}

@media print {
  .nav,
  .closure,
  .skip-link {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
