@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/figtree-regular.woff2") format("woff2");
}
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/figtree-semibold.woff2") format("woff2");
}

:root {
  --blotter: #1676bc;
  --paper: #fff8ef;
  --ink: #1c2740;
  --ink-soft: #3d4960;
  --tab: #f3c14a;
  --rule: #e4d8c4;
  --note: #ffe9a8;
  --note-ink: #4a3a12;
  --link: #154a96;
  --link-hover: #0c326c;
}

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

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Figtree, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--blotter);
  background-image: url("/images/blotter.webp");
  background-repeat: repeat;
  background-size: 1100px auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 20;
  background: var(--paper);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
}

.skip:focus {
  top: 0.75rem;
}

.blotter {
  min-height: 100vh;
  padding: 1.35rem 0.85rem 2.4rem;
}

.masthead {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.15rem 0 1rem;
}

.brand {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.brand img {
  width: min(280px, 100%);
  height: auto;
}

.menu-toggle {
  flex: 0 0 auto;
  font-family: Figtree, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 2px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 3px solid var(--tab);
  outline-offset: 2px;
}

.workbook {
  max-width: 52rem;
  margin: 0 auto;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(8, 36, 64, 0.28);
  border-radius: 2px 2px 3px 3px;
  padding: 0 1.15rem 1.7rem;
  position: relative;
}

.workbook::before {
  content: "";
  display: block;
  height: 0.7rem;
  margin: 0 -1.15rem 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--rule) 0 2px,
    transparent 2px 14px
  );
  opacity: 0.9;
}

.tabs ul {
  list-style: none;
  margin: 0 -0.4rem 1.15rem;
  padding: 0.35rem 0 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tabs a {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  background: #efe6d4;
  padding: 0.32rem 0.48rem;
  border-radius: 3px 3px 0 0;
}

.tabs a[aria-current="page"],
.tabs a:hover,
.tabs a:focus-visible {
  background: var(--tab);
  color: var(--ink);
}

main {
  min-width: 0;
}

.lede,
.prose p,
.prose li {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  margin: 0.2rem 0 0.85rem;
}

h2 {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  margin: 1.5rem 0 0.6rem;
  font-weight: 600;
}

.kicker {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li {
  margin: 0 0 0.45rem;
}

.hero-figure,
.article-figure {
  margin: 0 0 1.15rem;
}

.hero-figure img,
.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
}

.hero-figure figcaption,
.article-figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.syllabus {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.syllabus li {
  border-bottom: 1px solid var(--rule);
}

.syllabus a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.7rem;
  padding: 0.85rem 0;
  text-decoration: none;
  color: inherit;
}

.syllabus .num {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blotter);
  padding-top: 0.1rem;
}

.syllabus strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.syllabus .excerpt {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.syllabus a:hover strong,
.syllabus a:focus-visible strong {
  color: var(--link);
}

.sticky-note {
  background: var(--note);
  color: var(--note-ink);
  max-width: 16.5rem;
  margin: 1.6rem 0 0 auto;
  padding: 0.85rem 1rem 1rem;
  box-shadow: 2px 3px 0 rgba(28, 39, 64, 0.12);
  transform: rotate(-1.2deg);
  transform-origin: top right;
}

.sticky-note .note-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sticky-note p {
  margin: 0;
}

.sticky-note a {
  color: var(--note-ink);
  font-weight: 600;
}

.next-lesson {
  margin: 1.6rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
}

.next-lesson span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

footer {
  margin-top: 1.8rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

footer p {
  margin: 0;
}

footer nav a {
  color: var(--ink-soft);
}

@media (max-width: 719px) {
  .tabs {
    display: none;
  }

  .tabs.is-open {
    display: block;
  }

  .tabs ul {
    flex-direction: column;
    gap: 0;
    margin: 0 0 1rem;
  }

  .tabs a {
    border-radius: 0;
    padding: 0.55rem 0.2rem;
    background: transparent;
    border-bottom: 1px solid var(--rule);
  }

  .sticky-note {
    max-width: none;
    margin: 1.4rem 0 0;
    transform: none;
  }
}

@media (min-width: 720px) {
  .blotter {
    padding: 1.6rem 1.25rem 3rem;
  }

  .workbook {
    padding: 0 1.8rem 2.1rem;
  }

  .workbook::before {
    margin: 0 -1.8rem 0;
  }

  .menu-toggle {
    display: none;
  }

  .tabs {
    display: block;
  }

  .brand img {
    width: min(320px, 100%);
  }
}
