/* The proposal page. A quiet document of Peter's own, cool and grey, so the
   black and orange of Western United's 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. Copied from the Wheeler proposal, so Peter's proposals
   share one look. */

: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;
  padding-left: 0;
  margin: 0;
  font-size: 0.98rem;
}

.contents .parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem 2rem;
}

.contents .part-group + .part-group {
  margin-top: 0;
}

.contents .part-link {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pencil);
}

.contents a.part-link {
  color: var(--pencil);
}

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

/* A part of the page: a label, a heading, a line on what it holds. */

.part {
  max-width: var(--measure);
  margin: 7rem auto 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.part h2 {
  font-size: clamp(2rem, 4.4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.part p {
  margin-bottom: 0;
  color: var(--pencil);
  font-size: 1.1rem;
}

.part .part-label {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pencil);
}

.part + section {
  margin-top: 3rem;
}

/* 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);
}

/* The price. A white sheet wider than the text, like the pictures, so the
   figures have room. Each cut or addition is a whole row you tick. The total
   rides along the bottom of the screen while the sheet is in view, then
   settles at the sheet's foot: sticky inside .price, so it never shows
   before she reaches the price. */

.price {
  max-width: 52rem;
  margin: 2rem auto 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 0.5rem 0 0;
}

.price-base {
  padding: 1.5rem 1.5rem 0.5rem;
}

.price-base h3 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
}

.price-base p {
  margin: 0;
  max-width: 38rem;
  color: var(--pencil);
}

/* The two ways to pay, side by side when there is room. A whole card is the
   radio's label; the picked one takes the link colour. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 1.25rem 1.5rem 0;
  border: 0;
}

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

.plan {
  display: grid;
  align-content: start;
  padding: 1rem 1.25rem 1.1rem;
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.plan:has(input:checked) {
  border-color: var(--link);
  background: #eef0f8;
  box-shadow: inset 0 0 0 1px var(--link);
}

.plan:has(input:focus-visible) {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.plan-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.plan-head input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--link);
  cursor: pointer;
}

.plan-amt {
  font: 500 clamp(2.2rem, 6vw, 2.8rem)/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
}

.plan-amt small {
  font: 400 1rem var(--sans);
  color: var(--pencil);
}

.plan-then {
  margin-top: 0.45rem;
}

.plan-term {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--pencil);
}

.plans-note {
  margin: 0;
  padding: 0.9rem 1.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--pencil);
}

.price-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.price-group legend {
  float: left;
  width: 100%;
  padding: 1.4rem 1.5rem 0.5rem;
  font: 500 1.2rem/1.2 var(--serif);
}

.option {
  clear: both;
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  gap: 0.25rem 1rem;
  align-items: start;
  padding: 0.95rem 1.5rem;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: background-color 120ms ease;
}

.option + .option {
  border-top: 1px solid #ecebf0;
}

@media (hover: hover) {
  .option:hover {
    background: var(--guess);
  }
}

.option:has(input:checked) {
  background: #eef0f8;
  border-left-color: var(--link);
}

.option input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.15rem 0 0;
  accent-color: var(--link);
  cursor: pointer;
}

.option .what {
  color: var(--pencil);
}

.option .what b {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-weight: 600;
}

.option .what .see {
  display: block;
  width: fit-content;
  margin-top: 0.35rem;
  font-weight: 600;
}

.option .amt {
  min-width: 5.5rem;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

.price-total {
  position: sticky;
  bottom: 0.75rem;
  z-index: 1;
  margin: 1rem 0.75rem 0.75rem;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 0.5rem 2rem;
}

.price-total p {
  margin: 0;
}

.total-label {
  font-weight: 700;
}

.total-note {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: #c9c7d4;
}

.total-cell {
  display: grid;
  justify-items: end;
  font-size: 0.85rem;
  color: #c9c7d4;
}

.total-cell b {
  font: 500 1.9rem/1.05 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  color: #fff;
}

.total-tax {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
  font-size: 0.9rem;
  color: #c9c7d4;
}

.tax-note {
  flex: 1 1 18rem;
}

.tax-toggle {
  flex: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (hover: hover) {
  .tax-toggle:hover {
    background: rgb(255 255 255 / 0.12);
  }
}

.tax-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.after-price {
  margin-top: 2rem;
}

@media (max-width: 34rem) {
  .price-base,
  .plans,
  .plans-note {
    padding-inline: 1.1rem;
  }

  .price-group legend {
    padding-inline: 1.1rem;
  }

  .option {
    grid-template-columns: 1.4rem 1fr;
    padding-inline: 1.1rem;
  }

  .option .amt {
    grid-column: 2;
    text-align: left;
  }

  .price-total {
    grid-template-columns: auto auto auto;
    justify-content: space-between;
    gap: 0.6rem 0.75rem;
  }

  .total-label {
    grid-column: 1 / -1;
    padding-right: 7.5rem;
  }

  /* The bar is sticky, so this sits in its top right corner, beside the label,
     instead of adding a row to a bar that already covers part of the screen. */
  .tax-toggle {
    position: absolute;
    top: 0.9rem;
    right: 1.25rem;
  }

  .total-cell {
    justify-items: start;
    align-self: end;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .total-cell b {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .option,
  .plan {
    transition: none;
  }
}

@media print {
  .price-total {
    position: static;
  }
}

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;
  }
}

