:root {
  color-scheme: light;
  --canvas: #fbfbfb;
  --base: #fff;
  --tint: oklch(97% 0 0);
  --line: oklch(14.5% 0 0 / 10%);
  --hairline: oklch(93.5% 0 0);
  --fill: oklch(92.2% 0 0);
  --brand: oklch(57.72% 0.2324 260);
  --text: oklch(21% 0.006 285.885);
  --subtle: oklch(55.6% 0 0);
  --placeholder: oklch(70.8% 0 0);
  --danger: oklch(50.5% 0.213 27.518);
  --spacing: 4px;
  --content-width: 460px;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--spacing) * 8) calc(var(--spacing) * 2);
  background: var(--canvas);
  color: var(--text);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input { font: inherit; }

.auth-shell {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 5);
  align-self: center;
  margin: 0 auto;
}

.brand {
  width: 280px;
  max-width: 100%;
  height: 50px;
  display: block;
  margin: 0 auto;
  color: #000;
}

.brand-logo {
  width: 280px;
  max-width: 100%;
  height: auto;
  display: block;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  color: var(--subtle);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.auth-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--base);
  text-align: left;
}

.auth-card__body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 8);
}

h1,
p { margin: 0; }

h1 {
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.card-heading {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.card-heading p {
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.information-panel {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  background: var(--tint);
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 4);
}

.signed-in-details {
  display: grid;
  gap: calc(var(--spacing) * 2);
  margin: 0;
  color: var(--subtle);
}

.signed-in-details div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: calc(var(--spacing) * 2);
}

.signed-in-details dt,
.signed-in-details dd { margin: 0; }

.signed-in-details dd {
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  text-overflow: ellipsis;
}

.auth-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.field-label {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.provider-button,
.primary-button {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing) * 2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 calc(var(--spacing) * 4);
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 60ms ease;
  user-select: none;
}

.provider-button {
  justify-content: flex-start;
  gap: calc(var(--spacing) * 3);
  border-color: var(--hairline);
  background: var(--base);
  color: var(--text);
}

.provider-button:hover { background: var(--tint); }

.provider-button:active { background: var(--fill); }

.provider-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.provider-button .sign-out-icon {
  width: 26px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.primary-button {
  border-color: color-mix(in oklch, var(--brand), black 10%);
  background: linear-gradient(to bottom, color-mix(in oklch, var(--brand), white 15%), var(--brand));
  color: #fff;
}

.primary-button:hover {
  background: linear-gradient(to bottom, color-mix(in oklch, var(--brand), white 30%), var(--brand));
}

.provider-button:active,
.primary-button:active { transform: translateY(0.5px); }

button:focus-visible,
input:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.divider {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  color: var(--subtle);
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  background: var(--hairline);
  content: "";
}

.divider span {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.request-invite,
#invite-request-form,
.form-row {
  display: flex;
  flex-direction: column;
}

.request-invite {
  position: relative;
  gap: calc(var(--spacing) * 4);
}

#invite-request-form { gap: calc(var(--spacing) * 3); }

#invite-request-form.invite-request-form--hidden {
  visibility: hidden;
  pointer-events: none;
}

.form-row { gap: var(--spacing); }

.invitation-confirmation {
  position: absolute;
  inset: 0 0 auto;
  display: block;
}

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

.confirmation-email {
  overflow-wrap: anywhere;
}

label {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

input {
  width: 100%;
  height: 44px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 calc(var(--spacing) * 3);
  background: var(--base);
  color: var(--text);
  font-size: 14px;
}

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

#turnstile-widget {
  width: 100%;
  min-height: 65px;
}

output {
  color: var(--subtle);
  font-size: 13px;
  line-height: 18px;
}

output:empty { display: none; }

output[data-error="true"] { color: var(--danger); }

.fine-print {
  color: var(--subtle);
  font-size: 13px;
  line-height: 18px;
}

.project-credit {
  min-height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 18px;
}

.project-credit a {
  color: var(--subtle);
  text-decoration: none;
}

.project-credit a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: calc(var(--spacing) * 8) calc(var(--spacing) * 4) calc(var(--spacing) * 4);
  }

  .brand {
    width: 220px;
    height: auto;
  }

  .auth-card__body { padding: calc(var(--spacing) * 5); }

  h1 {
    font-size: 20px;
    line-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
