:root {
  --paper: #F6F8F5;
  --ink: #1B2A21;
  --moss: #566B5D;
  --mist: #DCE3DB;
  --amber: #D99A1E;
  --amber-deep: #BD7F12;
  --maxw: 46rem;
}
* { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-size: 112.5%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body { margin: 0; line-height: 1.55; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--mist);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover, a:focus-visible { text-decoration-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* header and navigation, identical on every page */
header.top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.5rem;
}
header.top .home { text-decoration: none; }
nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.95rem; }
nav a { text-decoration: none; color: var(--moss); }
nav a:hover, nav a:focus-visible { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 0.3em; }

/* page openings */
.hero { padding: 4rem 0 2rem; display: grid; grid-template-columns: 1fr 14rem; gap: 1rem 2.5rem; align-items: start; }
.hero .text { grid-column: 1; }
.hero .photo { grid-column: 2; grid-row: 1; margin: 0.6rem 0 0; }
h1 {
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 500; line-height: 1.05; letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  font-variation-settings: "opsz" 72;
}
.lede { font-size: 1.25rem; line-height: 1.45; max-width: 32em; margin: 0; }
.pagehead { padding: 3.5rem 0 1.5rem; }
.pagehead h1 { font-size: clamp(2.1rem, 5vw, 2.8rem); margin-bottom: 0.75rem; }
.pagehead .lede { font-size: 1.15rem; }
.back { font-size: 0.95rem; color: var(--moss); display: inline-block; margin-top: 2.5rem; text-decoration: none; }
.back:hover { color: var(--ink); }

/* the home page map of sections */
.map { margin-top: 1.5rem; }
.map a {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 2rem;
  padding: 1.1rem 0; border-top: 1px solid var(--mist); text-decoration: none;
}
.map a:last-child { border-bottom: 1px solid var(--mist); }
.map .t { font-size: 1.3rem; font-weight: 500; line-height: 1.25; }
.map .l { color: var(--moss); max-width: 58ch; }
.map a:hover .t, .map a:focus-visible .t { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 0.2em; }

/* sections and entries */
section { padding-top: 3rem; }
h2 { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 1.5rem; }
h3 { font-size: 1.3rem; font-weight: 500; line-height: 1.25; margin: 0 0 0.5rem; }
h3 a { text-decoration: none; }
h3 a:hover, h3 a:focus-visible { text-decoration: underline; text-decoration-color: var(--amber); }
.entry {
  display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.25rem 2rem;
  margin-bottom: 2.25rem;
}
.meta { font-size: 0.95rem; color: var(--moss); line-height: 1.4; padding-top: 0.4rem; }
.entry p, .prose p { margin: 0 0 0.75rem; max-width: 62ch; }
.prose h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
.prose ul { max-width: 62ch; padding-left: 1.2rem; margin: 0 0 0.75rem; }
.prose li { margin-bottom: 0.3rem; }
.links { font-size: 0.95rem; }
ul.plain { list-style: none; padding: 0; margin: 0; max-width: 62ch; }
ul.plain li { padding: 0.55rem 0; border-top: 1px solid var(--mist); }
ul.plain li:last-child { border-bottom: 1px solid var(--mist); }

/* tables */
table { border-collapse: collapse; width: 100%; max-width: 62ch; margin: 0.5rem 0 1rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.75rem 0.45rem 0; border-top: 1px solid var(--mist); vertical-align: top; }
th { font-weight: 500; color: var(--moss); }
tr:last-child td { border-bottom: 1px solid var(--mist); }
td.n, th.n { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }

/* figures, charts, photos */
figure { margin: 1.5rem 0; }
figcaption { font-size: 0.95rem; color: var(--moss); margin-top: 0.6rem; font-style: italic; max-width: 62ch; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: inherit; font-size: 15px; fill: var(--ink); }
.chart .muted { fill: var(--moss); }
.chart .grid { stroke: var(--mist); stroke-width: 1; }
.chart .base { stroke: var(--moss); stroke-width: 1; }
.chart .s1 { fill: #8F9C94; }
.chart .s2 { fill: #4F6456; }
.chart .s3 { fill: var(--amber-deep); }
.chart rect:hover { opacity: 0.85; }
.ph {
  border: 1.5px dashed var(--amber); color: var(--moss); font-style: italic;
  padding: 1rem; min-height: 9rem; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 0.95rem;
}
.photo .ph { aspect-ratio: 4 / 5; min-height: 0; }
.hero .photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.poster img { border: 1px solid var(--mist); }
.row { display: grid; gap: 0.75rem; }
.row.three { grid-template-columns: repeat(3, 1fr); }
.row.two { grid-template-columns: repeat(2, 1fr); }
.row img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.row.two img { aspect-ratio: 16 / 9; }
.row figure { margin: 0; }
.row figure img { height: auto; }
.thumb img { border: 1px solid var(--mist); }
figure.small { max-width: 24rem; }
audio { width: 100%; max-width: 62ch; display: block; margin: 0.5rem 0 0.25rem; }
video { width: 100%; max-width: 62ch; height: auto; display: block; margin: 0.5rem 0 0.25rem; background: #000; }
.story p { max-width: 60ch; font-size: 1.1rem; line-height: 1.6; margin: 0 0 1.1rem; }
.poem p { line-height: 1.75; margin: 0 0 1rem; max-width: 50ch; }

/* placeholders for things still to come */
mark.todo {
  background: transparent; color: var(--moss); font-style: italic;
  border-bottom: 1.5px dashed var(--amber); padding: 0 0.1em;
}

footer { margin: 5rem 0 3rem; font-size: 0.95rem; color: var(--moss); max-width: 62ch; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero .photo { grid-column: 1; grid-row: auto; max-width: 14rem; }
  .map a, .entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .meta { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
