/* Bisch Labs. One page, set like a printed home journal. */

:root {
  --page: #f3eee6;
  --surface: #fffcf8;
  --ink: #1c1917;
  --ink-2: #57534e;
  --note: #44403c;
  --hairline: #e4ddd4;
  --accent: #1f4d3a;
  --accent-hover: #16382b;
  --frame: #e7efe9;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;

  --content: 1120px;
  --gutter: 20px;
  --gap: 24px;

  /* Card padding, and the padding plus the 1px border. */
  --card-pad: 16px;
  --card-edge: calc(var(--card-pad) + 1px);

  /* The small sans label above a heading, and the space under it. */
  --label-size: 0.875rem;
  --label-leading: 1.4;
  --label-space: 10px;

  /* Height of the sticky header at the default text size. It is set in rem so
     the room kept above an anchor target grows with the reader's text size. */
  --header-clear: 5.625rem;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-weight: 600;
  font-size: clamp(2.4rem, 1.2rem + 4.9vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 500;
  font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

strong {
  font-weight: 600;
}

svg {
  display: block;
}

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

a:hover {
  color: var(--accent-hover);
}

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

::selection {
  background: rgba(31, 77, 58, 0.2);
}

.wrap {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* The skip link moves focus to main. It lands below the sticky header, and
   main itself shows no ring. */
main {
  scroll-margin-top: var(--header-clear);
}

main:focus {
  outline: none;
}

/* A link that takes keyboard focus is scrolled clear of the sticky header,
   and kept 8px clear of the bottom edge of the window, so its focus ring is
   not cut at either edge. Header links are left out: they sit inside the
   sticky header itself. The room above covers a header whose link row has
   wrapped onto a second line, which happens with larger text: the wordmark,
   two rows of links, the two hairlines, and 8px. The first value is for a
   browser without max(). */
main a,
.site-footer a {
  scroll-margin-top: calc(var(--header-clear) + 8px);
  scroll-margin-top: calc(max(44px, 1.584rem) + 3rem + 50px);
  scroll-margin-bottom: 8px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 40;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Header
   On a phone: the wordmark on one line, the five links on the next.
   From 600px: one line. The link row may wrap at any width. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  flex-direction: column;
}

.wordmark {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-header .wordmark {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  /* Below 600px this box touches the top of the screen, so the focus ring is
     drawn inside it. The side padding keeps the ring off the letters; the
     negative margin keeps the text on the gutter. */
  padding-inline: 8px;
  margin-inline: -8px;
}

.site-header .wordmark:focus-visible {
  outline-offset: -2px;
}

a.wordmark:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.22em;
}

.site-nav {
  border-top: 1px solid var(--hairline);
}

/* Category links, in the header and again in the footer. One line of text
   plus the padding makes each link 44px tall. */
.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 12px;
  max-width: 440px;
  font-size: 1rem;
}

.site-nav a,
.footer-nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--ink);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.4em;
}

/* Below 600px these links show the short form of each name, so all five fit
   on one line: the first word is hidden and the word that is left gets a
   capital. The markup holds the full name once. An inline-block does not take
   its parent's underline, so the short word asks for it. */
.nav-pre {
  display: none;
}

.nav-core {
  display: inline-block;
  text-decoration: inherit;
}

.nav-core::first-letter {
  text-transform: capitalize;
}

@media (min-width: 600px) {
  :root {
    --header-clear: 4.0625rem;
  }

  /* The wordmark is beside the links here, so the room is two rows of links,
     the 6px above and below them, the hairline, and 8px. */
  main a,
  .site-footer a {
    scroll-margin-top: calc(3rem + 61px);
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    column-gap: 32px;
    min-height: 64px;
    /* Room for the focus ring above a link when larger text makes the links
       fill the row or wrap. */
    padding-block: 6px;
  }

  .site-header .wordmark {
    align-self: center;
    padding-inline: 0;
    margin-inline: 0;
  }

  .site-header .wordmark:focus-visible {
    outline-offset: 3px;
  }

  .site-nav {
    border-top: 0;
  }

  .site-nav ul,
  .footer-nav ul {
    justify-content: flex-end;
    column-gap: clamp(18px, 2.8vw, 28px);
    max-width: none;
  }

  .nav-pre,
  .nav-core {
    display: inline;
  }

  .nav-core {
    text-decoration: none;
  }

  .nav-core::first-letter {
    text-transform: none;
  }
}

