/* Shared design system for all lesson pages and the landing page.
   Matches the visual language of the interactive lessons (see
   site/assets/css/dc-lesson.css and site/lessons/its-too-darn-hot-blame-global-dimming/):
   Inter for headings/UI, Source Serif 4 for body copy, a yellow underline/border
   accent (never colored text), dark near-black text, and sharp (unrounded) corners. */

:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --text: #2b2c2d;
  --text-muted: #6c6e6f;
  --accent: #ffcc00;
  --border: #e6e6e4;
  --code-bg: #f5f5f3;
  --callout-bg: #fffbeb;
  --callout-border: #ffcc00;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.site-header .brand {
  font-family: Inter, sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
}

.site-header .brand:hover {
  color: var(--text-muted);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1, h2, h3 {
  font-family: Inter, sans-serif;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.subtitle {
  font-family: Inter, sans-serif;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  font-weight: 600;
}

a:hover {
  color: var(--text-muted);
  border-bottom-color: var(--text);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
}

.back-link:hover {
  color: var(--text);
}

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

li {
  margin-bottom: 0.4rem;
}

code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

.callout {
  background: var(--callout-bg);
  border-left: 3px solid var(--callout-border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout h3 {
  margin-top: 0;
}

.meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: Inter, sans-serif;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.meta span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.2rem 0.75rem;
}

/* Landing page lesson cards */
.lesson-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.lesson-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s ease;
}

.lesson-card:hover {
  border-color: var(--text);
}

.lesson-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.lesson-card p {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer {
  font-family: Inter, sans-serif;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 1.5rem;
}
