:root {
  color-scheme: light;
  --paper: #fcfcfa;
  --ink: #11110f;
  --rule: #d7d7d2;
  --muted: #8b8b83;
  --button-background: var(--ink);
  --button-foreground: var(--paper);
  --button-hover: #31312d;
  --page-space: clamp(4rem, 11vw, 10rem);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 20rem;
  margin: 0;
  background: #e8e8e4;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

body.photo-theme {
  background: transparent;
  --ink: #fff;
  --rule: rgb(255 255 255 / 62%);
  --muted: rgb(255 255 255 / 72%);
  --button-background: rgb(255 255 255 / 90%);
  --button-foreground: #494945;
  --button-hover: #fff;
}

body.photo-theme::before {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  content: "";
  background:
    var(--backdrop, none) center / cover no-repeat,
    linear-gradient(160deg, #6b82a6 0%, #8ba3c0 34%, #d2a38c 62%, #8e8ea0 100%)
      #3f3f3d;
}

body.backdrop {
  --backdrop: url("/static/background.webp");
}

a {
  color: inherit;
}

.site-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 76rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.3rem, 4vw, 3rem);
  background: var(--paper);
}

.photo-theme .site-shell {
  background: transparent;
}

.photo-theme .site-header,
.photo-theme .site-content,
.photo-theme .site-footer {
  text-shadow: 0 1px 12px rgb(0 0 0 / 42%);
}

.site-header,
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-header {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 2rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 2rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.site-nav a {
  font-weight: 700;
  text-decoration: none;
}

.header-signout {
  margin: 0;
}

.header-signout button {
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
}

.site-content {
  width: min(100%, 64rem);
  margin: 0 auto;
  padding-block: var(--page-space);
}

.admin .site-shell {
  width: 100%;
  max-width: none;
  padding: 1.25rem;
}

.admin .site-content {
  width: 100%;
  max-width: none;
  padding-block: 0;
}

.admin table {
  width: 100%;
  border: 1px solid var(--rule);
  border-collapse: collapse;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

.admin th,
.admin td {
  padding: 0.375rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.admin nav {
  margin-bottom: 1.5rem;
}

.table-scroll {
  overflow-x: auto;
}

.site-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.site-footer > :last-child {
  text-align: right;
}

.site-footer a {
  text-underline-offset: 0.18em;
}

.site-footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  opacity: 0.7;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 1fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
  padding: 0;
}

.eyebrow {
  margin: 0 0 1.3rem;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.home-intro h1 {
  max-width: 11ch;
  margin: 0;
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(3.5rem, 8vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.91;
  word-spacing: 0.035em;
}

.home-intro > p:last-child {
  max-width: 37ch;
  margin: 1.45rem 0 0;
  font-size: 1.06rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.prose {
  max-width: 42rem;
}

.prose > h1:first-child {
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-wrap: balance;
}

.prose h2 {
  margin: 2.6rem 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-wrap: balance;
  text-transform: uppercase;
}

.prose p {
  max-width: 62ch;
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.prose ul {
  max-width: 62ch;
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  font-size: 1.02rem;
  line-height: 1.6;
}

.prose a {
  text-underline-offset: 0.18em;
}

.prose--justify p,
.prose--justify li {
  text-align: justify;
  hyphens: auto;
}

.form-page {
  width: min(100%, 28rem);
  padding: 0;
}

.form-page--wide {
  width: min(100%, 38rem);
}

.form-page h1 {
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-wrap: balance;
}

.form-page p {
  text-wrap: pretty;
}

.form-stack {
  display: grid;
  gap: 1.5rem;
}

.form-stack + .form-stack {
  margin-top: 1.5rem;
}

.form-stack--inline {
  display: flex;
  align-items: end;
  gap: 1rem;
}

.form-stack--inline .form-label {
  flex: 0 0 auto;
}

.form-label {
  display: grid;
  gap: 0.42rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.15;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-control {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  text-shadow: none;
}

.photo-theme .form-control {
  background: rgb(0 0 0 / 18%);
}

.form-control::placeholder {
  color: var(--muted);
}

.form-grid:disabled .form-control {
  border-color: transparent;
  opacity: 0.5;
}

.form-control--inline {
  width: min(100%, 20rem);
}

.form-stack > button,
.form-stack > .button-link {
  justify-self: start;
}

.signup {
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.signup h2 {
  margin: 0 0 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}

button,
.button-link {
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0;
  background-color: var(--button-background);
  color: var(--button-foreground);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1;
  cursor: pointer;
  text-shadow: none;
  transition:
    background-color 150ms ease-out,
    scale 100ms ease-out;
}

.home .signup button {
  margin-top: 0.35rem;
}

button:hover,
.button-link:hover {
  background-color: var(--button-hover);
}

button:active,
.button-link:active {
  scale: 0.96;
}

.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header a:focus-visible,
.site-footer a:focus-visible,
.form-control:focus-visible,
button:focus-visible,
.button-link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.form-notice,
.form-error {
  display: flex;
  align-items: center;
  min-height: 2.9rem;
  margin: 0 0 1.5rem;
  padding: 0.65rem 0.8rem;
  border-left: 2px solid var(--ink);
  background: #f1f1ed;
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-notice {
  width: calc(50% - 0.5rem);
  border-left-color: #7d9c72;
}

.form-error {
  border-left-color: #b04a3a;
}

.photo-theme .form-notice,
.photo-theme .form-error {
  background: rgb(0 0 0 / 18%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 56rem) {
  .site-shell {
    padding: 1.3rem;
  }

  .home-layout {
    grid-template-columns: 1fr;
    padding: 5rem 0;
  }

  .home-intro h1 {
    font-size: clamp(3.2rem, 15vw, 4.7rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-notice {
    width: 100%;
  }

  .field-wide {
    grid-column: auto;
  }

  .form-stack--inline {
    display: grid;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer > :last-child {
    text-align: center;
  }
}
