/* The website's one stylesheet.
   The color variables match desktop_app/assets/main.css, so the site and the
   app look like one product. If you change a color in one, change it in both.
   Dark mode follows the visitor's OS setting. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --border: #e2e2e5;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --danger: #d70015;
  --discord: #5865f2;
  --hover: rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161617;
    --surface: #1f1f21;
    --border: #2c2c2f;
    --text: #f5f5f7;
    --text-muted: #98989d;
    --accent: #2997ff;
    --danger: #ff453a;
    --hover: rgba(255, 255, 255, 0.06);
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- Header and footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px;
}

.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.site-nav a:not(.button) {
  color: var(--text-muted);
}

.site-nav a:not(.button):hover {
  color: var(--text);
}

.site-main {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Page content ---------- */

h1 {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

.note {
  color: var(--text-muted);
  font-size: 13px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header .muted {
  margin-top: 4px;
}

.hero {
  text-align: center;
  padding: 72px 0 64px;
}

.hero h1 {
  font-size: 52px;
}

.lead {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 16px auto 32px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card + .card {
  margin-top: 16px;
}

.grid .card + .card {
  margin-top: 0;
}

.narrow {
  max-width: 420px;
  margin: 48px auto 0;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* A card holding rows separated by thin lines (the account page). */
.list {
  padding: 0 24px;
  max-width: 720px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.row + .row {
  border-top: 1px solid var(--border);
}

.row-title {
  font-weight: 600;
}

.alert {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

/* A friendly, non-error message (for example, after paying). */
.notice {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

.page-header .alert,
.page-header .notice {
  margin-top: 16px;
  max-width: 720px;
}

/* A form that sits inline, like the Log out button in the header. */
form.inline {
  display: inline;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, filter 120ms ease;
}

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

.button.small {
  padding: 6px 14px;
  font-size: 14px;
}

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

.button.discord {
  background: var(--discord);
  border-color: var(--discord);
  color: #ffffff;
}

.button.danger {
  color: var(--danger);
}

/* A button as wide as its card (the cancel confirmation). */
.button.full {
  width: 100%;
}

.button.primary:hover,
.button.discord:hover {
  filter: brightness(1.08);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

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

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 36px;
  }

  .row {
    flex-direction: column;
    align-items: flex-start;
  }
}
