:root {
  color-scheme: light;
  --background: #f3f7f3;
  --surface: #ffffff;
  --text: #172a1d;
  --muted: #4a6050;
  --border: #bbcebf;
  --accent: rgb(0, 85, 34);
  --highlight: #dbefdf;
  --error: #ff0000;
  --error-light: #ffcccc;
  font-family: Garamond, 'Times New Roman', serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #101c15;
  --surface: #192b20;
  --text: #edf6ef;
  --muted: #bdcfc0;
  --border: #496552;
  --accent: #9cdeb0;
  --highlight: #315a3d;
  --error: #ff0000;
  --error-light: #ffcccc;
}

body {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 52rem;
  padding: 2rem 1.25rem;
  color: var(--text);
  background: var(--background);
}

html {
  background: var(--background);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

/* Layout */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);

  h1 {
    font-size: 2rem;
    color: var(--accent);
  }
}

.welcome {
  margin: 1rem, 0;
  font-size: 1.125rem;
}

/* General button */
button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  background: var(--surface);
  font-family: system-ui, sans-serif;

  &:hover {
    border-color: var(--accent);
  }

  &:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
}

/* Index.html */

.reading-controls {
  margin-top: 2rem;

  h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
  }
}

.text-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
