:root {
  color-scheme: light;
  --ash: #faf7f3;
  --bleached: #f0eae0;
  --bone: #e2d9cb;
  --marrow: #b3aa9c;
  --weathered: #7d766a;
  --buried: #504b42;
  --interred: #2e2a25;
  --entombed: #1c1917;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ash);
  color: var(--interred);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.98rem + 0.28vw, 1.22rem);
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

a,
button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--entombed);
  color: var(--ash);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.seam {
  position: fixed;
  z-index: -1;
  inset: 0 auto 0 clamp(2rem, 16vw, 14rem);
  width: 1px;
  background: var(--bone);
}

.seam span {
  position: absolute;
  top: 42vh;
  left: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--marrow);
  background: var(--ash);
  transform: rotate(45deg);
}

.site-header,
main > section,
footer {
  width: min(74rem, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--bone);
  font-family: var(--sans);
  font-size: 0.88rem;
}

.signature {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.signature-mark {
  width: 2rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--marrow);
  font-family: var(--serif);
  font-size: 1.15rem;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.4vw, 2rem);
}

nav a,
nav .text-button,
.quiet-link {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
}

nav a,
.text-button {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-decoration-line: underline;
}

main > section {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.45fr) minmax(0, 2fr);
  column-gap: clamp(2rem, 7vw, 7rem);
  border-bottom: 1px solid var(--bone);
}

.opening {
  min-height: calc(100vh - 6rem);
  align-items: center;
  padding-block: clamp(5rem, 12vh, 10rem);
}

.folio-note {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: 0.55rem;
  color: var(--buried);
  font-family: var(--sans);
  font-size: 0.71rem;
  line-height: 1.35;
}

.folio-note span:last-child {
  max-width: 9rem;
}

.opening-copy {
  max-width: 48rem;
}

.cleo-space {
  margin: 0 0 clamp(4rem, 12vh, 8rem);
  padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--marrow);
  color: var(--buried);
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.4rem);
  font-style: italic;
}

h1,
h2,
p {
  margin-top: 0;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.4rem, 8.8vw, 8.5rem);
  line-height: 0.94;
}

h2 {
  max-width: 17ch;
  margin-bottom: 1.3rem;
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
  line-height: 1.02;
}

.lede,
.manifest p,
.entry-panel > div > p,
.appendix p {
  max-width: 55ch;
}

.lede {
  margin-bottom: 2.3rem;
  color: var(--buried);
  font-size: clamp(1.2rem, 1.08rem + 0.55vw, 1.7rem);
}

.primary-action {
  min-height: 3.15rem;
  border: 1px solid var(--interred);
  border-radius: 2px;
  padding: 0.7rem 1.15rem;
  background: var(--interred);
  color: var(--ash);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--buried);
}

.primary-action:disabled {
  border-color: var(--marrow);
  background: var(--marrow);
  cursor: wait;
}

.manifest,
.student-entry {
  padding-block: clamp(5rem, 11vw, 9rem);
}

.manifest > div,
.entry-panel {
  max-width: 48rem;
}

.quiet-link {
  color: var(--buried);
  font-family: var(--sans);
  font-size: 0.88rem;
  text-decoration-color: var(--marrow);
  text-underline-offset: 0.35em;
}

.entry-form {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--marrow);
}

.entry-form label {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 650;
}

.field-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

input {
  width: 100%;
  min-height: 3.15rem;
  border: 1px solid var(--marrow);
  border-radius: 2px;
  padding: 0.65rem 0.85rem;
  background: var(--ash);
  color: var(--entombed);
  font-family: var(--sans);
  font-size: 1rem;
}

input:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--entombed);
  outline-offset: 3px;
}

.fine-print,
.status,
.appendix-state {
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.55;
}

.fine-print {
  max-width: 60ch;
  margin-top: 0.75rem;
  color: var(--buried);
}

.status {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: var(--buried);
}

.status[data-error="true"] {
  font-weight: 650;
}

.appendix {
  margin-top: 2.5rem;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--marrow);
  background: var(--bleached);
}

.appendix-state {
  margin-bottom: 2rem;
  color: var(--buried);
}

footer {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--buried);
  font-family: var(--sans);
  font-size: 0.75rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .seam {
    left: 1.5rem;
  }

  .site-header,
  main > section,
  footer {
    width: calc(100% - 3rem);
    margin-left: 1.5rem;
    padding-left: 1.5rem;
  }

  .site-header {
    min-height: 5rem;
  }

  nav a {
    display: none;
  }

  main > section {
    grid-template-columns: 1fr;
  }

  .opening {
    min-height: calc(100svh - 5rem);
  }

  .folio-note {
    min-height: 3rem;
    flex-direction: row;
    margin-bottom: 2.5rem;
  }

  .folio-note span:last-child {
    text-align: right;
  }

  .field-line {
    grid-template-columns: 1fr;
  }

  .field-line .primary-action {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
  }
}

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