:root {
  color-scheme: light;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 20px;
  color: #17202b;
  background: #f3f4f5;
  --night: #081522;
  --gold: #c9a84c;
  --line: #cbd1d7;
  --measure: 74rem;
}

* { box-sizing: border-box; }

body { margin: 0; background: #f3f4f5; }

a { color: inherit; }
a:focus-visible { outline: 3px solid #1667a8; outline-offset: 4px; }

.lesson-mast {
  min-height: 5rem;
  padding: 1rem max(1.25rem, calc((100% - var(--measure)) / 2));
  background: var(--night);
  color: #fff;
  border-bottom: 1px solid #35414c;
}

.lesson-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font: 600 1.3rem/1 "Cormorant Garamond", serif;
  letter-spacing: .15em;
}

.lesson-brand img { width: 2.1rem; height: 2.1rem; }
.lesson-brand span span { color: var(--gold); }

.lesson-shell {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.lesson-intro { max-width: 48rem; margin-bottom: 3.5rem; }
.lesson-kicker { color: #765d19; font-family: "Space Mono", ui-monospace, monospace; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lesson-brand { font-family: "Saira", system-ui, sans-serif; font-weight: 700; letter-spacing: .06em; }

h1, h2, h3 {
  font-family: "Saira", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.08;
}

h1 { margin: .3rem 0 1rem; font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { margin: 2.2rem 0 .7rem; font-size: clamp(1.45rem, 3vw, 2rem); }
p, li { line-height: 1.65; }

.lesson-state[data-state="loading"],
.lesson-state[data-state="empty"],
.lesson-state[data-state="error"] {
  min-height: 12rem;
  display: grid;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
}

.lesson-state[data-state="error"] { border-left: 5px solid #235a86; padding-left: 1.2rem; }

.lesson-list { display: grid; gap: 4rem; }
.lesson-card { max-width: 52rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.lesson-summary { font-size: 1.2rem; max-width: 42rem; }
.lesson-section { margin-top: 2.5rem; }
.lesson-section p, .lesson-section ul { max-width: 42rem; }
.lesson-sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.lesson-sources a { overflow-wrap: anywhere; text-decoration-thickness: 1px; text-underline-offset: .18em; }

.lesson-foot {
  padding: 2.5rem max(1.25rem, calc((100% - var(--measure)) / 2));
  background: var(--night);
  color: #fff;
  border-top: 1px solid #35414c;
}

@media (max-width: 680px) {
  :root { font-size: 18px; }
  .lesson-shell { width: min(calc(100% - 2rem), var(--measure)); padding-top: 3rem; }
  .lesson-intro { margin-bottom: 2.5rem; }
}
