/* ==========================================================================
   fetacube — the style guide, in CSS
   "Guia de Estilo Fetacube": an archive report. Paper, rules, numbered
   captions and industrial photography. Sober by construction.
   ========================================================================== */

:root {
  /* Palette — the six colours of the guide */
  --ink: #1a1917; /* text, thick rules and dark grounds */
  --paper: #e7e2d6; /* main background */
  --paper-light: #f1ede3; /* blocks and cards */
  --rule: #c5bfae; /* lines and table edges */
  --slate: #35566e; /* links */
  --rust: #a8431c; /* numbering and kickers */

  /* Service variants */
  --rust-light: #c8621f; /* rust on a dark ground */
  --light: #f6f2e8; /* text over photography */
  --sand: #ebc9a0; /* kicker over photography */
  --hover: #efebe1; /* table row under the pointer */
  --dark: #14130f;

  /* Rules */
  --line: var(--rule);
  --line-thin: #d8d2c1;
  --line-faint: #ddd7c7;

  /* Text */
  --body: #26241f;
  --body-soft: #3d3a32;
  --mid: #3d3a32;
  --shadow: #5c5749;
  --dek: #5c5749;
  --muted: #7c776a;
  --muted-light: #8d887a;
  --dot: #b3ac99;

  /* Typefaces */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Measures */
  --column: 66ch;
  --block: 960px;
  --margin: clamp(20px, 5vw, 32px);

  /* Compatibility with the old names (the writing area still uses them) */
  --card: var(--paper-light);
  --clay: var(--rust);
  --tile: var(--slate);
  --olive: var(--slate);
  --sans: var(--mono);
  --tag-bg: var(--hover);
  --tag-border: var(--rule);
  --aside: var(--hover);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: var(--slate);
  text-decoration: none;
}

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

img {
  max-width: 100%;
}

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

/* The grain of the paper: a sheet of noise over everything, catching no clicks. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.26'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- common parts */

/* Monospaced label: dates, numbers, sections. The service voice of the guide. */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.label--rust {
  color: var(--rust);
}

.label--small {
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* Numbered section head: 01 · TITLE, over a thick rule. */
.section {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.section h1,
.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.section__pair {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

/* ------------------------------------------------------------------- header */

/* On the inside pages. The frontispiece carries none: it is the cover. */
.head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px var(--margin);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.head__brand {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}

.head__side {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------ frontispiece */

.cover {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(14px, 2.4vw, 36px);
  display: flex;
}

.cover__sheet {
  flex: 1;
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
}

.cover__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: clamp(12px, 1.6vw, 18px) clamp(16px, 2.6vw, 32px);
  border-bottom: 1px solid var(--ink);
}

.cover__masthead {
  padding: clamp(14px, 2.2vw, 30px) clamp(16px, 2.6vw, 32px) clamp(10px, 1.4vw, 16px);
}

.cover__title {
  display: block;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}

a.cover__title:hover {
  color: var(--ink);
}

.cover__strapline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 0 clamp(16px, 2.6vw, 32px) clamp(16px, 2vw, 24px);
  border-bottom: 2px solid var(--ink);
}

.cover__strapline .label:first-child {
  letter-spacing: 0.3em;
}

.cover__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rule);
}

.cover__body {
  flex: 1;
  padding: clamp(18px, 2.6vw, 32px) clamp(16px, 2.6vw, 32px);
}

.cover__captions {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(14px, 1.8vw, 20px);
}

.cover__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: clamp(14px, 2vw, 20px) clamp(16px, 2.6vw, 32px);
  border-top: 1px solid var(--ink);
}

.cover__open {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.cover__open:hover {
  color: var(--rust);
  border-color: var(--rust);
}

/* Barcode: decoration, carrying no information. */
.barcode {
  width: 116px;
  height: 24px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 3px,
    transparent 3px 5px,
    var(--ink) 5px 6px,
    transparent 6px 9px,
    var(--ink) 9px 11px,
    transparent 11px 12px,
    var(--ink) 12px 15px,
    transparent 15px 17px
  );
  opacity: 0.85;
}