/* A very short window, such as a desktop at 400% zoom or a small phone with
   large text: the header scrolls away with the page, so it does not take a
   third of the screen. */
@media (max-height: 20rem) {
  .site-header {
    position: static;
  }

  :root {
    --header-clear: 0rem;
  }

  main a,
  .site-footer a {
    scroll-margin-top: 8px;
  }
}

/* Hero */

.hero {
  display: grid;
  gap: 28px;
  padding-block: 28px 32px;
}

.dek {
  max-width: 29em;
  margin-top: 18px;
  font-size: 1.2rem;
  line-height: 1.45;
}

.button,
.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover,
.card-button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.button {
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 20px 12px 22px;
  font-size: 1.05rem;
}

.disclosure {
  max-width: 31em;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--note);
  font-size: 1rem;
  line-height: 1.5;
}

.hero .disclosure {
  margin-top: 26px;
}

.hero-copy,
.hero-figure {
  min-width: 0;
  margin: 0;
}

/* The picture frame. On a phone it is 4:3 of the column and never shorter
   than 220px; the height is written out, because a ratio with a minimum
   height would push the width past the column on a very narrow screen. */
.hero-frame {
  position: relative;
  overflow: hidden;
  height: max(220px, 0.75 * (100vw - 2 * var(--gutter)));
  border-radius: 14px;
  background: var(--frame);
}

.hero-frame svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-figure figcaption {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.4;
  text-wrap: pretty;
}

/* Stacked, on a wide column: a shallower frame. */
@media (min-width: 560px) {
  .hero-frame {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 801px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(40px, 5vw, 56px);
    align-items: center;
    padding-block: 40px 36px;
  }

  /* 4:3 when the column is wide enough, never shorter than 420px. The height
     comes from the column width in container units; without them the frame
     is 420px tall. Where the frame is taller than 4:3 the drawing sits in the
     middle, with more wall above it and more floor below. */
  .hero-figure {
    container-type: inline-size;
  }

  .hero-frame {
    aspect-ratio: auto;
    height: 75cqw;
    min-height: 420px;
  }

  .dek {
    margin-top: 20px;
  }

  .button {
    margin-top: 28px;
  }

  .hero .disclosure {
    margin-top: 30px;
  }
}

/* Category strip
   A sideways scroller with snap on a phone, five equal cells from 701px. */

.category-strip {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-block: 4px 12px;
}

.category-strip ol {
  counter-reset: strip;
  display: grid;
  grid-template-columns: repeat(5, 148px);
  gap: 12px;
  width: max-content;
  margin: 0;
  padding-inline: var(--gutter);
}

.category-strip li {
  counter-increment: strip;
  scroll-snap-align: start;
}

/* A half-visible cell is not always scrolled into view when it takes keyboard
   focus. While keyboard focus is inside the strip, the focused cell is the
   only snap point, so the scroller settles on it and the whole cell and its
   ring are on screen. */
.category-strip ol:has(a:focus-visible) li:not(:focus-within) {
  scroll-snap-align: none;
}

.category-strip a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.strip-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 92px;
  border-radius: 12px;
  background: var(--frame);
}

