/* MemSpark — memspark.app
   Hand-rolled, no build step. Paper content palette + indigo accent,
   mirrored from the app's theme tokens (src/theme/colors.ts, themes.ts).
   No gradients, anywhere, ever. */

:root {
  --background: #f4f2ee;
  --surface: #ffffff;
  --surface-border: #e5e2dc;
  --hairline: #dcd9d2;
  --fill: #edeae4;
  --label: #1d1b17;
  --secondary-label: #5c594f;
  --tertiary-label: #8c887c;
  --accent: #4c5bd4;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151412;
    --surface: #201f1c;
    --surface-border: #35332e;
    --hairline: #33312c;
    --fill: #2a2925;
    --label: #f1efe9;
    --secondary-label: #b0ac9f;
    --tertiary-label: #7c786c;
    --accent: #8b93f8;
    --on-accent: #14162b;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Header / nav */

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 40px;
}

.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--label);
  text-decoration: none;
}

.wordmark .spark {
  color: var(--accent);
}

nav.site a {
  color: var(--secondary-label);
  text-decoration: none;
  font-size: 15px;
  margin-left: 18px;
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--accent);
}

/* Type */

h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 40px 0 8px;
}

h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 24px 0 4px;
}

p {
  margin: 0 0 16px;
}

.lede {
  font-size: 20px;
  color: var(--secondary-label);
  margin-bottom: 28px;
}

a {
  color: var(--accent);
}

small,
.footnote {
  font-size: 14px;
  color: var(--tertiary-label);
}

ul {
  padding-left: 22px;
  margin: 0 0 16px;
}

li {
  margin-bottom: 6px;
}

/* Cards (paper surfaces, hairline borders) */

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Buttons */

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.button.secondary {
  background: var(--surface);
  color: var(--label);
  border-color: var(--surface-border);
}

.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* Footer */

footer.site {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--tertiary-label);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer.site a {
  color: var(--tertiary-label);
}

footer.site a:hover {
  color: var(--accent);
}

/* Legal pages */

.legal h2 {
  font-size: 19px;
}

.updated {
  color: var(--tertiary-label);
  font-size: 14px;
  margin-bottom: 32px;
}

/* FAQ */

details {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

details summary {
  font-weight: 600;
  cursor: pointer;
}

details p {
  margin: 10px 0 0;
  color: var(--secondary-label);
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  .lede {
    font-size: 18px;
  }
  header.site {
    flex-direction: column;
    gap: 8px;
  }
  nav.site a {
    margin-left: 0;
    margin-right: 16px;
  }
}
