/* Colours are the app's own: sand, ink, paper and green in the light theme. */
:root {
  --bg: #e3b564;
  --ink: #17120b;
  --paper: #fff6e3;
  --accent: #0b6b45;
  --on-accent: #fff6e3;
  --muted: #4a3712;
  --shadow: #17120b;
  --red: #b8321e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a14;
    --ink: #f6e9cc;
    --paper: #18281f;
    --accent: #3ccb8c;
    --on-accent: #0e1a14;
    --muted: #b9ae8f;
    --shadow: #e0ae55;
    --red: #e2674f;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

main,
header,
footer .inner {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
}

.mono,
header a,
.label,
footer {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Roboto Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

header a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

header nav {
  display: flex;
  gap: 1.25rem;
}

header nav a[aria-current='page'] {
  border-bottom: 3px solid var(--ink);
}

h1 {
  margin: 2.5rem 0 0.5rem;
  font-size: clamp(2.6rem, 11vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
}

h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 800;
}

p,
ul {
  margin: 0.6rem 0;
}

ul {
  padding-inline-start: 1.2rem;
}

li {
  margin: 0.3rem 0;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 0.18em;
}

.label {
  color: var(--muted);
  margin: 0;
}

.card {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
}

.card > :first-child {
  margin-top: 0;
}

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

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

.never {
  border-inline-start: 6px solid var(--red);
  padding-inline-start: 0.9rem;
}

.button {
  display: inline-block;
  margin: 0.4rem 0.6rem 0.4rem 0;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  font-weight: 800;
  text-decoration: none;
}

.button.plain {
  background: var(--paper);
  color: var(--ink);
}

footer {
  margin-top: 4rem;
  color: var(--muted);
}

footer .inner {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

/* A strip of woven triangles, like the border along the bottom of the app's screens. */
.kilim {
  height: 16px;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background:
    linear-gradient(135deg, var(--ink) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(225deg, var(--ink) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(315deg, var(--accent) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, var(--accent) 25%, transparent 25%) 0 0 / 16px 16px,
    var(--paper);
}
