/*
 * ondello.app: one stylesheet for every page. System fonts, no images and
 * nothing loaded from elsewhere (docs/decisions.md, "The website, as
 * built"). The colours are the app's own values (CLAUDE.md, "Design
 * system"): background, surface, text, secondary text and accent text, in
 * light and dark.
 */

:root {
  color-scheme: light dark;
  --background: #f3f4f6;
  --surface: #ffffff;
  --text: #111827;
  --secondary: #5b6270;
  --accent-text: #b3361f;
  --rule: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #18181b;
    --surface: #27272a;
    --text: #f4f4f5;
    --secondary: #b5b5bd;
    --accent-text: #f4a08a;
    --rule: #3f3f46;
  }
}

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

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

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

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

main {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem 2rem;
}

@media (min-width: 40rem) {
  main {
    padding: 2rem 2.5rem 2.5rem;
  }
}

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

h1 {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3125rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  margin: 1.25rem 0 0.375rem;
}

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

ul,
ol {
  padding-left: 1.375rem;
}

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

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

a:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 2px;
}

.meta {
  color: var(--secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.125rem;
}

blockquote {
  border-left: 3px solid var(--rule);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--text);
}

.language-block + .language-block {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.site-footer {
  color: var(--secondary);
  font-size: 0.9375rem;
  margin-top: 1.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}
