:root {
  --paper: #fff;
  --ink: #050505;
  --quiet: #4a4a4a;
  --faint: #f1f1f1;
  --hairline: #dcdcdc;
  --red: #d00012;
  --pad: clamp(24px, 6vw, 96px);
  --frame: min(1184px, calc(100vw - (2 * var(--pad))));
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input {
  font: inherit;
}

.archive {
  min-height: 100svh;
  background: var(--paper);
  display: grid;
  justify-items: center;
}

.sheet {
  position: relative;
  width: var(--frame);
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows:
    minmax(128px, 0.96fr)
    auto
    auto
    minmax(128px, 0.7fr)
    auto
    minmax(44px, 0.28fr);
  gap: 0;
  padding: clamp(36px, 6svh, 76px) 0 clamp(32px, 5svh, 64px);
}

h1,
p {
  margin: 0;
}

.brand-block {
  grid-column: 1 / 4;
  grid-row: 1;
  align-self: start;
}

h1 {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-block p,
.status-block,
.label,
.ledger,
.access-form label,
.seal {
  font-size: 10px;
  line-height: 1.55;
}

.brand-block p {
  color: var(--quiet);
}

.status-block,
.label,
.ledger span,
.access-form label {
  color: var(--quiet);
}

.brand-block p {
  margin-top: 4px;
}

.status-block {
  grid-column: 10 / 13;
  grid-row: 1;
  width: 18ch;
  justify-self: end;
  align-self: start;
  display: grid;
  gap: 2px;
}

.statement {
  grid-column: 5 / 9;
  grid-row: 2;
  align-self: end;
  width: 100%;
  max-width: 430px;
}

.statement p:last-child {
  margin-top: 8px;
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.42;
}

.access-form {
  grid-column: 5 / 9;
  grid-row: 3;
  align-self: start;
  width: 100%;
  max-width: 430px;
  margin-top: 38px;
}

.access-form label {
  display: block;
  margin-bottom: 16px;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 11px;
}

.field:focus-within {
  border-bottom-color: var(--red);
}

.turnstile-slot {
  min-height: 0;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  line-height: 1;
}

input:focus-visible {
  outline: 0;
}

input::placeholder {
  color: var(--quiet);
}

button {
  border: 0;
  border-radius: 0;
  padding: 0 0 0 24px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

button:hover {
  color: var(--ink);
}

button:focus-visible {
  outline: 0;
  color: var(--red);
}

.form-status {
  margin-top: 12px;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.55;
}

.form-status:empty {
  display: none;
}

.form-status[data-state="error"] {
  color: var(--red);
}

.ledger {
  grid-column: 1 / 5;
  grid-row: 5;
  align-self: start;
}

.ledger div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.ledger div:last-child {
  border-bottom: 0;
}

.ledger p {
  color: var(--ink);
}

.seal {
  grid-column: 10 / 13;
  grid-row: 5;
  justify-self: end;
  align-self: start;
  margin-top: 12px;
  color: var(--red);
  writing-mode: vertical-rl;
}

@media (max-width: 860px) {
  :root {
    --pad: 24px;
    --frame: min(520px, calc(100vw - (2 * var(--pad))));
  }

  .sheet {
    width: var(--frame);
    min-height: 100svh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows:
      auto
      minmax(96px, 1fr)
      auto
      auto
      minmax(104px, 1fr)
      auto
      auto;
    padding: 24px 0 28px;
  }

  .brand-block {
    grid-column: 1;
    grid-row: 1;
  }

  .status-block {
    grid-column: 1;
    grid-row: 1;
    width: 18ch;
    justify-self: end;
    align-self: start;
    margin: 0;
    text-align: left;
  }

  .statement {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    width: 100%;
    max-width: 430px;
    margin: 0;
    justify-self: center;
  }

  .access-form {
    grid-column: 1;
    grid-row: 4;
    width: 100%;
    max-width: 430px;
    margin: 34px 0 0;
    justify-self: center;
  }

  .ledger {
    grid-column: 1;
    grid-row: 6;
    align-self: start;
    width: calc(100% - 72px);
    margin: 0;
  }

  .seal {
    grid-column: 1;
    grid-row: 6;
    position: static;
    transform: none;
    justify-self: end;
    align-self: start;
    margin: 9px 0 0;
  }
}

@media (max-width: 430px) {
  :root {
    --pad: 18px;
  }

  h1 {
    font-size: 14px;
  }

  .brand-block p,
  .status-block,
  .label,
  .ledger,
  .access-form label,
  .seal,
  .form-status {
    font-size: 9px;
  }

  .statement p:last-child,
  input,
  button {
    font-size: 12px;
  }

  .field {
    padding-bottom: 9px;
  }

  button {
    padding-left: 16px;
  }

  .ledger {
    width: calc(100% - 50px);
  }

  .ledger div {
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding: 10px 0;
  }
}
