/* Ideaticon.
   Ink on paper, and one red. Thin ink lines are the volume of the work.
   The red line is the review. That is the whole visual system. */

:root {
  --paper: #f5f2eb;
  --ink: #151412;
  --muted: #5d5a54;
  --faint: #d8d3c7;
  --red: #c8321e;
  --red-text: #b02a18;
  --on-red: #fffaf5;

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --step: clamp(72px, 10vw, 144px);
}

/* The dark theme follows the visitor's system setting. There is no switch.
   The share cards are rendered with data-theme="light" on the root, which keeps them on paper. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #121110;
    --ink: #ebe7df;
    --muted: #a39f97;
    --faint: #34312d;
    --red: #ff5b45;
    --red-text: #ff7a66;
    --on-red: #140c0a;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--red);
  color: var(--on-red);
}

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

a:hover {
  color: var(--red-text);
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 10px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
}

/* ---------------------------------------------------------------- small type */

.label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.label::before {
  content: '';
  flex: none;
  width: 20px;
  height: 2px;
  background: var(--red);
}

.label a {
  text-decoration: none;
  color: var(--ink);
}

.label a:hover {
  color: var(--red-text);
}

.arrow {
  font-family: var(--mono);
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 22px 20px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.mark {
  width: 24px;
  height: 24px;
  flex: none;
  margin-block: -3px;
}

.mark path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.mark-ink {
  stroke: currentColor;
}

.mark-red {
  stroke: var(--red);
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.nav a {
  display: inline-block;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: inherit;
  border-bottom-color: var(--red);
}

.nav a[aria-current='page'] {
  border-bottom-color: var(--ink);
}

/* The menu button is for narrow screens only. See the 760px rules at the foot. */
.menu-toggle {
  display: none;
}

/* ---------------------------------------------------------------- buttons and links that act */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px 15px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--red);
  background: var(--red);
  color: var(--on-red);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

.btn[disabled]:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.more {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-underline-offset: 0.45em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ---------------------------------------------------------------- figures
   No text lives inside a drawing, so it may stretch to any shape.
   Strokes ignore the stretch and stay hairlines. */

.fig-frame {
  height: 260px;
  padding-block: 18px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.fig-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The hero figure in motion. The script draws it on a canvas laid over the still drawing, then hides the drawing. */
.fig-frame[data-flow] {
  position: relative;
}

.fig-live {
  position: absolute;
  inset: 18px 0;
  width: 100%;
  height: calc(100% - 36px);
}

.fig-frame.live .fig-svg {
  visibility: hidden;
}

.fig-svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.fig-svg .l1 {
  opacity: 0.9;
}

.fig-svg .l2 {
  opacity: 0.5;
}

.fig-svg .l3 {
  opacity: 0.26;
}

.fig-svg .strong {
  opacity: 1;
  stroke-width: 1.4;
}

.fig-svg .tick {
  opacity: 0.8;
}

.fig-svg .tick.fine {
  opacity: 0.62;
}

.fig-svg .gate {
  stroke-dasharray: 2 5;
  opacity: 0.65;
}

.fig-svg .dot {
  stroke-width: 4;
  stroke-linecap: round;
}

.fig-svg .dot.small {
  stroke-width: 2.6;
}

.fig-svg .red {
  stroke: var(--red);
  stroke-width: 2;
  opacity: 1;
}

.fig-svg .red.thin {
  stroke-width: 1.5;
}

.fig-svg .red.dot {
  stroke-width: 9;
  stroke-linecap: round;
}

.fig figcaption {
  margin-top: 16px;
  max-width: 44em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.fig-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(16px, 3vw, 40px);
  margin-top: 18px;
}

.fig-labels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px clamp(16px, 3vw, 40px);
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fig-legend dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fig-legend dd {
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}

.fig-hero .fig-frame {
  height: clamp(210px, 27vw, 330px);
}

.fig-small .fig-frame {
  height: 150px;
  padding-block: 12px;
}

/* the drawing is revealed left to right, once, when it comes into view */
@media (prefers-reduced-motion: no-preference) {
  .js .fig[data-reveal] .fig-svg {
    clip-path: inset(0 100% 0 0);
  }

  .js .fig[data-reveal].seen .fig-svg {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1.5s cubic-bezier(0.25, 0.6, 0.2, 1);
  }
}

/* ---------------------------------------------------------------- hero */

.hero {
  padding-block: clamp(36px, 6vw, 84px) 0;
}

.hero h1 {
  margin-top: 26px;
  font-size: clamp(3.3rem, 10.6vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.042em;
}

.hero h1 span,
.hero h1 em {
  display: block;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px clamp(28px, 6vw, 96px);
  align-items: end;
  margin-top: clamp(28px, 4vw, 48px);
}

.lede {
  max-width: 34em;
  font-size: clamp(1.2rem, 1.75vw, 1.45rem);
  line-height: 1.42;
}

.signature {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--muted);
}

.signature strong {
  color: var(--ink);
  font-weight: 500;
}

.hero .fig {
  margin-top: clamp(40px, 6vw, 72px);
}

/* ---------------------------------------------------------------- proof strip */

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.proof li {
  padding: 26px 24px 30px 0;
}

.proof li + li {
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.proof b {
  display: block;
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums;
}

.proof span {
  display: block;
  margin-top: 12px;
  max-width: 17em;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------------------------------------------------------------- sections */

.section {
  padding-top: var(--step);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}

.section-head h2 {
  margin-top: 16px;
  max-width: 13em;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  letter-spacing: -0.03em;
}

.section-head .intro {
  max-width: 32em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- mandates and ledgers */

.mandates,
.ledger {
  border-top: 1px solid var(--ink);
}

.mandate {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px clamp(20px, 4vw, 56px);
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--ink);
}

.mandate h2,
.mandate h3 {
  font-size: 1.85rem;
  letter-spacing: -0.025em;
}

.mandate h2 a,
.mandate h3 a {
  text-underline-offset: 0.16em;
}

.mandate .situation {
  margin-top: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.mandate dt,
.rules dt,
.facts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mandate dt {
  margin-bottom: 8px;
}

.mandate dd {
  line-height: 1.45;
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: 8px clamp(20px, 4vw, 56px);
  align-items: baseline;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

.ledger-row:hover {
  color: inherit;
}

.ledger-row h2,
.ledger-row h3 {
  font-size: 1.5rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.ledger-row:hover h2,
.ledger-row:hover h3 {
  color: var(--red-text);
}

.ledger-row h3 small {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ledger-row p {
  line-height: 1.45;
}

.stats {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}

.stats b {
  color: var(--ink);
  font-weight: 500;
}

.ledger-row .stats {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

/* ---------------------------------------------------------------- client marks
   Each company's own mark, unaltered and in its own colours, shown small beside its name. */

.client-mark {
  --mark: 28px;
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: calc(var(--mark) * 1.4);
  height: calc(var(--mark) * 1.4);
}

/* Every mark sits in a box of the same height, and a wide mark makes its box wider.
   `--scale` sets how much of the height each one fills, so a mark with empty space in its file looks as large as one without. */
.client-mark img {
  display: block;
  width: auto;
  height: calc(var(--mark) * var(--scale, 1));
  max-height: 100%;
}

.client-mark picture {
  display: contents;
}

/* A source element is an empty box, and would otherwise take a row of its own here. */
.client-mark source {
  display: none;
}

/* On the dark page the marks sit straight on the ground, with nothing behind them.
   Screening lets a black backing in a file fall away into the page. A mark drawn in dark colours is lifted so it still reads. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .client-mark img {
    mix-blend-mode: screen;
  }

  :root:not([data-theme='light']) .client-mark.lift img {
    filter: brightness(1.7) contrast(0.82);
  }
}

/* The row under the hero: who the work was done for. */
.client-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px clamp(24px, 4vw, 56px);
  margin-top: clamp(36px, 5vw, 60px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.client-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(22px, 3.4vw, 46px);
}

/* Block-level flex, so a name with a mark and a name without sit on the same line. */
.client-strip li {
  display: flex;
}

.client-strip a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  font-size: 1.1875rem;
  letter-spacing: -0.012em;
  text-decoration: none;
}

.client h3 a,
.client-head h2 {
  display: flex;
  align-items: center;
  gap: 0.26em;
}

.client h3 .client-mark {
  --mark: 26px;
}

.client-head h2 .client-mark {
  --mark: clamp(34px, 4.2vw, 52px);
}

.facts dd .client-mark {
  --mark: 18px;
  margin-right: 8px;
  vertical-align: -0.42em;
}

/* ---------------------------------------------------------------- the four parts, and the clients */

.mandate .label {
  margin-bottom: 14px;
}

.parts {
  counter-reset: part;
  border-top: 1px solid var(--ink);
}

.part {
  counter-increment: part;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr);
  gap: 16px clamp(20px, 4vw, 56px);
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--ink);
}

.part h2,
.part h3 {
  font-size: 1.85rem;
  letter-spacing: -0.025em;
}

.part h3::before {
  content: counter(part, decimal-leading-zero) '\00a0\00a0\00a0' attr(data-role);
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--red-text);
}

.part .why {
  margin-top: 12px;
  max-width: 24em;
  line-height: 1.45;
  color: var(--muted);
}

.part .via {
  margin-top: 18px;
}

.part dl {
  padding-top: 26px;
}

.part dt {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.part dd {
  font-size: 1.0625rem;
  line-height: 1.45;
}

/* The test is the claim, so it is set as a statement. */
.part .test dd {
  font-size: 1.3rem;
  line-height: 1.28;
  letter-spacing: -0.012em;
}

/* A second test for a case the first does not cover. It is set as ordinary text, below the statement. */
.part .test dt.also {
  margin-top: 20px;
}

.part .test dd.also {
  font-size: 1.0625rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.part .note {
  margin-top: 16px;
  max-width: 24em;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}

/* A service page opens with its part, set as the row the home page uses.
   Here the left column starts with a label, so the labels of all three columns sit on one line. */
.part-band {
  margin-bottom: clamp(44px, 6vw, 84px);
}

.part-band .part {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.part-band .part dl {
  padding-top: 0;
}

.part-band .part .test dd {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 22em;
}

.part-band .part dt a {
  color: var(--ink);
  text-decoration: none;
}

.part-band .part dt a:hover {
  color: var(--red-text);
}

.part-band .part dt {
  font-size: 0.75rem;
  line-height: 1.5;
}

.part-band .part dt:first-child {
  margin-bottom: 14px;
}

/* The two parts that make the offer last share one row, in short form. */
.supports {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--ink);
}

.supports > div {
  padding: 26px clamp(20px, 4vw, 56px) 30px 0;
}

.supports > div + div {
  padding-left: clamp(20px, 4vw, 56px);
  border-left: 1px solid var(--ink);
}

.supports .label {
  margin-bottom: 12px;
}

.supports h3 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.supports h3 a {
  text-decoration: none;
}

.supports p:last-child {
  margin-top: 8px;
  max-width: 26em;
  line-height: 1.45;
  color: var(--muted);
}

.clients {
  border-top: 1px solid var(--ink);
}

.client {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: 12px clamp(20px, 4vw, 56px);
  align-items: start;
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--ink);
}

.client h3 {
  font-size: 1.85rem;
  letter-spacing: -0.025em;
}

.client h3 a {
  text-decoration: none;
}

.client h3 small {
  display: block;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shows {
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.shows + p {
  margin-top: 10px;
  max-width: 34em;
  line-height: 1.45;
  color: var(--muted);
}

.writeups {
  font-size: 1rem;
  line-height: 1.35;
}

.writeups li {
  padding: 9px 0 10px;
  border-bottom: 1px solid var(--faint);
}

.writeups li:first-child {
  padding-top: 4px;
}

/* ---------------------------------------------------------------- prose, rules, lists */

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.prose {
  max-width: 35em;
}

.prose .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.prose > * + * {
  margin-top: 1.05em;
}

.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.025em;
}

.prose h2.first {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.4rem;
  line-height: 1.2;
}

.prose h3 + p {
  margin-top: 0.45em;
}

.rules {
  border-top: 1px solid var(--ink);
}

.rules div {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 6px 20px;
  padding: 14px 0 15px;
  border-bottom: 1px solid var(--faint);
}

.rules dt {
  padding-top: 0.5em;
  color: var(--ink);
}

.rules dd {
  font-size: 1.0625rem;
  line-height: 1.45;
}

.rules.wide div {
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
}

.list li {
  position: relative;
  padding: 12px 0 13px 30px;
  border-bottom: 1px solid var(--faint);
  line-height: 1.45;
}

.list li:first-child {
  border-top: 1px solid var(--ink);
}

.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.42em;
  width: 16px;
  height: 1px;
  background: var(--ink);
}

.list.wide li {
  max-width: 44em;
}

.steps {
  counter-reset: step;
  border-top: 1px solid var(--ink);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 4fr) minmax(0, 8fr);
  gap: 6px 14px;
  padding: 14px 0 15px;
  border-bottom: 1px solid var(--faint);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  padding-top: 0.42em;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--red-text);
}

.steps b {
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The platforms we work with: what each group is for, then the names. */
.platforms {
  border-top: 1px solid var(--ink);
}

.platforms div {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: 10px clamp(20px, 4vw, 56px);
  align-items: baseline;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--faint);
}

.platforms div:last-child {
  border-bottom-color: var(--ink);
}

.platforms dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips li {
  padding: 5px 10px 4px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.definition {
  margin-top: 34px;
  padding-left: 22px;
  border-left: 3px solid var(--red);
  max-width: 34em;
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.4;
}

.after {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- positions and questions */

/* Positions are opinions, in no order, so they carry no numbers. */
.positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 6vw, 96px);
  border-top: 1px solid var(--ink);
}

.positions li {
  padding: 26px 0 32px;
  border-bottom: 1px solid var(--ink);
}

.positions h3 {
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
}

.positions p {
  margin-top: 12px;
  max-width: 30em;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--muted);
}

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 6vw, 96px);
  border-top: 1px solid var(--ink);
}

.faq > div {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--ink);
}

.faq h3 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.faq p {
  margin-top: 10px;
  max-width: 32em;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------------------------------------------------------- call to action */

.cta {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding-bottom: var(--step);
}

.cta h2 {
  margin-top: 16px;
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.cta p {
  max-width: 30em;
}

.cta .actions {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- inner pages */

.page-head {
  padding-block: clamp(36px, 5vw, 76px) clamp(32px, 4.5vw, 60px);
}

.page-head h1 {
  margin-top: 22px;
  max-width: 13em;
  font-size: clamp(2.7rem, 6.8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.page-head .lede {
  margin-top: 28px;
  max-width: 36em;
}

.page-head .actions {
  margin-top: 34px;
}

.crumbs span {
  color: var(--muted);
}

/* case study */
.figures {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--ink);
}

.figures li {
  padding: 22px 16px 26px 0;
}

.figures li + li {
  padding-left: 22px;
  border-left: 1px solid var(--ink);
}

.figures b {
  display: block;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums;
}

.figures span {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--muted);
}

.note {
  margin: 0 0 22px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.study {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(48px, 7vw, 96px);
}

.study-side {
  position: sticky;
  top: 28px;
}

.facts {
  border-top: 1px solid var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}

.facts div {
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--faint);
}

.facts dt {
  margin-bottom: 4px;
}

.study-side .label {
  margin-top: 30px;
}

.related {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.8;
}

.side-action {
  margin-top: 30px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: var(--step);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.pager a {
  display: block;
  padding: 24px 0 26px;
  text-decoration: none;
}

.pager a:hover {
  color: inherit;
}

.pager a:hover b {
  color: var(--red-text);
}

.pager a + a {
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.pager a + a .label {
  justify-content: flex-end;
}

.pager a + a {
  text-align: right;
}

.pager b {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pager a > span:last-child {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: var(--muted);
}

/* answers */
.study.answer {
  padding-top: clamp(4px, 1.5vw, 20px);
}

/* A table is wider than a phone. It scrolls inside its own frame, and the page does not. */
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--ink);
}

.table-wrap table {
  width: 100%;
  min-width: 35rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.35;
  font-variant-numeric: lining-nums tabular-nums;
}

.table-wrap th,
.table-wrap td {
  padding: 11px 16px 12px 0;
  border-bottom: 1px solid var(--faint);
  text-align: left;
  vertical-align: top;
}

.table-wrap thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The first cell of a row is its header, for a screen reader. It reads as plain text. */
.table-wrap tbody th {
  min-width: 12em;
  font-weight: 400;
}

/* Red is the check that said no. */
.table-wrap td.fail {
  color: var(--red-text);
}

.table figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

/* work index */
.catalogue .entry {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(32px, 4.5vw, 56px);
  border-top: 1px solid var(--ink);
}

.client-group + .client-group {
  margin-top: clamp(56px, 8vw, 112px);
}

.client-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px clamp(24px, 5vw, 72px);
  align-items: end;
  padding-bottom: clamp(26px, 3.5vw, 40px);
}

.client-head h2 {
  margin-top: 16px;
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.entry h3 {
  margin-top: 16px;
  font-size: clamp(1.8rem, 3.3vw, 2.6rem);
  letter-spacing: -0.03em;
}

.entry h3 a {
  text-decoration: none;
}

.entry p {
  margin-top: 16px;
  max-width: 32em;
}

.entry .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  margin-top: 18px;
}

.entry-fig {
  display: block;
  color: inherit;
  text-decoration: none;
}

.entry-fig:hover {
  color: inherit;
}

/* ---------------------------------------------------------------- ladder */

.ladder {
  counter-reset: rung;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.ladder li {
  counter-increment: rung;
  padding: 24px 24px 30px 0;
}

.ladder li + li {
  padding-left: 24px;
  border-left: 1px solid var(--ink);
}

.ladder li::before {
  content: counter(rung, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--red-text);
}

.ladder h3 {
  margin-top: 10px;
  font-size: 1.75rem;
  letter-spacing: -0.025em;
}

.ladder .label {
  margin-top: 8px;
}

.ladder .label::before {
  display: none;
}

.ladder li > p:last-child {
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- form */

.contact {
  padding-bottom: var(--step);
}

.form {
  display: grid;
  gap: 18px;
}

.form .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form .optional {
  color: var(--muted);
}

/* The first question is the brief, so it is set as a question, in the text face. */
.form .brief-first label {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-transform: none;
}

/* The other answers help, and are plainly optional: smaller, and under their own line. */
.brief-more {
  display: grid;
  gap: 18px;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--faint);
}

.brief-more .more-title {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--muted);
}

.brief-more .hint {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.form .brief-more textarea {
  min-height: 0;
}

.form [aria-invalid='true'] {
  border-color: var(--red);
  box-shadow: inset 3px 0 0 var(--red);
}

.form-note {
  max-width: 32em;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}

.hint {
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--muted);
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 13px 14px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  appearance: none;
}

.form textarea {
  min-height: 9.5em;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.form .trap {
  position: absolute;
  left: -9999px;
}

.form-status {
  min-height: 1.5em;
  font-size: 1rem;
}

.form-status[data-state='error'] {
  color: var(--red-text);
}

.contact-list li {
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--faint);
}

.contact-list li:first-child {
  border-top: 1px solid var(--ink);
}

.contact-list .label::before {
  display: none;
}

.aside-note {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact-side h2 {
  margin-bottom: 12px;
}

.contact-side * + h2 {
  margin-top: 40px;
}

.steps.plain li {
  grid-template-columns: 2.4rem minmax(0, 1fr);
  font-size: 1rem;
}

/* ---------------------------------------------------------------- footer */

.footer {
  margin-top: 0;
  padding-block: 56px 40px;
  background: var(--ink);
  color: var(--paper);
}

.footer a:hover {
  color: var(--paper);
  text-decoration-thickness: 2px;
}

.footer :focus-visible {
  outline-color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3.4fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: 32px clamp(24px, 4vw, 56px);
}

.footer .brand {
  color: var(--paper);
}

.footer .legal {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.footer p {
  margin-top: 16px;
  max-width: 24em;
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.8;
}

.footer h2 {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.footer li {
  padding-block: 0.275em;
  font-size: 1rem;
  line-height: 1.35;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  margin-top: 52px;
  padding-top: 18px;
  border-top: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* ---------------------------------------------------------------- narrower sheets */

@media (max-width: 980px) {
  .hero-row,
  .split,
  .two-col,
  .cta,
  .study,
  .section-head,
  .catalogue .entry {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .study-side {
    position: static;
  }

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

  .proof li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .proof li:nth-child(n + 3) {
    border-top: 1px solid var(--ink);
  }

  .mandate,
  .part,
  .client,
  .client-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .part dl {
    padding-top: 0;
  }

  /* The head of a service page stacks: the test, then where it was passed. */
  .part-band .part {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 26px;
  }

  .writeups li:first-child {
    border-top: 1px solid var(--faint);
    padding-top: 9px;
  }

  .ledger-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ledger-row .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 22px;
    justify-items: start;
    text-align: left;
  }

  .tests li {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .tests .label {
    grid-column: 1 / -1;
  }

  .positions,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .fig-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px clamp(16px, 3vw, 40px);
  }

  /* The three stages stack, each under its own rule. */
  .ladder {
    grid-template-columns: minmax(0, 1fr);
  }

  .ladder li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .platforms div {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- the header on narrow screens
   Below 760px the list of pages no longer fits beside the name. It folds behind one button,
   and opens as a list set in the text face. Without the script the list simply stays open. */
@media (max-width: 760px) {
  .masthead {
    flex-wrap: wrap;
    gap: 0 18px;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .nav ul {
    display: block;
    margin-top: 18px;
    border-top: 1px solid var(--faint);
  }

  .nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0 14px;
    border-bottom: 1px solid var(--faint);
    font-family: var(--serif);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: none;
  }

  .nav li:last-child a {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .nav a:hover {
    border-bottom-color: var(--faint);
    color: var(--red-text);
  }

  .nav a[aria-current='page'] {
    border-bottom-color: var(--faint);
  }

  .nav a[aria-current='page']::after {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--red);
  }

  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 9px 0 8px 14px;
    border: 0;
    background: none;
    color: inherit;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  /* Two short lines that become one when the list is open. */
  .js .menu-toggle::after {
    content: '';
    width: 18px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .js .menu-toggle[aria-expanded='true']::after {
    height: 0;
    border-bottom: 0;
  }

  .menu-toggle .when-open,
  .menu-toggle[aria-expanded='true'] .when-closed {
    display: none;
  }

  .menu-toggle[aria-expanded='true'] .when-open {
    display: inline;
  }

  .js .nav:not(.open) {
    display: none;
  }
}

@media (max-width: 620px) {
  .supports {
    grid-template-columns: minmax(0, 1fr);
  }

  .supports > div {
    padding-right: 0;
  }

  .supports > div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .fig-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body {
    font-size: 1.125rem;
  }

  .fig-frame {
    height: 210px;
  }

  .fig-small .fig-frame {
    height: 130px;
  }

  .figures,
  .proof {
    grid-template-columns: minmax(0, 1fr);
  }

  .figures {
    grid-auto-flow: row;
  }

  .figures li + li,
  .proof li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .rules div,
  .rules.wide div {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules dt {
    padding-top: 0;
  }

  .steps li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .steps li span {
    grid-column: 2;
  }

  .ladder,
  .fig-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .ladder li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .form .pair {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .pager a + a {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--ink);
    text-align: left;
  }

  .pager a + a .label {
    justify-content: flex-start;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  :root,
  :root:not([data-theme='light']) {
    color-scheme: light;
    --paper: #fff;
    --ink: #000;
    --muted: #333;
    --faint: #bbb;
    --red: #b02a18;
    --red-text: #b02a18;
    --step: 28pt;
  }

  body {
    font-size: 11pt;
  }

  .nav,
  .skip,
  .pager,
  .actions,
  .side-action,
  .footer {
    display: none;
  }

  /* A figure that was never scrolled into view still prints. */
  .fig .fig-svg {
    clip-path: none !important;
  }

  .study-side {
    position: static;
  }

  .part,
  .client,
  .entry,
  .ledger-row,
  .figures li,
  .proof li,
  .fig {
    break-inside: avoid;
  }
}
