:root {
  color-scheme: dark;
  --void: #101414;
  --metal: #182020;
  --paper: #e9e3d2;
  --paper-deep: #d5ccb7;
  --ink: #202525;
  --muted: #5b625e;
  --rule: rgba(39, 56, 52, .34);
  --green: #304f47;
  --oxide: #7a302b;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html { background: var(--void); }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 11px 100%,
    radial-gradient(circle at 50% 10%, #24302e 0, var(--void) 62%);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.72;
}

.registry-bar {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem 5vw;
  color: #d3d0c4;
  border-bottom: 1px solid rgba(222, 225, 213, .18);
  background: rgba(10, 15, 15, .88);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.registry-bar strong { display: block; margin-top: .15rem; font-weight: 400; }
.registry-kicker { color: #9ba69f; }
.registry-bar dl { display: flex; gap: 2rem; margin: 0; }
.registry-bar dl div { min-width: 8rem; }
.registry-bar dt { color: #829088; font-size: .65rem; }
.registry-bar dd { margin: .1rem 0 0; }

.desk {
  position: relative;
  width: min(100% - 1.5rem, 840px);
  margin: clamp(2rem, 7vw, 5.5rem) auto;
}

.carbon-copy {
  position: absolute;
  inset: .9rem -1rem -1rem 1rem;
  z-index: 0;
  border: 1px solid rgba(180, 196, 188, .2);
  background: #20302c;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, .48);
  transform: rotate(.55deg);
}

.instrument {
  position: relative;
  z-index: 1;
  min-height: 80vh;
  padding: clamp(2rem, 7vw, 5.2rem);
  overflow: hidden;
  border: 1px solid #aaa28f;
  background:
    radial-gradient(circle at 11% 16%, rgba(112, 87, 54, .11), transparent 16rem),
    radial-gradient(circle at 91% 74%, rgba(87, 99, 82, .09), transparent 18rem),
    repeating-linear-gradient(0deg, rgba(44, 49, 42, .018) 0 1px, transparent 1px 4px),
    var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .44), inset 0 0 4rem rgba(83, 69, 44, .09);
}

.instrument::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 2.2rem;
  width: 1px;
  background: rgba(122, 48, 43, .16);
}

.fold { position: absolute; pointer-events: none; background: rgba(82, 72, 54, .1); }
.fold-a { inset: 33% 0 auto; height: 1px; }
.fold-b { inset: 0 auto 0 68%; width: 1px; }

.staple {
  position: absolute;
  top: 1.8rem;
  left: 1.15rem;
  width: 1.7rem;
  height: .42rem;
  border: 2px solid #6e746d;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0,0,0,.2);
  transform: rotate(-7deg);
}

.instrument-header { position: relative; padding-bottom: 3.5rem; border-bottom: 1px solid var(--rule); }
.filing-code { margin: 0 0 1.7rem; color: var(--oxide); font: 700 .72rem/1.4 var(--mono); letter-spacing: .12em; }

.docket {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 3rem;
  font: .64rem/1.2 var(--mono);
  letter-spacing: .08em;
}

.docket span { padding: .38rem .55rem .3rem; border: 1px solid var(--rule); color: var(--muted); }

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.4rem, 12vw, 7.2rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .88;
}

.subtitle {
  max-width: 31rem;
  margin: 1.6rem 0 0;
  color: #39423f;
  font-size: clamp(1.2rem, 3.5vw, 1.75rem);
  font-style: italic;
  line-height: 1.35;
}

.office-stamp {
  position: absolute;
  top: 2.5rem;
  right: -1rem;
  width: 10.2rem;
  padding: .7rem .65rem .55rem;
  text-align: center;
  color: var(--oxide);
  border: .2rem double currentColor;
  font-family: var(--mono);
  filter: contrast(.85);
  opacity: .78;
  transform: rotate(6deg);
}

.office-stamp::after {
  content: "";
  position: absolute;
  inset: .2rem -.08rem -.14rem .12rem;
  border: 1px dotted currentColor;
  transform: rotate(-1.2deg);
}
.office-stamp span,
.office-stamp b,
.office-stamp small { display: block; }
.office-stamp span { font-size: .84rem; font-weight: 700; letter-spacing: .08em; }
.office-stamp b { margin: .08rem 0 .3rem; font-size: 1.13rem; line-height: 1; }
.office-stamp small { font-size: .48rem; letter-spacing: .06em; line-height: 1.2; }

.clauses { counter-reset: clause; padding-top: 1rem; }
.clause { position: relative; padding: 2.4rem 0 2.4rem 3rem; border-bottom: 1px dotted var(--rule); }
.clause::before {
  content: "§ " attr(data-clause);
  position: absolute;
  top: 2.7rem;
  left: 0;
  color: var(--oxide);
  font: 700 .72rem/1 var(--mono);
  letter-spacing: .08em;
}
.clause p { margin: 0; font-size: clamp(1.04rem, 2.4vw, 1.16rem); }
.clause aside {
  width: max-content;
  max-width: 12rem;
  margin: 1.2rem 0 -.6rem auto;
  padding: .28rem .55rem;
  color: var(--oxide);
  border: 1px solid currentColor;
  font: 700 .63rem/1.25 var(--mono);
  letter-spacing: .08em;
  transform: rotate(-1.2deg);
}

.conclusion p { font-size: clamp(1.24rem, 3.3vw, 1.55rem); line-height: 1.55; }

.execution { position: relative; padding-top: 4rem; }
.execution h2 { max-width: 18ch; margin: 0 0 2rem; font-size: clamp(1.9rem, 5.5vw, 3rem); font-weight: 400; line-height: 1.08; text-transform: uppercase; }
.closing-form { margin: 0 0 .7rem; color: var(--oxide); font: 700 .66rem/1.4 var(--mono); letter-spacing: .1em; }

.cheap-stamp {
  margin: 2.6rem -1.2rem 3rem auto;
  max-width: 32rem;
  padding: .9rem 1.1rem .75rem;
  color: var(--oxide);
  border: .2rem double currentColor;
  font-family: var(--mono);
  line-height: 1.28;
  opacity: .82;
  transform: rotate(-1.15deg);
}
.cheap-stamp strong,
.cheap-stamp span { display: block; }
.cheap-stamp strong { margin-bottom: .45rem; font-size: clamp(1rem, 3.2vw, 1.35rem); letter-spacing: .04em; }
.cheap-stamp span { font-size: .67rem; letter-spacing: .035em; }
.bob-trigger { color: inherit; text-decoration: none; }
.bob-trigger:hover { text-shadow: .06rem 0 currentColor; }
.bob-trigger:focus-visible { outline: 2px dotted currentColor; outline-offset: .18rem; }

.secret-link { color: inherit; text-decoration: none; }
.secret-link:hover { filter: contrast(1.15) saturate(1.15); }
.secret-link:focus-visible { outline: 3px solid var(--oxide); outline-offset: .3rem; }

.certification-copy { font-size: clamp(1.02rem, 2.35vw, 1.14rem); }
.certification-copy > p { margin: 0 0 1.8rem; }
.sworn-statement { margin: 2.8rem 0; padding: 1.4rem 1.5rem 1.2rem; border: 1px dashed var(--rule); background: rgba(255,255,255,.1); transform: rotate(.2deg); }
.sworn-statement h3 { margin: 0 0 .75rem; color: var(--oxide); font: 700 .75rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.sworn-statement p { margin: 0; }
.precedence { padding: .85rem 1rem; border-left: .24rem solid var(--oxide); font-weight: 700; }

.authorization { display: grid; gap: 2rem; margin: 3.5rem 0 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--ink); }
.authorization p { margin: 0; font-family: var(--mono); font-size: .86rem; line-height: 1.55; }
.authorization p span,
.rubric > span { display: block; margin-bottom: .35rem; color: var(--muted); font: 700 .64rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.authorization p strong { font-size: 1rem; }
.rubric > div { position: relative; width: 6rem; height: 3.5rem; margin: .6rem 0 .45rem; }
.rubric i { position: absolute; inset: 0 .5rem .2rem 0; border: .14rem solid var(--ink); border-right-color: transparent; border-radius: 50%; transform: rotate(-9deg); }
.rubric b { position: absolute; top: -.3rem; left: 1.7rem; font: 3rem/1 var(--serif); transform: rotate(88deg); }
.rubric small { display: block; max-width: 19rem; color: var(--muted); font: .67rem/1.4 var(--mono); }

.coffee-ring {
  position: absolute;
  right: -2.7rem;
  top: 12rem;
  width: 9rem;
  aspect-ratio: 1;
  border: .55rem double rgba(91, 57, 34, .16);
  border-left-color: transparent;
  border-radius: 50%;
  box-shadow: inset .15rem -.1rem 0 rgba(91,57,34,.08), -.3rem .25rem 0 rgba(91,57,34,.05);
  transform: rotate(-17deg) scaleY(.88);
  cursor: help;
}
.coffee-drop {
  position: absolute;
  border-radius: 47% 53% 58% 42%;
  background: rgba(91, 57, 34, .13);
  pointer-events: none;
}
.coffee-drop-a { top: 20.8rem; right: 1.6rem; width: .48rem; height: .62rem; transform: rotate(24deg); }
.coffee-drop-b { top: 22rem; right: 3rem; width: .22rem; height: .27rem; }

button {
  width: 100%;
  min-height: 3.4rem;
  padding: .8rem 1rem;
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  font: 700 .78rem/1.3 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
}
button:hover { background: var(--green); }
button:focus-visible { outline: 3px solid var(--oxide); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .58; }

.registration-status { min-height: 1.7em; margin: .85rem 0 0; color: var(--muted); font: .72rem/1.5 var(--mono); }
.resolution { display: none; margin: 3.2rem auto 1.8rem; padding: 1.15rem .8rem .95rem; color: var(--oxide); border: .22rem double currentColor; text-align: center; font-family: var(--mono); opacity: .84; transform: rotate(-2deg); }
.resolution span { display: block; margin-bottom: .55rem; font-size: .62rem; letter-spacing: .12em; }
.resolution p { margin: .25rem auto; font: 700 clamp(.88rem, 3vw, 1.25rem)/1.2 var(--mono); letter-spacing: .045em; }
.is-registered .resolution { display: block; }

.instrument-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 5rem;
  padding-top: 1.2rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font: .68rem/1.5 var(--mono);
  letter-spacing: .06em;
}
@media (min-width: 720px) {
  .instrument::before { left: 3.3rem; }
}

@media (max-width: 640px) {
  .registry-bar { display: block; padding: .9rem 1rem; }
  .registry-bar dl { margin-top: .8rem; gap: .8rem; }
  .registry-bar dl div { min-width: 0; flex: 1; }
  .desk { width: min(100% - .7rem, 840px); margin: .6rem auto 2rem; }
  .carbon-copy { inset: .45rem -.2rem -.5rem .35rem; }
  .instrument { padding: 2.1rem 1.45rem 2.5rem 2rem; }
  .instrument::before { left: 1.1rem; }
  .docket { max-width: 12rem; margin-bottom: 2.4rem; }
  .office-stamp { top: 1.8rem; right: -.65rem; width: 7rem; padding: .5rem .4rem .4rem; }
  .office-stamp span { font-size: .61rem; }
  .office-stamp b { font-size: .76rem; }
  .office-stamp small { font-size: .37rem; }
  .clause { padding-left: 2.15rem; }
  .clause aside { max-width: 10rem; }
  .cheap-stamp { margin-right: -.6rem; }
  .sworn-statement { padding: 1.1rem 1rem; }
  .coffee-ring { right: -4.8rem; opacity: .75; }
}

@media (min-width: 720px) {
  .authorization { grid-template-columns: 1.35fr 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .instrument { animation: arrive .5s ease-out both; }
  .instrument.is-registered { animation: bureaucratic-impact .44s steps(2, end) both; }
  .is-registered .resolution { animation: stamp-in .28s ease-out both; }
  .is-registered .resolution p + p { animation-delay: .14s; }
}

@keyframes arrive { from { opacity: 0; transform: translateY(.55rem); } }
@keyframes stamp-in { from { opacity: 0; transform: scale(1.035); } }
@keyframes bureaucratic-impact {
  0% { transform: translate(0) rotate(0); }
  18% { transform: translate(-.18rem, .06rem) rotate(-.16deg); }
  36% { transform: translate(.22rem, -.08rem) rotate(.2deg); }
  58% { transform: translate(-.1rem, .04rem) rotate(-.08deg); }
  78% { transform: translate(.05rem, -.02rem); }
  100% { transform: translate(0) rotate(0); box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .44), inset 0 0 4rem rgba(83, 69, 44, .09), 0 0 0 .18rem rgba(122, 48, 43, .16); }
}

@media print {
  body { background: #fff; }
  .registry-bar, .carbon-copy, button, .registration-status { display: none; }
  .desk { width: 100%; margin: 0; }
  .instrument { border: 0; box-shadow: none; }
}
