:root {
  --bg: #f6f5f1;
  --fg: #16181d;
  --muted: #6b7078;
  --accent: #0f8a5f;
  --rule: #dddbd4;
  --field: #ffffff;
  --danger: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --fg: #eceae4;
    --muted: #8b9099;
    --accent: #3ddc97;
    --rule: #24282e;
    --field: #16191d;
    --danger: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status.muted {
  color: var(--muted);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.75rem, 11vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.tld {
  color: var(--muted);
  font-weight: 400;
}

.lede {
  max-width: 32rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

/* Sign-in and signed-in pages */

main.narrow {
  max-width: 24rem;
}

main.wide {
  justify-content: flex-start;
  padding-top: 2.5rem;
}

.status a {
  color: inherit;
  text-decoration: none;
}

.title {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.form {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

label {
  margin: 1rem 0 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}

input[type='text'],
input[type='password'] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--field);
  color: var(--fg);
  font: inherit;
}

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

button {
  margin-top: 1.75rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.quiet {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 400;
}

.alert,
.note {
  margin: 1.25rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.925rem;
}

.alert {
  border: 1px solid var(--danger);
  color: var(--danger);
}

.note {
  padding-left: 0;
  color: var(--muted);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.bar form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.who {
  color: var(--muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.empty {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--rule);
  border-radius: 0.75rem;
  text-align: center;
}

.empty p {
  margin: 0;
}

.empty .muted-text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.925rem;
}

.signin {
  align-self: flex-start;
  margin-top: 2rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  color: var(--fg);
  font-size: 0.95rem;
  text-decoration: none;
}

.signin:hover {
  border-color: var(--muted);
}

footer {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

footer p {
  margin: 0;
}
