* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 1rem/1.5 Arial, Helvetica, sans-serif;
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.15; }
a { color: var(--brand-purple); text-underline-offset: .23em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 5rem)); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead .wrap { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand strong { font-size: .92rem; letter-spacing: .055em; }
.institution { color: var(--muted); font-size: .9rem; }

.hero { color: var(--surface); background: var(--plot-background); }
.hero .wrap { display: grid; grid-template-columns: 1.23fr 1fr; gap: 4rem; align-items: center; padding-block: 2.2rem; }
.hero h1 { font-size: clamp(3rem, 5.5vw, 4.9rem); letter-spacing: -.055em; }
.hero p { margin-top: .8rem; color: var(--plot-text); font-size: 1.075rem; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; margin-top: .85rem; }
.hero-links a { padding-block: .25rem; color: var(--brand-yellow); font-size: .9rem; font-weight: 600; }
.hero-links a:focus-visible { outline-color: var(--brand-yellow); }
.chapter-jump { display: none; }
#chapter-3 { scroll-margin-top: 1rem; }

/* The second plotted curve is the image of the first by a horizontal shear.
   CSS measures y downwards, so the off-diagonal entry changes sign. */
.map { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .65rem; }
.plot {
  position: relative;
  aspect-ratio: 1;
  background-image: linear-gradient(to right, var(--plot-grid) 1px, transparent 1px),
                    linear-gradient(to bottom, var(--plot-grid) 1px, transparent 1px);
  background-size: 20% 20%;
  background-position: 12.5% 12.5%;
}
.plot::before, .plot::after { content: ""; position: absolute; background: var(--plot-axis); }
.plot::before { left: 0; right: 0; top: 50%; height: 1px; }
.plot::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.curve { position: absolute; inset: 30%; z-index: 1; border: 2px solid var(--plot-lilac); border-radius: 50%; background: rgb(220 184 244 / .09); }
.image .curve { transform: matrix(1, 0, -1, 1, 0, 0); border-color: var(--brand-yellow); background: rgb(255 204 51 / .09); }
.point { position: absolute; z-index: 2; top: 30%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--plot-lilac); transform: translate(-50%, -50%); }
.image .point { left: 70%; background: var(--brand-yellow); }
.map-label { display: grid; justify-items: center; color: var(--plot-text); font-family: Georgia, serif; }
.matrix { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: .42em; padding: .05em .32em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.matrix::before, .matrix::after { content: ""; position: absolute; inset-block: 0; width: .22em; border-block: 1px solid; }
.matrix::before { left: 0; border-left: 1px solid; }
.matrix::after { right: 0; border-right: 1px solid; }
.map-arrow { position: relative; width: 2.7rem; height: 1px; margin-top: .65rem; background: currentColor; }
.map-arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }

.chapters { padding-block: 2.1rem 3rem; }
.chapters h2 { font-size: 2rem; letter-spacing: -.035em; margin-bottom: .5rem; }
.chapter-notice { margin-bottom: 1.1rem; color: var(--muted); }
.chapter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapter {
  display: grid;
  grid-template-columns: 5.4rem minmax(12rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.chapter.open { background: var(--tint); box-shadow: inset 3px 0 var(--brand-purple); }
.chapter-number { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chapter h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -.023em; }
.status { display: flex; align-items: center; gap: .42rem; margin-top: .25rem; color: var(--muted); font-size: .8rem; }
.status::before { content: ""; width: .48rem; height: .48rem; border: 1px solid currentColor; border-radius: 50%; }
.open .status { color: var(--brand-purple); }
.open .status::before { background: currentColor; }
.resources { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.45rem; }
.resources a { display: inline-flex; align-items: center; gap: .42em; min-height: 36px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.resources a:hover { text-decoration: underline; }
@media (min-width: 821px) {
  .resources a:last-child { min-width: 10rem; }
}
.resource-arrow { font-weight: 400; }

.placeholder { padding-block: clamp(2rem, 6vw, 5rem); }
.back-link { display: inline-block; margin-bottom: 2rem; }
.resource-type { color: var(--brand-purple); font-size: .85rem; font-weight: 700; }
.placeholder h1 { margin-block: .5rem 1.3rem; max-width: 28ch; font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -.045em; }
.notice { margin-top: 1.6rem; padding: 1rem 1.25rem; border-inline-start: 3px solid var(--brand-purple); background: var(--tint); max-width: 40rem; }
.notice strong { display: block; font: normal 1.45rem/1.25 Georgia, serif; }

@media (max-width: 820px) {
  .wrap { width: min(100% - 3rem, 700px); }
  .hero .wrap { gap: 1.5rem; }
  .chapter-jump { display: inline-block; }
  .chapter { grid-template-columns: 5.1rem 1fr; gap: .2rem .75rem; }
  .resources { grid-column: 2; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 2.25rem); }
  .institution { max-width: 9rem; text-align: right; line-height: 1.25; font-size: .8rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 1.7rem; }
  .map { max-width: 285px; width: 100%; }
  .hero p { font-size: 1rem; }
  .chapters { padding-top: 1.5rem; }
  .chapter { grid-template-columns: 1fr; gap: .3rem; padding: .95rem .75rem; }
  .resources { grid-column: 1; gap: 0 1rem; }
  .resources a { min-height: 42px; }
}