/* The small drawings keep one line weight at every size. */
.strip-art svg {
  width: 80px;
  height: 60px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strip-art svg * {
  vector-effect: non-scaling-stroke;
}

.strip-art .thin {
  stroke-width: 1.5px;
}

.strip-art::before {
  content: counter(strip, decimal-leading-zero);
  position: absolute;
  top: 9px;
  left: 12px;
  color: var(--accent);
  font-size: var(--label-size);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.strip-name {
  display: block;
  padding-top: 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-strip a:hover .strip-name,
.category-strip a:focus-visible .strip-name {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.22em;
}

.category-strip a:focus-visible {
  outline-offset: 2px;
  border-radius: 12px;
}

@media (min-width: 701px) {
  .category-strip {
    overflow-x: visible;
    scroll-snap-type: none;
    padding-block: 0 8px;
  }

  .category-strip ol {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(var(--content), 100% - 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: 0;
  }

  .strip-art {
    height: 104px;
  }

  .strip-art svg {
    width: 88px;
    height: 66px;
  }
}

@media (min-width: 1001px) {
  .category-strip ol {
    gap: 16px;
  }

  .strip-art {
    height: 116px;
  }

  .strip-art svg {
    width: 120px;
    height: 90px;
  }
}

/* Category sections */

.categories {
  counter-reset: category;
  margin-top: 36px;
}

.category {
  position: relative;
  counter-increment: category;
  padding-block: 40px 44px;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: calc(var(--header-clear) - 1px);
}

/* A short accent rule on the hairline, at the left edge of the content. */
.category::before,
.method::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--accent);
}

.eyebrow {
  display: block;
  margin-bottom: var(--label-space);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--label-size);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: var(--label-leading);
}

/* The section number, then a short rule, then the category name. */
.category .eyebrow::before {
  content: counter(category, decimal-leading-zero);
  display: inline-block;
  margin-right: 12px;
  padding-right: 34px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat right center / 22px 1px;
  color: var(--accent);
}

.section-head p {
  max-width: 28em;
  margin-top: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.card-grid:empty {
  display: none;
}

/* Product card
   One grid, two arrangements. The card is stacked by default (frame, name,
   reason, button). A card that has a whole row to itself is laid on its side:
   frame on the left, text on the right. The switch is the set of custom
   properties in .card; the rules further down only say which cards get it. */

.card {
  --card-columns: minmax(0, 1fr);
  --card-rows: auto auto 1fr auto;
  --card-gap: 0px;
  --text-column: 1;
  --frame-rows: 1;
  --title-size: 1.22rem;
  --title-space: 16px;
  --why-size: 1rem;
  --why-measure: none;

  display: grid;
  grid-template-columns: var(--card-columns);
  grid-template-rows: var(--card-rows);
  column-gap: var(--card-gap);
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.05);
}

.card-frame {
  position: relative;
  grid-column: 1;
  grid-row: var(--frame-rows);
  align-self: center;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 30px;
  border-radius: 8px;
  background: var(--frame);
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* Photo corners: the empty frame is a mount waiting for a print. The bars are
   solid and the whole layer is faded, so the two bars of a corner do not add
   up to a darker spot where they cross. */
.card-frame::before {
  --tick: var(--accent);
  content: "";
  position: absolute;
  inset: 12px;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 14px;
  background-repeat: no-repeat;
  opacity: 0.5;
  pointer-events: none;
}

/* The product name in the frame. A very long name stops after four lines, so
   it cannot run out of the frame. */
.card-frame-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* A photo covers the frame, and shows only once it has loaded. Until then
   the name and the corners stay. */
.card-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.card-frame.has-photo img {
  opacity: 1;
}

.card-frame.has-photo::before {
  content: none;
}

.card h3 {
  grid-column: var(--text-column);
  grid-row: 2;
  margin-top: var(--title-space);
  font-weight: 600;
  font-size: var(--title-size);
  line-height: 1.25;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.card p {
  grid-column: var(--text-column);
  grid-row: 3;
  max-width: var(--why-measure);
  margin-top: 6px;
  color: var(--ink-2);
  font-size: var(--why-size);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.card-button {
  grid-column: var(--text-column);
  grid-row: 4;
  justify-self: start;
  margin-top: 16px;
}

/* One column, but wide enough that a stacked card would be mostly frame. */
@media (min-width: 540px) and (max-width: 700px) {
  .card-grid > .card {
    --card-columns: minmax(0, 5fr) minmax(0, 7fr);
    --card-rows: 1fr auto auto auto 1fr;
    --card-gap: 20px;
    --text-column: 2;
    --frame-rows: 1 / -1;
    --title-size: 1.3rem;
    --title-space: 0px;
  }
}

@media (min-width: 701px) {
  :root {
    --gutter: 32px;
  }

  .category {
    padding-block: 52px 60px;
  }

  .section-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }

  /* The guidance starts level with the heading text, below the label. */
  .section-head p {
    margin-top: calc(var(--label-size) * var(--label-leading) + var(--label-space));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    margin-top: 32px;
  }
}

/* Two columns: the last card of an odd count has a row to itself. Its frame is
   as wide as a frame in the first column, and its text starts where the text
   of a card in the second column starts. */
@media (min-width: 701px) and (max-width: 1000px) {
  .card-grid > .card:last-child:nth-child(odd) {
    --card-columns: calc((100% + 2 * var(--card-edge) - var(--gap)) / 2 - 2 * var(--card-edge)) minmax(0, 1fr);
    --card-rows: 1fr auto auto auto 1fr;
    --card-gap: calc(var(--gap) + 2 * var(--card-edge));
    --text-column: 2;
    --frame-rows: 1 / -1;
    --title-size: 1.5rem;
    --title-space: 0px;
    --why-size: 1.05rem;
    --why-measure: 24em;
    grid-column: 1 / -1;
  }
}

@media (min-width: 1001px) {
  .section-head {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-head p {
    grid-column: 2 / span 2;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Three columns: the lone card is the last of 4, 7, 10 and so on. Its frame
     is as wide as a frame in the first column, and its text starts where the
     text of a card in the second column starts. */
  .card-grid > .card:last-child:nth-child(3n + 1) {
    --card-columns: calc((100% + 2 * var(--card-edge) - 2 * var(--gap)) / 3 - 2 * var(--card-edge)) minmax(0, 1fr);
    --card-rows: 1fr auto auto auto 1fr;
    --card-gap: calc(var(--gap) + 2 * var(--card-edge));
    --text-column: 2;
    --frame-rows: 1 / -1;
    --title-size: 1.5rem;
    --title-space: 0px;
    --why-size: 1.05rem;
    --why-measure: 24em;
    grid-column: 1 / -1;
  }

  /* The spread: with one or two cards, the heading takes the first column
     and the cards sit beside it. The grid itself still spans the full width,
     so the heading and the grid share a row and the cards start in column 2. */
  @supports selector(:has(*)) {
    .category:has(> .card-grid > .card:only-child),
    .category:has(> .card-grid > .card:first-child:nth-last-child(2)) {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      column-gap: var(--gap);
      align-items: start;
    }

    .category:has(> .card-grid > .card:only-child) > .section-head,
    .category:has(> .card-grid > .card:first-child:nth-last-child(2)) > .section-head {
      position: relative;
      z-index: 1;
      display: block;
      grid-column: 1;
      grid-row: 1;
      padding-right: 16px;
    }

    .category:has(> .card-grid > .card:only-child) > .section-head p,
    .category:has(> .card-grid > .card:first-child:nth-last-child(2)) > .section-head p {
      margin-top: 14px;
    }

    .category:has(> .card-grid > .card:only-child) > .card-grid,
    .category:has(> .card-grid > .card:first-child:nth-last-child(2)) > .card-grid {
      grid-column: 1 / -1;
      grid-row: 1;
      margin-top: 0;
    }

    /* One card in the whole category: it lies across columns 2 and 3, with a
       wider frame than a lone last card gets. */
    .category:has(> .card-grid > .card:only-child) > .card-grid > .card {
      --card-columns: minmax(0, 5fr) minmax(0, 6fr);
      --card-gap: var(--gap);
      grid-column: 2 / span 2;
    }

    .category:has(> .card-grid > .card:first-child:nth-last-child(2)) > .card-grid > .card:first-child {
      grid-column: 2;
    }
  }
}

/* Only a card with a button lifts on hover, and only where there is a
   pointer that hovers. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: box-shadow 0.2s ease;
  }
}

@media (hover: hover) {
  .card:has(.card-button):hover {
    box-shadow: 0 14px 36px rgba(28, 25, 23, 0.08);
  }
}

/* How we pick: a full-width band on the card surface. */

.method {
  position: relative;
  margin-top: 12px;
  padding-block: 44px 48px;
  border-block: 1px solid var(--hairline);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-clear) - 1px);
}

/* The band runs edge to edge, so its accent rule is moved in to the content. */
.method::before {
  left: max(var(--gutter), (100% - var(--content)) / 2);
}

.method-points {
  counter-reset: point;
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

/* In one column the text stops at the paragraph measure while the hairline
   above it runs the full width. In three columns the padding comes to zero. */
.method-points li {
  counter-increment: point;
  padding-top: 14px;
  padding-inline-end: max(0px, 100% - 28em);
  border-top: 1px solid var(--hairline);
  color: var(--ink-2);
  text-wrap: pretty;
}

.method-points li::before {
  content: counter(point);
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.1;
}

.method-points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  text-wrap: balance;
}

.method-note {
  max-width: 28em;
  margin-top: 32px;
  text-wrap: balance;
}

@media (min-width: 701px) {
  .method {
    padding-block: 60px 64px;
  }

  .method-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin-top: 36px;
  }

  .method-note {
    margin-top: 40px;
  }
}

/* Footer */

.site-footer {
  padding-block: 36px 48px;
}

.footer-inner {
  display: grid;
  gap: 16px;
}

.footer-nav a {
  text-decoration-color: var(--accent);
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
}

.site-footer .disclosure {
  margin-top: 8px;
}

@media (min-width: 600px) {
  .footer-nav ul {
    justify-content: flex-start;
  }
}

@media (min-width: 701px) {
  .site-footer {
    padding-block: 44px 64px;
  }

  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 40px;
  }

  .footer-nav ul {
    justify-content: flex-end;
  }

  .site-footer .disclosure {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
}

/* Not-found page: the wordmark, one line, one sentence, one link. The page
   fills the screen, so the footer wordmark sits at the bottom of it. */

.not-found-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.not-found {
  flex: 1 0 auto;
  padding-block: 56px 72px;
}

.not-found p {
  max-width: 28em;
  margin-top: 16px;
}

/* The one link on the page is 44px tall like every other control. Its padding
   takes 10px from the gap above, so the text does not move. */
.not-found p + p {
  margin-top: 6px;
}

.not-found a {
  display: inline-block;
  padding-block: 10px;
}

.not-found-page .site-footer {
  border-top: 1px solid var(--hairline);
}

/* Forced colors: backgrounds are dropped, so the frames and the buttons get a
   border and the rules painted as backgrounds take the text color. The two
   kinds of drawing keep their own colors, like any picture. Card borders and
   the focus ring are real borders and outlines, so they stay. */
@media (forced-colors: active) {
  .hero-frame,
  .strip-art {
    forced-color-adjust: none;
  }

  .card-frame,
  .button,
  .card-button {
    border: 1px solid CanvasText;
  }

  .card-frame::before {
    --tick: CanvasText;
    opacity: 1;
  }

  .category::before,
  .method::before {
    background: CanvasText;
  }

  .category .eyebrow::before {
    background-image: linear-gradient(CanvasText, CanvasText);
  }
}

@media print {
  .site-header {
    position: static;
  }

  .skip-link {
    display: none;
  }

  .card {
    box-shadow: none;
  }
}

/* Motion: almost none. Anchor jumps are instant on purpose, so a jump lands
   exactly under the header and keyboard focus never drags the page along.
   The only transition on the page is the card shadow, above, and it is
   switched on only when reduced motion is not requested. */
