@font-face {
  font-family: "Nimbus Roman";
  src: url("/type/nimbus-roman-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nimbus Roman";
  src: url("/type/nimbus-roman-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Nimbus Roman";
  src: url("/type/nimbus-roman-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nimbus Mono PS";
  src: url("/type/nimbus-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --enamel: #d3dbd0;
  --enamel-deep: #b3c0b1;
  --graphite: #232a2b;
  --slate: #44504b;
  --paper: #f6f5ee;
  --ribbon-red: #a3231e;
  --brass: #b0904a;

  --roman: "Nimbus Roman", "Times New Roman", Times, serif;
  --mono: "Nimbus Mono PS", "Courier New", Courier, monospace;

  /* the page hangs from one line: the margin stop */
  --edge: clamp(1.25rem, 4.5vw, 4rem);
  --rail: 9.5rem;
  --gap: 1.75rem;
  --stop: calc(var(--edge) + var(--rail) + var(--gap));
  --text: 38rem;
  --wide: 20rem;
}

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

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

body {
  margin: 0;
  background: var(--enamel);
  color: var(--graphite);
  font-family: var(--roman);
  font-size: 1.1875rem;
  line-height: 1.58;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--ribbon-red);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--ribbon-red); }
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ribbon-red);
  outline-offset: 3px;
  border-radius: 1px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 2.9rem); letter-spacing: -0.012em; line-height: 1.04; }
h2 { font-size: 1.5rem; margin-top: 2.4rem; margin-bottom: 0.55rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.05rem; }
strong { font-weight: 700; }

.to-bench {
  position: absolute;
  left: var(--edge);
  top: -4rem;
  background: var(--graphite);
  color: var(--enamel);
  padding: 0.4rem 0.8rem;
  text-decoration: none;
}
.to-bench:focus { top: 0.5rem; }
.to-bench:hover { color: var(--paper); }

/* ---------- a row that keeps something in the margin, left of the stop ---------- */
.margin-set {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
  margin-left: calc(-1 * (var(--rail) + var(--gap)));
}
.in-margin {
  text-align: right;
  margin: 0;
}

/* ---------- masthead ---------- */
.masthead {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: center;
  padding: 1.6rem var(--edge) 1.5rem;
}
.masthead-name {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
  justify-self: end;
}
.nameplate {
  display: inline-block;
  background-color: var(--brass);
  background-image:
    radial-gradient(circle at 0.62em 50%, var(--graphite) 0 0.12em, transparent 0.15em),
    radial-gradient(circle at calc(100% - 0.62em) 50%, var(--graphite) 0 0.12em, transparent 0.15em);
  color: var(--graphite);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  padding: 0.5em 1.3em 0.44em;
  border-radius: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}
.nameplate:hover { color: var(--graphite); background-color: #bb9b55; }
.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.9rem;
  font-size: 1.0625rem;
}
.masthead nav a { text-decoration-line: none; padding: 0.3rem 0; }
.masthead nav a:hover { text-decoration-line: underline; }
.masthead nav a[aria-current] {
  text-decoration-line: underline;
  text-decoration-thickness: 0.14em;
}

/* ---------- the bench: every page's main column ---------- */
.benchtop {
  padding: 0 var(--edge) 4.5rem var(--stop);
}
.benchtop > *,
.entry-body > * { max-width: var(--text); }
.benchtop > .wide,
.entry-body > .wide { max-width: calc(var(--text) + var(--wide)); }

.benchtop > .margin-set,
.entry-body > .margin-set,
.benchtop article > * { max-width: none; }
.benchtop > article { max-width: none; }

.page-head { margin-top: 2.6rem; margin-bottom: 1.6rem; }
.page-head + p, .lede { font-size: 1.28rem; line-height: 1.45; }

