:root {
  color-scheme: light;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #172033;
  --muted: #4f5d75;
  --line: #d8dee8;
  --link: #075f45;
  --focus: rgba(8, 116, 95, 0.28);
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--background);
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(52px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  font-weight: 800;
}

a {
  color: var(--link);
  font-weight: 800;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

article {
  display: grid;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

p,
li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.eyeline,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #090d12;
    --surface: #121923;
    --text: #f0f5f8;
    --muted: #b7c1cc;
    --line: #344150;
    --link: #5ad8bc;
    --focus: rgba(90, 216, 188, 0.42);
  }
}

@media (max-width: 520px) {
  article {
    padding: 16px;
  }

  h1 {
    font-size: 2.25rem;
  }
}
