/* One stylesheet for the whole site. Themes are set by a class on <body>. */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #55565b;
  --line: #dcdcd8;
  --accent: #2a4fa0;
  --accent-ink: #ffffff;
  --hero-a: #f1f1ee;
  --hero-b: #e8e8e4;
  --todo-bg: #fff4c2;
  --todo-text: #3d3200;
  --focus: #2a4fa0;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --surface: #1e1e21;
    --text: #f2f2f0;
    --muted: #b0b0b5;
    --line: #34343a;
    --accent: #a9c1f7;
    --accent-ink: #141416;
    --hero-a: #1e1e21;
    --hero-b: #18181b;
    --todo-bg: #3d3200;
    --todo-text: #fff4c2;
    --focus: #a9c1f7;
  }
}

/* Awake Again: the icon's soft pink and lilac. */
.theme-aa {
  --bg: #fff8f3;
  --surface: #ffffff;
  --text: #2e2a3a;
  --muted: #5a5466;
  --line: #eadbe4;
  --accent: #6b3f73;
  --accent-ink: #ffffff;
  --hero-a: #f5d3df;
  --hero-b: #d7d3f1;
  --focus: #6b3f73;
}

@media (prefers-color-scheme: dark) {
  .theme-aa {
    --bg: #1c1822;
    --surface: #262030;
    --text: #f3eef6;
    --muted: #c4bccc;
    --line: #3a3244;
    --accent: #f5d3df;
    --accent-ink: #2e2a3a;
    --hero-a: #3a2a3c;
    --hero-b: #2b2846;
    --focus: #f5d3df;
  }
}

/* Therma: the Kiln palette. Ember coral #F5533A, deep petrol #128B86, Ember Light #F4EEE7. */
.theme-therma {
  --bg: #f4eee7;
  --surface: #fbf8f4;
  --text: #1e1b19;
  --muted: #554d47;
  --line: #e2d8cd;
  --accent: #0b6662;
  --accent-ink: #ffffff;
  --hero-a: #f4eee7;
  --hero-b: #ecdfd2;
  --ember: #f5533a;
  --petrol: #128b86;
  --focus: #0b6662;
}

@media (prefers-color-scheme: dark) {
  .theme-therma {
    --bg: #121414;
    --surface: #1b1e1e;
    --text: #f4eee7;
    --muted: #bdb5ad;
    --line: #2e3333;
    --accent: #5fd0c9;
    --accent-ink: #121414;
    --hero-a: #1d1716;
    --hero-b: #121414;
    --focus: #5fd0c9;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  top: 0.75rem;
}

header.site {
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 3.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

header.site .home {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

header.site nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header.site nav li {
  margin: 0;
}

header.site nav a {
  display: inline-block;
  padding: 0.5rem 0;
}

header.site nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

main {
  padding: 2rem 0 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--muted);
}

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

/* Landing: one screen. */
.landing {
  min-height: calc(100svh - 3.5rem - 4.5rem);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--hero-a), var(--hero-b));
  padding: 2rem 0;
}

.landing .wrap {
  text-align: center;
}

.landing img.icon {
  width: 7rem;
  height: 7rem;
  border-radius: 22.5%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.landing h1 {
  margin-top: 1rem;
}

.landing .points {
  display: inline-block;
  text-align: left;
  margin: 0.5rem auto 1.25rem;
  padding-left: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.theme-therma .badge {
  background: var(--ember);
  color: #1e1b19;
}

.landing .links {
  margin-top: 1rem;
}

/* Cards on the home page. */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.cards li + li {
  margin-top: 0;
}

.card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  height: 100%;
}

.card img {
  width: 4rem;
  height: 4rem;
  border-radius: 22.5%;
  flex: none;
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0 0 0.5rem;
}

.card .links {
  margin: 0;
  font-size: 0.9375rem;
}

/* Long-form pages. */
.doc h2 {
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-left: 4px solid currentColor;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

dl.faq dt {
  font-weight: 700;
  margin-top: 1.25rem;
}

dl.faq dd {
  margin: 0.25rem 0 0;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

footer.site p {
  margin: 0;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 2.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.theme-therma .points li::marker {
  color: var(--petrol);
}
