:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --ink: #1f2225;
  --muted: #6c6f73;
  --line: #d8d2c7;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 1rem;
  border: 1px solid var(--line);
  pointer-events: none;
}

.page {
  display: flex;
  min-height: 100svh;
  width: min(100% - 3rem, 980px);
  margin: 0 auto;
  padding: 10rem 0 4rem;
  flex-direction: column;
  justify-content: center;
}

.label,
h1 {
  margin: 0;
}

.label {
  color: var(--muted);
  font-size: 0.875rem;
}

h1 {
  margin-top: 0.75rem;
  font-size: clamp(3.25rem, 11vw, 8rem);
  line-height: 0.95;
  font-weight: 700;
}

a {
  width: fit-content;
  max-width: 100%;
  margin-top: 2rem;
  color: var(--ink);
  font-size: clamp(0.875rem, 4vw, 1rem);
  overflow-wrap: anywhere;
  text-underline-offset: 0.35rem;
}

a:hover,
a:focus-visible {
  color: var(--muted);
}

.site-footer {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-footer a,
.text-button {
  display: inline-flex;
  min-height: 44px;
  margin: 0;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

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

.text-button:hover,
.text-button:focus-visible {
  color: var(--ink);
}

.consent-banner {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 2;
  width: min(36rem, calc(100% - 4rem));
  padding: 1.5rem;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner h2 {
  margin: 0;
  font-size: 1rem;
}

.consent-banner p {
  margin: 0.75rem 0 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.consent-banner a {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
}

.consent-actions {
  display: flex;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.consent-actions button {
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.consent-actions button:last-child {
  background: transparent;
  color: var(--ink);
}

.consent-actions button:hover,
.consent-actions button:focus-visible {
  border-color: var(--muted);
  background: var(--muted);
  color: var(--paper);
}

@media (max-width: 640px) {
  body::before {
    inset: 0.75rem;
  }

  .page {
    width: min(100% - 2rem, 980px);
    padding: 6rem 0 3rem;
  }

  .site-footer {
    right: 1.25rem;
    bottom: 1.25rem;
  }

  .consent-banner {
    right: 1.25rem;
    bottom: 1.25rem;
    width: calc(100% - 2.5rem);
    padding: 1.25rem;
  }

  .consent-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .consent-actions button {
    width: 100%;
  }
}

.document-page {
  display: block;
  min-height: 100svh;
  width: min(100% - 3rem, 760px);
  margin: 0 auto;
  padding: 5rem 0;
}

.document-page header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.document-page h1 {
  max-width: 12ch;
  margin-top: 0.75rem;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1;
}

.document-page h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.document-page p,
.document-page li {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.document-page p {
  margin: 0.75rem 0;
}

.document-page ul {
  margin: 0.75rem 0;
  padding-left: 1.4rem;
}

.document-page a {
  margin-top: 0;
  font-family: inherit;
  font-size: inherit;
}

.document-page .meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.document-page nav,
.document-page footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.document-page nav {
  margin-top: 3rem;
}

.document-page footer {
  margin-top: 2rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .document-page {
    width: min(100% - 2rem, 760px);
    padding: 3.5rem 0;
  }
}

.invite-page {
  display: flex;
  min-height: 100svh;
  width: min(100% - 3rem, 760px);
  margin: 0 auto;
  padding: 5rem 0 3rem;
  flex-direction: column;
  justify-content: center;
}

.invite-header {
  max-width: 700px;
}

.invite-header h1 {
  max-width: 9ch;
  font-size: clamp(3rem, 10vw, 6rem);
}

.invite-intro,
.invite-status,
.invite-noscript {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

.invite-intro {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.invite-card {
  margin-top: 3rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 34%);
}

.invite-card-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.invite-code {
  display: block;
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 9vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  overflow-wrap: anywhere;
}

.invite-status {
  margin: 1.25rem 0 0;
  color: var(--muted);
}

.invite-actions {
  display: flex;
  margin-top: 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.invite-actions[hidden],
.invite-button[hidden] {
  display: none;
}

.invite-button {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.invite-button-primary {
  background: var(--ink);
  color: var(--paper);
}

.invite-button-primary:hover,
.invite-button-primary:focus-visible {
  background: var(--muted);
  color: var(--paper);
}

.invite-button-secondary {
  background: transparent;
  color: var(--ink);
}

.invite-button-secondary:hover,
.invite-button-secondary:focus-visible {
  border-color: var(--muted);
  color: var(--muted);
}

.invite-noscript {
  margin-top: 1rem;
  color: var(--muted);
}

.invite-nav {
  display: flex;
  margin-top: 2rem;
  gap: 1.5rem;
}

.invite-nav a {
  margin: 0;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .invite-page {
    width: min(100% - 2rem, 760px);
    padding: 3.5rem 0 2rem;
  }

  .invite-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .invite-button {
    width: 100%;
  }
}
