:root {
  --paper: #fff;
  --ink: #050505;
  --quiet: #747474;
  --hairline: #dedede;
  --red: #c40012;
  --pad: clamp(24px, 5vw, 72px);
  --frame: min(1120px, calc(100vw - (2 * var(--pad))));
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  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;
}

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(122px, 0.95fr)
    auto
    auto
    minmax(130px, 0.78fr)
    auto
    minmax(42px, 0.3fr);
  gap: 0;
  padding: var(--pad) 0;
}

h1,
p {
  margin: 0;
}

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

h1 {
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

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

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

.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: 390px;
}

.statement p:last-child {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
}

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

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

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

.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: 12px;
  line-height: 1;
}

input:focus-visible {
  outline: 0;
}

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

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

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

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

.form-status {
  margin-top: 10px;
  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: 56px 1fr;
  gap: 18px;
  padding: 9px 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: 9px;
  color: var(--red);
  writing-mode: vertical-rl;
}

@media (max-width: 760px) {
  :root {
    --pad: 22px;
    --frame: min(390px, calc(100vw - (2 * var(--pad))));
  }

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

  .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: none;
    margin: 0;
  }

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

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

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