/* The proposal page. A quiet document of Peter's own, cool and grey, so the
   pink of the pictures is the loudest thing on it. One light theme: it is a
   document that gets printed, and a dark one would fight the pictures. */

:root {
  --paper: #eeedf2;
  --sheet: #ffffff;
  --ink: #1b1a22;
  --pencil: #565463;
  --rule: #d5d3dd;
  --link: #2c3b74;
  --mark: #16181d;
  --guess: #f8f7fb;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Public Sans', system-ui, sans-serif;

  --measure: 40rem;
  --wide: 76rem;
  --gutter: 1rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

main {
  padding: 3.5rem var(--gutter) 5rem;
}

/* Text keeps to a letter's measure. Pictures run wider. */
.col,
section > h2,
section > h3,
section > p,
section > ul,
section > ol:not(.notes),
.lede,
.contents {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  margin: 0 auto 1.25rem;
  max-width: var(--measure);
  font-weight: 500;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.1rem);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.33rem;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}

p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

li + li {
  margin-top: 0.35rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
}

.small {
  font-size: 0.9rem;
  color: var(--pencil);
}

.byline {
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
  color: var(--pencil);
  font-size: 0.95rem;
}

section {
  margin-top: 5rem;
}

section.first {
  margin-top: 3rem;
}

.contents {
  margin-top: 2.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
}

.contents h2 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  letter-spacing: 0;
}

.contents ol {
  list-style: none;
  columns: 2 16rem;
  column-gap: 2rem;
  padding-left: 0;
  margin: 0;
  font-size: 0.98rem;
}

.contents li {
  break-inside: avoid;
}

.contents li + li {
  margin-top: 0.15rem;
}

/* A picture of a mockup, on a white plate, with its numbered notes. */

.shot {
  max-width: var(--wide);
  margin: 2rem auto 0;
}

.plate {
  display: block;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: clamp(0.4rem, 1.2vw, 0.9rem);
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.pair {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.pair figure {
  margin: 0;
}

.pair figcaption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--pencil);
}

@media (min-width: 52rem) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }
}

.enlarge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.notes {
  list-style: none;
  padding: 0;
  margin: 1.5rem auto 0;
  max-width: var(--wide);
  display: grid;
  gap: 1rem 2.5rem;
  counter-reset: none;
}

@media (min-width: 52rem) {
  .notes {
    grid-template-columns: 1fr 1fr;
  }
}

.notes li {
  margin: 0;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.notes .n {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mark);
  color: #fff;
  font: 700 0.9rem/1 var(--sans);
  margin-top: 0.1rem;
}

.notes b {
  display: block;
}

/* Where the information comes from: three plates, side by side when there
   is room, stacked when there is not. */

.flow {
  max-width: var(--wide);
  margin: 2rem auto 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .flow {
    grid-template-columns: 1fr auto 1.15fr auto 1fr;
    align-items: stretch;
  }
}

.box {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
}

.box.middle {
  border: 2px solid var(--ink);
}

.box h3 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

.box ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.97rem;
}

.box p {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--pencil);
}

.link-between {
  display: grid;
  place-items: center;
  color: var(--pencil);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 0.25rem;
}

.link-between svg {
  width: 2.25rem;
  height: 1.25rem;
  transform: rotate(90deg);
}

@media (min-width: 60rem) {
  .link-between {
    max-width: 6.5rem;
  }

  .link-between svg {
    transform: none;
  }
}

/* The questions. The memorable part of the page: each question beside the
   guess the pictures were drawn on, so it reads as a sheet of guesses
   waiting for her answers. */

.questions {
  max-width: 62rem;
  margin: 2rem auto 0;
}

.questions h3 {
  margin: 2.5rem 0 0.75rem;
}

.questions h3:first-child {
  margin-top: 0;
}

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

.q-list > li {
  margin: 0;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.6rem 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 52rem) {
  .q-list > li {
    grid-template-columns: 1.25fr 1fr;
  }
}

.q-list .ask {
  font-weight: 600;
}

.q-list .ask small {
  display: block;
  margin-top: 0.3rem;
  font-weight: 400;
  color: var(--pencil);
  font-size: 0.93rem;
}

.q-list .guess {
  background: var(--guess);
  border-left: 3px solid var(--rule);
  border-radius: 0 10px 10px 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  color: var(--pencil);
}

.q-list .guess b {
  color: var(--ink);
  font-weight: 600;
}

.q-list.pivotal .guess {
  border-left-color: var(--ink);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  min-height: 2rem;
}

.steps li + li {
  margin-top: 0.9rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font: 600 0.88rem/1 var(--sans);
}

footer {
  max-width: var(--measure);
  margin: 5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--pencil);
  font-size: 0.95rem;
}

@media print {
  body {
    background: #fff;
  }

  section {
    break-inside: avoid-page;
  }

  .enlarge {
    display: none;
  }
}