/* Contact sheet: the plates of the issue, in a grid of rules. */
.plates {
  display: grid;
  /* Four frames across, so the lead can take four of them and the others fall
     in around it. dense: the small plates fill the holes the lead leaves. */
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 1px;
}

/* The rule travels with each plate, not with the sheet: the empty frames stay
   in paper, the way a contact sheet looks half shot. */
.plate {
  position: relative;
  display: block;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* The newest record, two frames by two. Same proportion as the small ones,
   four times the area. */
.plate--lead {
  grid-column: span 2;
  grid-row: span 2;
}

.plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.08) sepia(0.14);
  transition: filter 0.3s ease;
}

.plate__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 19, 15, 0) 38%, rgba(20, 19, 15, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plate__no {
  position: absolute;
  top: 7px;
  left: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  background: rgba(20, 19, 15, 0.55);
  padding: 2px 6px;
}

/* Hovering a frame dims the photograph and the record says its name. */
.plate__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 11px;
  font-family: var(--serif);
  font-size: clamp(0.84rem, 1.4vw, 1.02rem);
  line-height: 1.28;
  color: var(--light);
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.plate:hover img,
.plate:focus-visible img {
  filter: saturate(0.5) contrast(1.02) sepia(0.16) brightness(0.48);
}

.plate:hover .plate__veil,
.plate:focus-visible .plate__veil {
  opacity: 1;
}

.plate:hover .plate__title,
.plate:focus-visible .plate__title {
  opacity: 1;
  transform: none;
}

/* The lead carries its title in the open — it is the story in relief. */
.plate--lead .plate__veil {
  opacity: 1;
}

.plate__lead {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(14px, 2vw, 24px);
}

.plate__lead-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--light);
  max-width: 20ch;
  text-shadow: 0 1px 16px rgba(20, 19, 15, 0.5);
  text-wrap: balance;
}

.plate--lead:hover .plate__lead-title {
  color: var(--sand);
}

/* Without hover (touch), the sheet does not hide what it is showing. */
@media (hover: none) {
  .plate__veil {
    opacity: 1;
  }

  .plate__title {
    opacity: 1;
    transform: none;
  }
}

/* With no plates, the cover announces itself in lines of text. */
.cover-lines {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}

.cover-line {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.cover-line:hover {
  color: var(--rust);
}

.cover-line__title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  color: inherit;
}

/* ---------------------------------------------------------------- feature */

/* ---------------------------------------------------------------- contents */

.archive {
  padding: clamp(64px, 9vw, 120px) var(--margin) clamp(72px, 9vw, 110px);
}

.archive__inner {
  max-width: var(--block);
  margin: 0 auto;
}

.contents__head {
  display: grid;
  grid-template-columns: 56px 84px 1fr 52px;
  gap: 0 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.contents__head span:last-child {
  text-align: right;
}

.year {
  display: contents;
}

/* Year break inside the contents: a rule and a date. */
.year__label {
  display: block;
  margin-top: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust);
}

.entry {
  display: grid;
  grid-template-columns: 56px 84px 1fr 52px;
  gap: 6px 20px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.entry:hover {
  background: var(--hover);
  color: var(--ink);
}

.entry__no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--rust);
}

.entry__date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.entry__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.entry__title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.3;
  color: inherit;
}

.entry__excerpt {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}

.entry__measure {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.archive__end {
  margin: 40px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty {
  margin: 40px 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--dek);
  max-width: 46ch;
}

/* ----------------------------------------------------------- opening note */

.note {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 9vw, 110px) var(--margin);
}