/* ---------- type samples: the only paper on the site ---------- */
.sample {
  margin: 1.2rem calc(-1 * var(--edge)) 0 calc(-1 * var(--stop));
  max-width: none;
}
.slip {
  background: var(--paper);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
  row-gap: 0.1rem;
  align-items: center;
  padding: 1.6rem var(--edge) 1.45rem;
  border-bottom: 1px solid #dddbcf;
}
.slip img { max-width: 72rem; }
.sample-inset .slip { max-width: calc(var(--stop) + var(--text) + var(--wide)); padding-right: 1.6rem; }
.sample-lead { margin-top: 0.4rem; }
.sample-lead .slip {
  padding-block: 2rem 1.6rem;
  row-gap: 0.9rem;
}
.sample-label {
  text-align: right;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--slate);
  line-height: 1.2;
}
.slip picture { display: block; min-width: 0; }
.slip img { display: block; width: 100%; height: auto; }
.sample figcaption,
.plate-note,
.drawing-note {
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--slate);
}
.sample figcaption {
  margin: 0.6rem var(--edge) 0 var(--stop);
  max-width: var(--text);
}
/* a single strip set inside running text */
.sample-inset { margin-top: 1.6rem; margin-bottom: 1.6rem; }
/* a "before" strip used as a link in a shelf row */
.chip {
  display: block;
  background: var(--paper);
  padding: 0.55rem 0.9rem 0.5rem 0.6rem;
  margin: 0.7rem 0 0 -0.6rem;
  border-bottom: 1px solid #dddbcf;
  max-width: calc(var(--text) + var(--wide) + 0.6rem);
}
.chip img { display: block; width: 100%; height: auto; }
.chip picture { display: block; }

/* ---------- entry ---------- */
.entry-head { margin-top: 2.4rem; }
.entry-head .in-margin { padding-top: 0.5rem; }
.entry-head h1 { max-width: 17em; }
.entry-meta {
  font-style: italic;
  color: var(--slate);
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 0.7rem 0 0;
  max-width: calc(var(--text) + var(--wide));
}
.entry-meta time { white-space: nowrap; }
.shelf-tag {
  display: inline-block;
  position: relative;
  background: var(--brass);
  color: var(--graphite);
  font-weight: 700;
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1;
  padding: 0.5em 0.72em 0.44em 1.55em;
  white-space: nowrap;
  text-decoration: none;
  clip-path: polygon(0.55em 0, 100% 0, 100% 100%, 0.55em 100%, 0 calc(100% - 0.5em), 0 0.5em);
}
.shelf-tag::before {
  content: "";
  position: absolute;
  left: 0.52em;
  top: 50%;
  width: 0.46em;
  height: 0.46em;
  margin-top: -0.23em;
  border-radius: 50%;
  background: var(--enamel);
}
.note-mark {
  font-style: italic;
  color: var(--slate);
  font-size: 1.0625rem;
}
.entry-body { margin-top: 2.2rem; }
.typed, .typed-line {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}
.typed { white-space: nowrap; }
.typed-line {
  background: var(--paper);
  padding: 0.7rem 0.9rem 0.6rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #dddbcf;
}

/* ---------- plates ---------- */
.plate {
  margin: 2rem 0 2.1rem;
  display: grid;
  grid-template-columns: minmax(0, var(--text)) minmax(11rem, 1fr);
  column-gap: var(--gap);
  align-items: end;
}
.plate img { display: block; width: 100%; height: auto; }
.callouts {
  margin: 0 0 0.7rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.7rem;
  row-gap: 0.12rem;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.callouts dt { font-family: var(--mono); font-size: 1.05em; }
.callouts dd { margin: 0; }
.plate-note { margin: 0; }

/* ---------- what's on the machine's tag ---------- */
.bench-note { margin-top: 3rem; max-width: none; }
.bench-note h2 { margin-top: 0; margin-bottom: 0.9rem; }
.bench-note dl { margin: 0; }
.bench-note .margin-set { margin-bottom: 0.55rem; }
.bench-note dt {
  text-align: right;
  font-style: italic;
  color: var(--slate);
}
.bench-note dd { margin: 0; max-width: var(--text); }

.shelf-neighbors {
  margin-top: 3rem;
  display: grid;
  gap: 0.35rem;
}
.shelf-neighbors p { margin: 0; }
.shelf-neighbors span { font-style: italic; color: var(--slate); }

/* ---------- home ---------- */
.lead-entry { margin-top: 1.9rem; }
.lead-entry .in-margin { padding-top: 0.35rem; }
.lead-entry h2 {
  margin: 0;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.5rem);
  letter-spacing: -0.012em;
  line-height: 1.05;
}
.lead-entry h2 a { text-decoration-thickness: 0.06em; }
.lead-entry .lede { margin-top: 1rem; max-width: var(--text); }
.benchtop > .bench-intro {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  column-gap: 2.5rem;
  align-items: center;
  max-width: 72rem;
}
.bench-intro .intro-text > p:first-child { font-size: 1.28rem; line-height: 1.45; }
.machine-drawing { margin: 0; }
.machine-drawing img { display: block; width: 100%; height: auto; }
.drawing-note { margin-top: 0.5rem; }

