:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --bg-glow: #e8efe9;
  --text: #1f2a30;
  --muted: #5d6a70;
  --line: #dcdad2;
  --accent: #2f4858;
  --accent-hover: #3c5b6e;
  --on-accent: #ffffff;
  --ghost-hover: rgba(47, 72, 88, 0.08);
  --focus: #7aa6b8;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171a;
    --bg-glow: #18252a;
    --text: #e7ebea;
    --muted: #9aa6a9;
    --line: #2a3438;
    --accent: #9cc3d0;
    --accent-hover: #b6d4de;
    --on-accent: #10181c;
    --ghost-hover: rgba(156, 195, 208, 0.1);
    --focus: #9cc3d0;
  }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 16px;
  background: radial-gradient(60rem 40rem at 50% -10%, var(--bg-glow), transparent 70%), var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.top,
main,
.bottom {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.top {
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 64px;
}

h1 {
  margin: 0;
  font: 500 clamp(2.1rem, 6.5vw, 3.2rem) / 1.12 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  margin: 20px 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 550;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  background: var(--accent-hover);
}

.button.ghost {
  border-color: var(--line);
}

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

.note {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Signed in on app.nibloft.com (signed-in.js): "Open workspace" takes the place of "Log in" and "Register". */
:root[data-signed-in] .signed-out,
:root:not([data-signed-in]) .signed-in {
  display: none;
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.bottom a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.bottom a:hover {
  text-decoration-color: currentColor;
}

@media (max-width: 480px) {
  .actions .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