.note__inner {
  max-width: var(--block);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.note__labels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note__labels .label--rust {
  color: var(--rust-light);
}

.note__labels .label:not(.label--rust) {
  color: rgba(231, 226, 214, 0.55);
}

.note__text {
  grid-column: span 2;
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.45;
  color: var(--paper-light);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- article */

.article {
  padding: clamp(28px, 5vw, 56px) var(--margin) clamp(56px, 8vw, 96px);
}

.article__inner {
  max-width: var(--block);
  margin: 0 auto;
  background: var(--paper-light);
  border: 1px solid var(--rule);
  padding-bottom: clamp(32px, 6vw, 80px);
}

.article__column {
  width: 100%;
  margin-top: clamp(28px, 4vw, 40px);
}

/* Opening with a plate: title and dek over the photograph. */
.article__cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  min-height: clamp(340px, 58vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.article__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) sepia(0.12);
}

.article__cover .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 19, 15, 0.5) 0%,
    rgba(20, 19, 15, 0) 34%,
    rgba(20, 19, 15, 0) 50%,
    rgba(20, 19, 15, 0.86) 100%
  );
}

.article__marks {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: clamp(18px, 2.4vw, 30px) clamp(20px, 3vw, 44px) 0;
}

.article__marks .label--rust {
  color: var(--sand);
  letter-spacing: 0.2em;
}

/* The labels sit on the photograph, and land halfway down the plate — where
   the veil hasn't darkened yet. The shadow is double on purpose: the short one
   draws the letter against a bright sky, the wide one beds it into the rest. */
.article__marks .label,

.article__marks .label:not(.label--rust) {
  color: rgba(246, 242, 232, 0.72);
}

.article__front {
  position: relative;
  padding: clamp(22px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--light);
  max-width: 22ch;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.45);
  text-wrap: balance;
}

.article__dek {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  color: rgba(246, 242, 232, 0.92);
  max-width: 48ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
  text-wrap: pretty;
}

/* Opening without a plate: the same anatomy, in paper. */
.article__cover--dry {
  min-height: 0;
  background: var(--paper-light);
  border-bottom: 2px solid var(--ink);
  padding-bottom: clamp(22px, 3vw, 40px);
}

.article__cover--dry .article__marks .label--rust {
  color: var(--rust);
}

.article__cover--dry .article__marks .label:not(.label--rust) {
  color: var(--muted);
}

.article__cover--dry .article__title {
  color: var(--ink);
  text-shadow: none;
}

.article__cover--dry .article__dek {
  color: var(--shadow);
  text-shadow: none;
}

.article__middle {
  padding: clamp(28px, 5vw, 64px) clamp(24px, 5vw, 64px) 0;
}

/* The record filecard: author, date, reading. */
.filecard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.filecard__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filecard__value {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--body);
}

/* Loose figure, at the width of the block. */
.figure {
  margin: clamp(32px, 5vw, 46px) 0;
}

.figure img {
  width: 100%;
  height: clamp(220px, 36vw, 400px);
  object-fit: cover;
  display: block;
  filter: saturate(0.76) contrast(1.06) sepia(0.1);
}

.figure figcaption {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  margin-top: 10px;
}

.figure__no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
}

.figure__text {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--body-soft);
  max-width: 60ch;
}

/* Classification: tags in a square box, no fill. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--column);
  margin: 34px auto 0;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 5px 11px;
}

a.tag:hover {
  background: var(--ink);
  color: var(--paper);
}

.neighbours {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
  max-width: var(--column);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.neighbour {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
}

.neighbour:hover {
  color: var(--rust);
}

.neighbour--next {
  text-align: right;
}

.neighbour__title {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.35;
  color: inherit;
}

/* ------------------------------------------------------ body text (markdown) */

/* The measure of the text is short and sits centred; the figures step out of it
   and go to the width of the block. A three-column grid does this without any
   negative margins: the body sits in the middle, the figure crosses end to end. */