.shelf-heading { margin-top: 4rem; margin-bottom: 0.4rem; }
.shelf { list-style: none; margin: 0; padding: 0; max-width: none; }
.shelf-row { margin-top: 2.1rem; }
.shelf-row .in-margin { padding-top: 0.1rem; }
.shelf-row h2, .shelf-row h3 { font-size: 1.4rem; margin: 0; max-width: var(--text); }
.shelf-row h2 a, .shelf-row h3 a { text-decoration-thickness: 0.06em; }
.shelf-row .entry-meta { margin-top: 0.35rem; font-size: 1.0625rem; }
.shelf-more { margin-top: 2.6rem; }

/* ---------- reading a type sample ---------- */
.reading { margin-top: 2.6rem; }
.reading h2 { margin-top: 0; }
.reading .chip { margin-top: 0.5rem; margin-bottom: 0.9rem; max-width: calc(var(--text) + 0.6rem); }

/* ---------- drawer ---------- */
.drawer {
  background: var(--enamel-deep);
  padding: 2.2rem var(--edge) 2.8rem var(--stop);
  font-size: 1.0625rem;
}
.drawer p { max-width: var(--text); margin-bottom: 0.9rem; }
.drawer nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.7rem; }
.drawer nav a { padding: 0.25rem 0; }
.drawer a:hover { color: var(--graphite); text-decoration-thickness: 0.16em; }

/* ---------- narrower: the wide column gives way first ---------- */
@media (max-width: 68rem) {
  .plate { grid-template-columns: minmax(0, 1fr); row-gap: 0.9rem; }
  .callouts { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
  .benchtop > .bench-intro { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .bench-intro .intro-text { max-width: var(--text); }
}

/* ---------- phone and small tablet: the margin folds away ---------- */
@media (max-width: 54rem) {
  :root { --rail: 0rem; --gap: 0rem; }
  body { font-size: 1.125rem; }
  .masthead { display: block; padding-top: 1.2rem; padding-bottom: 1.1rem; }
  .masthead-name { margin-bottom: 0.75rem; justify-self: start; }
  .masthead nav { gap: 0.1rem 1.4rem; }
  .margin-set { display: block; margin-left: 0; }
  .in-margin { text-align: left; }
  .entry-head .in-margin, .lead-entry .in-margin { padding-top: 0; margin-bottom: 0.7rem; }
  .shelf-row .in-margin { margin-bottom: 0.45rem; }
  .slip { display: block; padding: 1rem var(--edge) 0.9rem; }
  .sample-lead .slip { padding-block: 1.3rem 1.2rem; }
  .sample-label { display: block; text-align: left; margin: 0.5rem 0 0.15rem; font-size: 1rem; }
  .sample-label:first-child { margin-top: 0; }
  .bench-note dt { text-align: left; }
  .bench-note .margin-set { margin-bottom: 0.8rem; }
  .callouts { grid-template-columns: auto minmax(0, 1fr); }
  .chip { margin-left: calc(-1 * var(--edge)); margin-right: calc(-1 * var(--edge)); padding-left: var(--edge); padding-right: var(--edge); max-width: none; }
  .reading .chip { max-width: none; }
  .benchtop { padding-bottom: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; }
  .masthead nav, .drawer nav, .to-bench { display: none; }
}
