:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6b6b6b;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #8f8f8f;
  }
}

* {
  box-sizing: border-box;
}

:where(body, main, main *, .site-footer *) {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: 100%;
  padding: 24px;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

main h1 {
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

main > p {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

main > p.tagline {
  color: var(--fg);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  letter-spacing: 0.01em;
  text-transform: none;
  margin-top: -4px;
  margin-bottom: 12px;
}

main > p.plain {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.9375rem;
}

main button,
a.button {
  appearance: none;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  padding: 12px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

main button:hover,
a.button:hover {
  background: var(--fg);
  color: var(--bg);
}

main button:disabled {
  opacity: 0.4;
  cursor: default;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 0.8125rem;
}

.site-footer a,
button.link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button.link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.site-footer a:hover,
button.link:hover {
  color: var(--fg);
  background: transparent;
}

/* Home: one full-screen split page. The brand story is dark in both schemes; the sign-in side follows
   the system scheme. The halves stack below 48em. */
body.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: none;
  place-items: stretch;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  text-align: left;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: clamp(32px, 6vw, 72px);
  background: radial-gradient(120% 90% at 30% 35%, #4a4a4a 0%, #1f1f1f 50%, #050505 100%);
  color: #ffffff;
}

.story .brand {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
}

.story-body {
  margin-top: auto;
}

.story .display {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.story .beat {
  display: block;
}

.story .rule {
  width: 4rem;
  height: 2px;
  margin: 28px 0 20px;
  background: rgba(255, 255, 255, 0.7);
}

.story .mission {
  max-width: 34ch;
  color: #dcdcdc;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(32px, 6vw, 72px);
}

main.signin {
  display: block;
  width: 100%;
  max-width: 26rem;
  margin: auto 0;
}

.signin h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.signin .intro,
.signin .error {
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}

.signin .intro {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.signin .agreement {
  margin: 28px 0 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.55;
}

.signin .agreement a,
.signin .learn {
  color: var(--fg);
  text-underline-offset: 3px;
}

.btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--fg);
  border-radius: 12px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--fg);
  color: var(--bg);
}

.btn:hover {
  background: var(--fg);
  color: var(--bg);
  text-decoration: underline;
}

#signed-in {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.signin .who {
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.signin .error {
  margin-top: 12px;
  color: var(--fg);
}

.signin .learn {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
}

.panel .site-footer nav {
  justify-content: flex-start;
}

@media (max-width: 47.99em) {
  body.split-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .story {
    gap: 32px;
  }
}

/* The tagline builds in once (ends by 3.4 s, under WCAG 2.2.2's 5 s): each beat sharpens out of a blur,
   the first steps back while the second arrives, then the whole line comes up together. */
@media (prefers-reduced-motion: no-preference) {
  .story .beat {
    animation: beat-first 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }

  .story .beat + .beat {
    animation-name: beat-second;
  }
}

@keyframes beat-first {
  0% { opacity: 0; filter: blur(12px); }
  22% { opacity: 1; filter: blur(0); }
  45% { opacity: 1; }
  58% { opacity: 0.5; }
  85% { opacity: 0.5; }
  100% { opacity: 1; filter: blur(0); }
}

@keyframes beat-second {
  0%, 45% { opacity: 0; filter: blur(12px); }
  68% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; filter: blur(0); }
}

/* "Your Privacy Choices" switch on the Privacy page */
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
}

.choice input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--fg);
}

.choice label {
  font-weight: 600;
}

/* Long-form legal pages */
body.doc {
  display: block;
  text-align: left;
  padding: 48px 24px 32px;
}

body.doc .site-footer {
  padding-top: 48px;
}

.back {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
}

.back:hover {
  color: var(--fg);
}

main.prose {
  display: block;
  max-width: 68ch;
  margin: 0 auto;
  padding-top: 16px;
  font-size: 1rem;
  line-height: 1.65;
}

main.prose h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 8px;
}

main.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 40px 0 8px;
}

main.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 4px;
}

main.prose p,
main.prose ul {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

main.prose ul {
  padding-left: 1.25em;
}

main.prose li {
  margin-bottom: 6px;
}

main.prose p.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

main.prose .actions {
  margin-top: 40px;
}

main.prose .meta {
  color: var(--muted);
  font-size: 0.875rem;
}

main.prose .note {
  border-left: 2px solid var(--fg);
  padding-left: 16px;
  margin: 24px 0;
}

main.prose a {
  color: var(--fg);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}