.prose {
  display: grid;
  grid-template-columns:
    [block-inicio] minmax(0, 1fr)
    [measure-inicio] min(var(--column), 100%)
    [measure-end] minmax(0, 1fr)
    [block-end];
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.78;
  color: var(--body);
  text-wrap: pretty;
}

.prose > * {
  grid-column: measure-inicio / measure-end;
  min-width: 0;
}

.prose > figure,
.prose > pre,
.prose > .table-scroll,
.prose > table {
  grid-column: block-inicio / block-end;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin: 22px 0 0;
}

/* Drop cap on the first paragraph, in ink. */
.prose > p:first-of-type:not(.preview-empty)::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 4.4rem;
  line-height: 0.8;
  padding: 8px 12px 0 0;
  color: var(--ink);
}

.prose h2 {
  margin: 52px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose h3 {
  margin: 46px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* Kicker from inside the text: monospaced, in rust. */
.prose h4 {
  margin: 46px 0 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
}

.prose h2 + p,
.prose h3 + p,
.prose h4 + p {
  margin-top: 16px;
}

/* Numbered lists by hand: the number monospaced, each item over a rule. */
.prose ul,
.prose ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
  display: flex;
  flex-direction: column;
}

.prose li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-faint);
  font-size: 1.1rem;
  line-height: 1.6;
  counter-increment: item;
}

.prose li:last-child {
  border-bottom: 0;
}

.prose li::before {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}

.prose ol > li::before {
  content: counter(item, decimal-leading-zero);
}

.prose ul > li::before {
  content: '·';
  font-size: 14px;
}

.prose li > ul,
.prose li > ol {
  grid-column: 2;
  margin: 8px 0 0;
}

/* Quotation: steps out of the measure and centres itself, like the guide's pull quote. */
.prose blockquote {
  margin: 46px auto;
  padding: 0;
  border: 0;
  max-width: 30ch;
}

.prose blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
}

.prose blockquote p + p {
  margin-top: 14px;
}

.prose a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: var(--dot);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose em {
  font-style: italic;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 46px 0;
}

/* The figures step out of the measure of the text, to the width of the block. */
.prose figure,
.prose > p > img,
.prose > img {
  margin: 46px 0;
}

.prose figure {
  margin-left: 0;
  margin-right: 0;
}

.prose img {
  width: 100%;
  display: block;
  filter: saturate(0.76) contrast(1.06) sepia(0.1);
}

.prose figcaption {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--ink);
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--body-soft);
}

.prose figcaption::before {
  content: 'Fig.';
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--hover);
  border: 1px solid var(--rule);
  padding: 1px 5px;
}

.prose pre {
  margin: 32px 0;
  padding: 20px 22px;
  background: var(--ink);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--paper-light);
  font-size: 0.82rem;
  line-height: 1.7;
}

.prose table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

.prose th {
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

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

.footer {
  background: var(--ink);
  padding: 44px var(--margin);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-light);
}

.footer__note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--rust-light);
}

/* ----------------------------------------------------------------- actions */

.button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 11px 20px;
  cursor: pointer;
}

.button:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
}

.button--line {
  color: var(--ink);
  background: transparent;
  padding: 10px 20px;
}

.button--line:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------------------- phone */

@media (max-width: 720px) {
  /* Two frames across on the phone; the lead still takes four of them. */
  .plates {
    grid-template-columns: repeat(2, 1fr);
  }

  .contents__head {
    display: none;
  }

  .entry {
    grid-template-columns: 44px 1fr;
    gap: 4px 16px;
  }

  .entry__date {
    grid-column: 2;
  }

  .entry__body {
    grid-column: 2;
  }

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

  .note__text {
    grid-column: auto;
  }

  .cover__captions {
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .cover__dates .label:nth-child(2),
  .cover__dot {
    display: none;
  }

  .cover__end .label {
    display: none;
  }

  .prose > p:first-of-type::first-letter {
    font-size: 3.6rem;
    padding-right: 10px;
  }

  .neighbour--next {
    text-align: left;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