/* A computer picture beside a phone picture: the phone column is narrower. */
@media (min-width: 52rem) {
  .pair--phone {
    grid-template-columns: 3fr 1fr;
    align-items: start;
  }
}

/* One way to pay, so the totals bar has one figure. */
.price-total--single {
  grid-template-columns: 1fr auto;
}

@media (max-width: 34rem) {
  .price-total--single {
    grid-template-columns: 1fr auto;
  }

  .price-total--single .total-label {
    grid-column: auto;
    padding-right: 0;
  }
}

/* A paragraph after a picture's numbered notes */
.notes + p {
  margin-top: 2rem;
}

/* The cost as an hourly estimate: the rows carry no amounts, only boxes. */
.price-group-note {
  clear: both;
  margin: 0;
  padding: 0.5rem 1.5rem 1rem;
  color: var(--pencil);
  font-size: 0.95rem;
}

.price-total--single .total-cell {
  gap: 0.1rem;
}

@media (max-width: 34rem) {
  .price-group-note {
    padding-inline: 1.1rem;
  }

  .price-total--single .total-cell {
    justify-items: end;
  }
}

/* Nothing is picked, so the figure never changes: the bar sits at the foot of
   the list instead of following the reader down it. */
.price-total--single {
  position: static;
}

/* The card's own edge starts the first group, so it needs no divider of its
   own, and its heading sits as far from the top as from the side. */
.price > .price-group:first-child {
  border-top: 0;
}

.price:has(> .price-group:first-child) {
  padding-top: 0;
}

/* Sending the picks: a text to Peter with the link, or the link copied. */
.send-picks {
  max-width: 52rem;
  margin: 1.25rem auto 0;
}

.send-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.send-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.3rem;
  border-radius: 999px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.send-button {
  background: var(--link);
  border: 1px solid var(--link);
  color: var(--sheet);
}

.copy-button {
  background: var(--sheet);
  border: 1px solid var(--rule);
  color: var(--ink);
}

@media (hover: hover) {
  .send-button:hover {
    background: var(--ink);
    border-color: var(--ink);
  }

  .copy-button:hover {
    border-color: var(--pencil);
  }
}

.send-button:focus-visible,
.copy-button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.send-note {
  margin: 0.6rem 0 0;
  color: var(--pencil);
  font-size: 0.95rem;
}

.price-total--single .total-figure:empty {
  display: none;
}
