/* ============================================================
   vaaigue.com
   Content lives in the ENTRIES and PROJECTS lists near the bottom
   of this file. Images live in the /images folder next to it.

   THE PALETTE: four colours, and only four:

     paper  #faf8f4   the page
     ink    #17160f   the words
     brick  #8a3324   the accent: the ordinary thing, links, the mark
     clay   #e6ddcf   hairlines and tinted surfaces

   Anything on the site that looks like a fifth colour is one of these
   four at a lower strength (grey text is ink at 62–74%; a tinted panel
   is clay at 45%). Dark mode swaps paper and ink and lifts brick toward
   paper so it stays readable: still the same four. Every pairing below
   passes WCAG AA contrast.

   If you're ever tempted to add a colour: don't. Use one of these at a
   different strength instead.
   ============================================================ */

:root {
  /* the four */
  --paper: #faf8f4;
  --ink:   #17160f;
  --brick: #8a3324;
  --clay:  #e6ddcf;

  /* what the page actually uses: roles, each drawn from the four */
  --bg:     var(--paper);
  --fg:     var(--ink);
  --fg-2:   #52514b;   /* ink at 74%: secondary text */
  --fg-3:   #6d6c66;   /* ink at 62%: labels, meta */
  --accent: var(--brick);
  --line:   var(--clay);
  --wash:   #f1ece3;   /* clay at 45%: tinted surfaces */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max:    112rem;                        /* widest the layout goes (about 1800px) */
  --gutter: clamp(1rem, 3.2vw, 2.75rem);   /* space at the screen edges */
  --text:   37rem;                         /* the reading column, ~70 characters */
  --gap:    3.25rem;                       /* between columns */

  /* paper textures: generated noise and torn edges, drawn only in the four colours */
  --grain: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22256%22 height=%22256%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%221.15%22 numOctaves=%222%22 seed=%223%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.0902 0 0 0 0 0.0863 0 0 0 0 0.0588 0 0 0 3.4 -1.78%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22256%22 height=%22256%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%221.15%22 numOctaves=%222%22 seed=%223%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.9804 0 0 0 0 0.9725 0 0 0 0 0.9569 0 0 0 3.4 -1.82%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --mottle: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22720%22 height=%22720%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.005%22 numOctaves=%223%22 seed=%228%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.9020 0 0 0 0 0.8667 0 0 0 0 0.8118 0 0 0 3.0 -1.12%22/%3E %3CfeComponentTransfer%3E%3CfeFuncA type=%22table%22 tableValues=%220 0.45 0.45%22/%3E%3C/feComponentTransfer%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --mottle-dark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22720%22 height=%22720%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.007%22 numOctaves=%223%22 seed=%228%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.9020 0 0 0 0 0.8667 0 0 0 0 0.8118 0 0 0 0.08 0%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --fibre: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22260%22 height=%22260%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.42%22 numOctaves=%223%22 seed=%2211%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.0902 0 0 0 0 0.0863 0 0 0 0 0.0588 0 0 0 2.2 -1.05%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --voids: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22320%22 height=%22320%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.38%22 numOctaves=%222%22 seed=%225%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.9804 0 0 0 0 0.9725 0 0 0 0 0.9569 0 0 0 5.0 -3.3%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --voids-dark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22320%22 height=%22320%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.38%22 numOctaves=%222%22 seed=%225%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.0902 0 0 0 0 0.0863 0 0 0 0 0.0588 0 0 0 5.0 -3.3%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --print: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22200%22 height=%22200%22%3E %3Cfilter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22%3E %3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%221.4%22 numOctaves=%221%22 seed=%2217%22 stitchTiles=%22stitch%22/%3E %3CfeColorMatrix type=%22matrix%22 values=%220 0 0 0 0.0902 0 0 0 0 0.0863 0 0 0 0 0.0588 0 0 0 3.0 -1.55%22/%3E %3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
  --tear-top: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22900%22 height=%2216%22 viewBox=%220 0 900 16%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M0,16 L0,5.180240448687172 L4.9,5.7 L9.5,5.7 L20.7,8.6 L29.6,4.7 L34.5,4.2 L46.0,9.0 L51.7,5.0 L62.3,9.3 L67.1,7.3 L75.6,3.9 L80.4,10.0 L89.4,4.9 L98.5,9.6 L107.1,5.8 L115.0,3.8 L126.3,12.7 L132.8,6.8 L139.9,10.5 L147.6,4.1 L154.1,5.3 L161.0,7.0 L165.9,3.0 L176.8,7.4 L183.8,3.9 L188.1,8.1 L200.7,8.4 L204.9,4.8 L215.9,5.8 L225.5,9.0 L231.2,6.1 L238.6,10.2 L242.7,2.9 L253.8,5.4 L258.6,10.4 L264.5,11.1 L274.6,12.2 L280.8,10.5 L289.6,8.7 L302.5,6.3 L310.2,2.8 L316.4,9.6 L324.9,2.8 L331.1,4.2 L342.9,13.7 L352.0,10.4 L364.1,7.7 L374.8,6.5 L380.7,9.5 L393.0,5.2 L404.2,7.6 L413.0,7.7 L419.4,9.9 L424.1,10.3 L434.1,2.9 L439.2,10.2 L443.8,3.8 L452.9,8.5 L458.9,2.5 L463.0,9.5 L474.3,8.8 L483.2,9.5 L493.3,5.1 L504.2,6.3 L508.5,2.8 L516.9,9.4 L522.1,5.4 L530.8,2.6 L542.3,3.2 L549.7,8.8 L555.8,6.4 L560.7,3.4 L572.6,6.6 L584.4,13.6 L590.1,4.9 L597.9,8.9 L609.8,3.9 L618.2,5.2 L630.4,11.6 L639.3,6.4 L647.6,3.1 L659.3,5.4 L672.1,7.5 L681.6,5.0 L689.8,9.8 L701.6,8.8 L709.6,3.6 L716.9,7.8 L721.6,3.7 L727.2,9.7 L736.4,5.3 L741.2,5.7 L746.9,7.7 L753.6,13.8 L765.0,8.9 L777.6,3.8 L786.1,7.1 L796.9,10.2 L806.8,7.9 L816.3,9.2 L828.7,5.7 L840.8,8.1 L846.8,5.1 L859.8,9.7 L867.4,9.0 L875.1,2.6 L884.0,8.0 L891.3,10.1 L900,5.180240448687172 L900,16 Z%22 fill=%22black%22/%3E%3C/svg%3E");
  --tear-bottom: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22900%22 height=%2216%22 viewBox=%220 0 900 16%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M0,0 L0,9.684963210924893 L7.4,12.4 L11.4,9.5 L16.1,9.1 L20.5,10.5 L28.6,7.7 L34.7,12.6 L47.0,8.8 L54.5,7.5 L61.1,8.1 L68.9,12.8 L74.8,11.3 L80.6,6.4 L85.1,10.5 L89.3,10.1 L94.3,8.7 L103.5,6.3 L107.6,12.8 L111.7,12.8 L124.0,10.1 L133.8,12.8 L139.3,8.6 L143.8,9.1 L149.2,11.4 L162.1,12.5 L174.7,11.6 L179.1,10.6 L188.4,7.3 L195.5,6.6 L203.6,10.3 L212.8,13.4 L219.7,10.0 L227.7,10.9 L237.4,12.7 L241.6,7.3 L250.1,7.8 L260.7,10.1 L273.4,10.3 L285.1,10.5 L290.7,6.8 L295.1,5.7 L307.7,5.6 L311.8,13.0 L319.3,8.6 L326.5,12.4 L331.7,12.8 L342.0,13.0 L352.3,7.4 L364.3,12.1 L375.2,6.5 L380.1,13.1 L385.7,8.5 L396.7,4.9 L404.8,9.0 L410.4,9.6 L419.2,2.0 L431.2,9.1 L440.0,3.3 L448.9,11.1 L459.4,12.7 L467.5,9.6 L471.9,8.7 L483.8,11.7 L494.4,8.5 L498.7,8.7 L508.8,4.8 L518.3,4.3 L526.5,2.8 L533.5,2.2 L542.9,5.7 L554.4,12.7 L560.4,7.3 L566.4,12.6 L578.9,5.7 L589.5,9.8 L596.9,8.4 L603.2,9.4 L611.1,5.1 L622.3,13.0 L634.0,8.7 L638.5,11.3 L649.7,5.7 L661.8,6.1 L674.1,5.8 L681.0,11.5 L689.4,10.7 L697.0,11.8 L705.1,8.6 L713.1,12.0 L720.0,12.1 L725.7,7.8 L731.0,8.5 L739.0,8.6 L750.9,7.6 L759.8,3.6 L768.1,6.6 L779.6,9.4 L790.0,11.2 L794.7,13.4 L799.0,12.3 L803.9,6.9 L813.7,10.3 L822.3,12.4 L829.5,11.3 L837.0,12.0 L848.8,3.1 L853.0,9.7 L863.1,6.2 L869.5,12.4 L879.7,11.6 L890.4,10.7 L900,9.7 L900,0 Z%22 fill=%22black%22/%3E%3C/svg%3E");

  --tex-grain: var(--grain); --tex-mottle: var(--mottle); --tex-voids: var(--voids);
  --scrap: var(--clay);
}

html[data-theme="dark"] {
  --bg:     var(--ink);
  --fg:     var(--paper);
  --fg-2:   #bfbdb8;   /* paper at 74% */
  --fg-3:   #9f9e98;   /* paper at 60% */
  --accent: #b78277;   /* brick lifted 40% toward paper */
  --line:   #403e35;   /* clay at 20% */
  --wash:   #2a2820;   /* clay at 9% */
  --tex-grain: var(--grain-dark); --tex-mottle: var(--mottle-dark); --tex-voids: var(--voids-dark);
  --scrap: var(--line);
}

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  /* rem, not px, so the reader's own browser font-size setting still works */
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
@supports not selector(:focus-visible) {
  a:focus, button:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.empty { color: var(--fg-3); font-style: italic; padding: 2rem 0; }

/* small type: the notebook's margin voice */
.meta, .label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-3);
}
.label { margin: 0 0 1rem; }
.ord { font-style: italic; color: var(--accent); }     /* "on a pencil" wherever it appears */
.go {                                                   /* a quiet arrow link */
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line);
  padding-bottom: .1rem; transition: border-color .2s;
}
.go:hover { border-bottom-color: var(--accent); }

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

/* the masthead is a strip of paper with a torn lower edge, pinned to the top.
   It's fixed rather than sticky, and the page is padded by its full height,
   so when it slims down on scroll nothing underneath jumps. */
body { padding-top: var(--head-h, 7rem); }
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background-color: var(--wash);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat, var(--tear-bottom) bottom left / 900px 14px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat, var(--tear-bottom) bottom left / 900px 14px repeat-x;
  padding-bottom: 12px;
}
.mast-row {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .7rem 2.2rem;
  padding-top: clamp(1rem, 2.2vw, 1.6rem); padding-bottom: clamp(.8rem, 1.8vw, 1.2rem);
  transition: padding .25s ease;
}
.brand, .creed { transition: font-size .25s ease, opacity .2s ease; }
/* once you scroll: a slim bar: the mark and the way around, nothing else */
.masthead.slim .mast-row { padding-top: .55rem; padding-bottom: .45rem; row-gap: .3rem; }
.masthead.slim .brand { font-size: 1.75rem; }
.masthead.slim .creed { display: none; }
.masthead .nav-links { margin-left: auto; }   /* nav and toggle always sit on the right */
.masthead.measuring, .masthead.measuring * { transition: none !important; }
.brand {
  font-size: clamp(2.4rem, 5vw, 3.3rem); line-height: .9; font-weight: 300;
  letter-spacing: -.025em; text-decoration: none;
}
.brand em { font-style: italic; color: var(--accent); }
.creed { font-style: italic; color: var(--fg-2); font-size: 1.1rem; margin: 0; flex: 1 1 16rem; }
.mast-meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }

.navbar { border-bottom: 1px solid var(--line); }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .3rem; padding-bottom: .9rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .4rem 2rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; }
.nav-links a { text-decoration: none; color: var(--fg-2); padding: .3rem 0; border-bottom: 1px solid transparent; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.on { color: var(--fg); border-bottom-color: var(--accent); }
.nav-sep { display: none; }
.theme-toggle {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  background: none; color: var(--fg-2); cursor: pointer;
  border: 1px solid var(--line); border-radius: 100px; padding: .4rem .8rem;
  transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg-3); }

/* ---------- section openers: a light italic word, not a bar ---------- */

.section { margin-top: clamp(3.5rem, 8vw, 6.5rem); }
.opener {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.5rem;
  border-top: 1px solid var(--line); padding-top: 1.1rem; margin-bottom: 2.2rem;
}
.opener h2 {
  font-style: italic; font-weight: 300; font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1; letter-spacing: -.02em; margin: 0;
}
.opener h2::after { content: "."; color: var(--accent); font-style: normal; }

.page-head { padding-top: clamp(2.4rem, 6vw, 4.5rem); }
.page-title {
  font-style: italic; font-weight: 300; font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: .92; letter-spacing: -.035em; margin: 0;
}
.page-title::after { content: "."; color: var(--accent); font-style: normal; }
.page-intro { font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.5; color: var(--fg-2); max-width: 40rem; margin: 1.6rem 0 0; }

/* ---------- the ordinary thing, set large ----------
   The site's one recurring picture: the everyday word a piece is about. */

.word {
  display: block; font-style: italic; font-weight: 300; color: var(--accent);
  font-size: clamp(3.6rem, 12.5vw, 12rem); line-height: .86; letter-spacing: -.045em;
  overflow-wrap: anywhere; margin: 0;
}
.word-sm { font-size: clamp(2.8rem, 7vw, 6rem); }

/* ---------- home: the latest piece as a spread ---------- */

/* The opening spread fills exactly the screen below the header, so the first
   view is always a complete composition. A small script (fitLead) makes sure
   nothing ever runs past the fold: it drops the image, tightens the text and
   shrinks the big word, in that order, until everything fits. */
a.lead {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.2rem var(--gap);
  align-items: end; align-content: end; text-decoration: none; color: inherit;
  min-height: calc(100vh - var(--head-h, 7rem));
  padding: clamp(1rem, 3vh, 2.4rem) 0 clamp(1.4rem, 4.5vh, 3rem);
}
@supports (height: 100svh) { a.lead { min-height: calc(100svh - var(--head-h, 7rem)); } }
a.lead .word { font-size: var(--word-size, min(12.5vw, 34vh)); }
a.lead.no-img .lead-img { display: none; }
a.lead.tight .lead-title { font-size: clamp(1.5rem, 2.4vw, 2rem); }
a.lead.tight .lead-why { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: .7rem; }
a.lead.tight .lead-foot { margin-top: .9rem; }
a.lead.bare .lead-why, a.lead.bare .lead-foot .in, a.lead.bare .lead-left .meta { display: none; }
a.lead.bare { padding-top: .6rem; padding-bottom: .8rem; }
.lead-left .meta { display: block; margin-bottom: 1rem; }
.lead-img { display: block; height: clamp(7rem, 32vh, 26rem); overflow: hidden; margin-bottom: 1.4rem; background: var(--wash); position: relative; }
.lead-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-title { display: block; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.1; letter-spacing: -.02em; }
a.lead:hover .lead-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
.lead-by { display: block; font-family: var(--mono); font-size: .76rem; color: var(--fg-3); margin-top: .7rem; }
.lead-why { display: block; font-size: 1.15rem; line-height: 1.5; color: var(--fg-2); margin-top: 1.1rem; }
.lead-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.4rem; }
.lead-foot .in { font-style: italic; color: var(--fg-3); font-size: .98rem; }

/* ---------- index entries (the list, and anywhere pieces are listed) ---------- */

.index {
  display: grid; column-gap: var(--gap); row-gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
}
a.entry {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0 .9rem;
  text-decoration: none; color: inherit;
  border-top: 1px solid var(--line); padding: 1.3rem 0 2rem;
}
.entry-n { font-family: var(--mono); font-size: .72rem; color: var(--fg-3); padding-top: .3rem; transition: color .2s; }
a.entry:hover .entry-n { color: var(--accent); }
.entry-body { display: block; min-width: 0; }
.entry-ord { display: block; font-style: italic; color: var(--accent); font-size: 1.05rem; }
.entry-title { display: block; font-size: 1.5rem; line-height: 1.18; letter-spacing: -.012em; margin-top: .15rem; }
a.entry:hover .entry-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
.entry-by { display: block; font-family: var(--mono); font-size: .72rem; color: var(--fg-3); margin-top: .5rem; }
.entry-why { display: block; font-size: 1rem; line-height: 1.52; color: var(--fg-2); margin-top: .7rem; }
.entry-in { display: block; font-style: italic; font-size: .92rem; color: var(--fg-3); margin-top: .7rem; }

/* ---------- the thread: a project's pieces on a single line ---------- */

.project {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem var(--gap);
  border-top: 1px solid var(--line); padding: 1.6rem 0 2.4rem;
}
.project + .project { margin-top: 0; }
.opener + .project { border-top: 0; padding-top: .2rem; }  /* one rule, not two */
.project-title { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 400; margin: .7rem 0 0; }
.project-title a { text-decoration: none; }
.project-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .12em; }
.project-q { font-style: italic; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.45; color: var(--fg-2); margin: 1rem 0 1.4rem; max-width: 32rem; }
.project-lenses { margin: 0 0 1.4rem; }

ol.thread { list-style: none; margin: 0; padding: 0; position: relative; }
ol.thread::before {
  content: ""; position: absolute; left: .42rem; top: .7rem; bottom: 1.4rem; width: 1px; background: var(--accent);
}
ol.thread > li { position: relative; padding: 0 0 1.9rem 2.3rem; }
ol.thread > li::before {
  content: ""; position: absolute; left: 0; top: .42rem; width: .85rem; height: .85rem; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent); transition: background .2s;
}
ol.thread > li:hover::before { background: var(--accent); }
ol.thread a { text-decoration: none; display: block; }
.t-n { font-family: var(--mono); font-size: .72rem; color: var(--fg-3); }
.t-lens { font-style: italic; color: var(--accent); margin-left: .5rem; }
.t-title { display: block; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.01em; margin-top: .2rem; }
ol.thread a:hover .t-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
.t-by { display: block; font-family: var(--mono); font-size: .72rem; color: var(--fg-3); margin-top: .4rem; }
.t-why { display: block; font-size: 1rem; line-height: 1.5; color: var(--fg-2); margin-top: .5rem; max-width: 40rem; }
ol.thread.big .t-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
ol.thread.big > li { padding-bottom: 2.6rem; }

/* ---------- the list: search ---------- */

.controls { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem 1.6rem; margin-bottom: 1.8rem; }
.search {
  flex: 0 1 20rem; min-width: 12rem;
  font-family: var(--mono); font-size: .8rem; padding: .45rem .1rem;
  background: transparent; color: var(--fg); border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  -webkit-appearance: none; appearance: none; transition: border-color .2s;
}
.search::placeholder { color: var(--fg-3); }
/* the browser's own clear button is blue: redraw it in ink so the palette holds */
.search::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: .7em; height: .7em; cursor: pointer;
  background: linear-gradient(45deg, transparent 44%, var(--fg-3) 44% 56%, transparent 56%),
              linear-gradient(-45deg, transparent 44%, var(--fg-3) 44% 56%, transparent 56%);
}
.search:focus { outline: none; border-bottom-color: var(--accent); }

/* ---------- the top of a piece ---------- */

.piece-visual { margin: 0; }
.piece-visual img { width: 100%; height: clamp(15rem, 44vw, 36rem); object-fit: cover; display: block; background: var(--wash); }
.piece-visual figcaption { font-family: var(--mono); font-size: .72rem; color: var(--fg-3); padding-top: .6rem; }

.title-block { padding-top: clamp(2rem, 5vw, 3.6rem); }
.title-block > .meta { display: block; margin-bottom: 1rem; }
.tb-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem); gap: 2rem var(--gap);
  margin-top: clamp(1.6rem, 3.5vw, 2.6rem); padding-bottom: 2rem; border-bottom: 1px solid var(--line);
}
.title-block h1 {
  font-weight: 400; font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: 1.06;
  letter-spacing: -.024em; margin: 0; max-width: 52rem;
}
.standfirst { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.42; color: var(--fg-2); margin: 1.2rem 0 0; max-width: 44rem; }
.standfirst a { color: var(--accent); }
.tb-side { font-size: .98rem; line-height: 1.5; align-self: end; }
.tb-side p { margin: 0 0 .9rem; }
.tb-side .label { margin-bottom: .35rem; }
.tb-side .orig-title { font-style: italic; }
.tb-side .orig-by { font-family: var(--mono); font-size: .74rem; color: var(--fg-3); display: block; margin-top: .2rem; }
.tb-side .in-project a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line); }
.tb-side .in-project a:hover { border-bottom-color: var(--accent); }

/* ---------- the reading area: contents | text | notes ----------
   Three columns on a wide screen. Paragraphs sit in the middle one.
   Wide images, tables and galleries spread into the right-hand one.
   Footnotes become side notes beside the line that cites them. */

.article-grid {
  position: relative; display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [text-start] minmax(0, var(--text))
    [text-end]   minmax(0, 1fr)
    [full-end];
  column-gap: var(--gap);
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  font-size: 1.1875rem; line-height: 1.64;
}
.article-grid > * { grid-column: text; }
.article-grid .body { display: contents; }
.article-grid .body > * { grid-column: text; }
.article-grid .bleed-right,
.article-grid .body > .bleed-right { grid-column: text-start / full-end; }

.aside-left, .aside-right {
  position: absolute; top: 0; bottom: 0;
  width: calc((100% - min(var(--text), 100%) - 2 * var(--gap)) / 2);
}
.aside-left { left: 0; }
.aside-right { right: 0; }
/* positioned children of a grid would otherwise be placed inside the text
   column; `auto` measures them against the whole grid instead */
.article-grid > .aside-left, .article-grid > .aside-right { grid-column: auto; grid-row: auto; }
.aside-left .sticky { position: sticky; top: calc(var(--head-slim, 4rem) + 1.4rem); max-height: calc(100vh - var(--head-slim, 4rem) - 2.8rem); overflow: auto; }
.toc-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 .7rem; }
.toc-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc-list button {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-left: 1px solid transparent; margin-left: -1px;
  padding: .3rem 0 .3rem 1rem;
  font-family: var(--serif); font-size: .98rem; line-height: 1.35; color: var(--fg-3);
  transition: color .2s, border-color .2s;
}
.toc-list button:hover { color: var(--fg); }
.toc-list li.sub button { padding-left: 1.8rem; font-size: .92rem; font-style: italic; }
.toc-list li.active button { color: var(--fg); border-left-color: var(--accent); }
.aside-block { margin-top: 2.2rem; }
.toc-thread { list-style: none; padding: 0; margin: 0 0 1rem; position: relative; }
.toc-thread::before { content: ""; position: absolute; left: .3rem; top: .55rem; bottom: .55rem; width: 1px; background: var(--accent); }
.toc-thread li { position: relative; padding-left: 1.3rem; margin-bottom: .5rem; font-size: .95rem; line-height: 1.35; }
.toc-thread li::before { content: ""; position: absolute; left: 0; top: .42rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.toc-thread li.here { font-style: italic; color: var(--accent); }
.toc-thread li.here::before { background: var(--accent); }
.toc-thread a { text-decoration: none; color: var(--fg-2); }
.toc-thread a:hover { color: var(--fg); }
.toc-more { font-family: var(--mono); font-size: .72rem; color: var(--accent); text-decoration: none; }
.toc-more:hover { text-decoration: underline; }

/* side notes */
.sidenote {
  position: absolute; left: 0; right: 0;
  font-size: .9rem; line-height: 1.5; color: var(--fg-2);
  padding: .1rem 0 .1rem .9rem; border-left: 1px solid var(--line);
  transition: border-color .4s, color .4s;
}
.sidenote b { font-family: var(--mono); font-weight: 400; font-size: .78rem; color: var(--accent); margin-right: .45rem; }
.sidenote a { color: var(--accent); }
.sidenote.flash { border-left-color: var(--accent); color: var(--fg); }
/* only where there's a margin to put them in */
@media (min-width: 72rem) { .article-grid.has-sidenotes .footnotes { display: none; } }

[data-toc], .article-grid h2, .thread-part, [id^="fn-"], [id^="part-"] { scroll-margin-top: calc(var(--head-slim, 4rem) + 1.5rem); }

/* ---------- prose ---------- */

.body > p { margin: 0 0 1.25rem; }
.body > p.lead::first-letter {
  font-size: 3.5rem; line-height: .82; float: left; color: var(--accent);
  padding: .16rem .55rem .1rem 0; font-weight: 300; font-style: italic;
}
.body h2 {
  font-size: 1.6rem; font-weight: 400; font-style: italic; letter-spacing: -.012em; line-height: 1.25;
  margin: 1.9rem 0 .9rem;
}
.body h3 { font-size: 1.15rem; font-weight: 500; margin: 1.6rem 0 .7rem; }
.body ul { padding-left: 1.15rem; margin: 0 0 1.35rem; }
.body li { margin-bottom: .55rem; }
.body ol { padding-left: 1.35rem; margin: 0 0 1.35rem; }
.body ol li { margin-bottom: .55rem; }
.body li::marker { color: var(--accent); }

.body a, .open-q a, .part-why a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--line); transition: border-color .2s;
}
.body a:hover { border-bottom-color: var(--accent); }
.body strong { font-weight: 500; }
.body code, .standfirst code { font-family: var(--mono); font-size: .85em; background: var(--wash); padding: .1em .35em; border-radius: 3px; }

.body p.note { font-size: .95rem; line-height: 1.55; color: var(--fg-2); border-left: 1px solid var(--line); padding-left: 1.15rem; margin: 0 0 1.35rem; }
.body p.divider { text-align: center; color: var(--accent); letter-spacing: .6em; margin: 1.4rem 0 2.4rem; font-size: .9rem; }

.body .epigraph { font-style: italic; text-align: center; color: var(--fg-2); max-width: 28rem; margin: 0 auto 2.4rem; line-height: 1.5; justify-self: center; }
.body .epigraph cite { display: block; font-family: var(--mono); font-size: .72rem; font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-top: .8rem; }

.body blockquote { margin: 1rem 0 2rem; padding-left: 1.15rem; border-left: 1px solid var(--line); font-style: italic; color: var(--fg-2); }
.body blockquote cite { display: block; font-family: var(--mono); font-size: .72rem; font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); margin-top: .7rem; }
.body blockquote.excerpt { background: var(--wash); border-left: 2px solid var(--accent); padding: 1.2rem 1.35rem; font-style: normal; color: var(--fg); }
.body p.verse { font-style: italic; line-height: 1.75; padding-left: 1.15rem; border-left: 1px solid var(--line); margin: 1rem 0 2rem; }

.body dl { margin: 0 0 1.5rem; }
.body dt { font-style: italic; color: var(--accent); margin-top: 1.1rem; }
.body dd { margin: .2rem 0 0; color: var(--fg-2); }

.table-wrap { overflow-x: auto; }
.body table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.body th, .body td { text-align: left; padding: .6rem .9rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.body th { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); font-weight: 400; }

.body pre.codeblock { font-family: var(--mono); font-size: .8rem; line-height: 1.6; background: var(--wash); padding: 1rem 1.15rem; overflow-x: auto; margin: 1rem 0 2rem; }
.body pre.codeblock code { background: none; padding: 0; font-size: inherit; }

.body a.related {
  display: block; text-decoration: none; color: var(--fg);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1rem 0; margin: 1rem 0 2.2rem;
}
.related-label { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); margin-bottom: .35rem; }
.related-title { display: block; font-size: 1.25rem; line-height: 1.3; }
.body a.related:hover .related-title { color: var(--accent); }
.related-by { display: block; font-family: var(--mono); font-size: .72rem; color: var(--fg-3); margin-top: .35rem; }

sup.fnref { font-size: .68em; line-height: 0; }
sup.fnref a { border-bottom: none; color: var(--accent); padding: 0 .1em; font-family: var(--mono); }
.footnotes { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1rem; }
.footnotes .label { margin-bottom: .6rem; }
.footnotes ol { padding-left: 1.35rem; margin: 0; }
.footnotes li { font-size: .92rem; line-height: 1.55; color: var(--fg-2); margin-bottom: .7rem; }
.footnotes .fnback { border-bottom: none; color: var(--fg-3); }
:target { background: var(--wash); }

/* ---------- figures ---------- */

figure.fig { margin: 1.2rem 0 2.4rem; }
figure.fig img { width: 100%; height: auto; display: block; background: var(--wash); }
figure.fig figcaption { font-size: .9rem; font-style: italic; line-height: 1.5; color: var(--fg-3); margin-top: .7rem; max-width: var(--text); }
figure.fig.pair .pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
figure.fig.pair .pair-imgs img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
figure.fig.gallery .gallery-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; }
figure.fig.gallery .gallery-imgs img { width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
figure.fig.embed .embed-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--wash); }
figure.fig.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports not (aspect-ratio: 1 / 1) {
  figure.fig.pair .pair-imgs img, figure.fig.gallery .gallery-imgs img, .lead-img img { height: auto; }
  figure.fig.embed .embed-frame { height: 0; padding-bottom: 56.25%; }
}

/* ---------- left open: the question, set wide ---------- */

.open-spread {
  display: grid;
  grid-template-columns: [full-start] minmax(0, 1fr) [text-start] minmax(0, var(--text)) [text-end] minmax(0, 1fr) [full-end];
  column-gap: var(--gap);
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 6vw, 4.5rem); padding: clamp(1.8rem, 4vw, 3rem) 0 0;
}
.open-spread .open-label { grid-column: full-start / text-start; }
.open-spread .open-main { grid-column: text-start / full-end; }
.open-label .label { color: var(--accent); }
.open-q { font-style: italic; font-weight: 300; font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.18; letter-spacing: -.018em; margin: 0; }
.open-main .go { display: inline-block; margin-top: 1.6rem; }

/* inside a thread: a smaller version between parts */
.open-panel { border-top: 1px solid var(--line); padding-top: 1.1rem; margin: 1.6rem 0 1rem; }
.open-panel .label { color: var(--accent); margin-bottom: .6rem; }
.open-panel .open-q { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }

/* ---------- project page and the whole thread ---------- */

.proj-head { padding-top: clamp(2.2rem, 5vw, 4rem); }
.proj-head .meta { display: block; }
.proj-head h1 { font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1; letter-spacing: -.03em; margin: 1rem 0 0; max-width: 64rem; }
.proj-head .band-q { font-style: italic; font-size: clamp(1.25rem, 2.3vw, 1.75rem); line-height: 1.38; color: var(--fg-2); margin: 1.4rem 0 0; max-width: 46rem; }
.proj-head .band-q a { color: var(--accent); }
.proj-head .proj-foot { display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: baseline; margin-top: 1.8rem; padding-bottom: .5rem; }
.back { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--fg-3); text-decoration: none; display: inline-block; margin-bottom: 1.4rem; }
.back:hover { color: var(--fg); }

.part-head { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1rem; }
.part-head .meta .ord { font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; text-transform: none; margin-left: .4rem; }
.part-title { font-weight: 400; font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.06; letter-spacing: -.024em; margin: .7rem 0 .5rem; }
.part-title a { text-decoration: none; }
.part-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .12em; }
.part-src { font-family: var(--mono); font-size: .74rem; color: var(--fg-3); margin: 0 0 .4rem; }
.part-src a { color: var(--accent); }
.part-why { font-size: 1.3rem; line-height: 1.42; color: var(--fg-2); margin: 1.2rem 0 1.8rem; }
.thread-break { text-align: center; color: var(--accent); letter-spacing: .7em; margin: 3.5rem 0 1.5rem; }
.toc-inline { display: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0; margin-top: 2rem; }
.toc-inline ol { margin: 0; padding-left: 1.3rem; }
.toc-inline li { margin-bottom: .35rem; }
.toc-inline li::marker { color: var(--accent); }
.toc-inline a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* a label on the left, content in the reading column */
.split {
  display: grid;
  grid-template-columns: [full-start] minmax(0, 1fr) [text-start] minmax(0, var(--text)) [text-end] minmax(0, 1fr) [full-end];
  column-gap: var(--gap);
  border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: clamp(3rem, 6vw, 4.5rem);
}
.split-label { grid-column: full-start / text-start; }
.split-main { grid-column: text; }
.split-note { font-size: .92rem; font-style: italic; line-height: 1.5; color: var(--fg-3); margin: 0; max-width: 16rem; }
.split.intro .split-main, .about .split-main { font-size: 1.1875rem; line-height: 1.64; }
.about .split-main p { margin: 0 0 1.25rem; }
.about .split-main a { color: var(--accent); }

/* ---------- responses ---------- */

ol.response-list { list-style: none; padding: 0; margin: 0 0 2.2rem; }
li.response { padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--line); }
li.response:first-child { padding-top: .2rem; }
.response-by { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 .45rem; }
.response-text p { margin: 0 0 .7rem; font-size: 1.04rem; line-height: 1.55; }
.response-reply { margin: .9rem 0 0 .2rem; padding-left: 1rem; border-left: 1px solid var(--accent); }
.response-reply .response-by { color: var(--accent); }
.response-reply p:not(.response-by) { margin: 0 0 .6rem; font-size: 1rem; color: var(--fg-2); line-height: 1.55; }
.responses a { color: var(--accent); }

form.respond { margin-top: .4rem; }
form.respond .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
label.field { display: block; margin-bottom: 1.3rem; }
label.field > span { display: block; margin-bottom: .2rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
label.field em { font-style: normal; text-transform: none; letter-spacing: 0; }
label.field input, label.field textarea {
  display: block; width: 100%;
  font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--fg);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: .45rem 0; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
label.field textarea { border: 1px solid var(--line); padding: .7rem .8rem; min-height: 8rem; resize: vertical; margin-top: .3rem; }
label.field input:focus, label.field textarea:focus { outline: none; border-color: var(--accent); }
.respond-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.1rem; }
button.send {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--fg); color: var(--bg); border: 0; border-radius: 100px;
  padding: .7rem 1.4rem; cursor: pointer; transition: opacity .2s;
}
button.send:hover { opacity: .85; }
button.send:disabled { opacity: .45; cursor: default; }
.respond-status { font-size: .95rem; margin: .9rem 0 0; min-height: 1.2em; }
.respond-status.err { color: var(--accent); }
.respond-thanks { font-style: italic; color: var(--fg-2); margin: .4rem 0 0; }

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

.site-foot { border-top: 1px solid var(--line); margin-top: clamp(4rem, 8vw, 6rem); }
.foot-row {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem;
  padding-top: 1.6rem; padding-bottom: 3rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--fg-3);
}
.foot-brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 300; letter-spacing: -.02em; color: var(--fg); text-decoration: none; }
.foot-brand em { font-style: italic; color: var(--accent); }
.foot-creed { font-family: var(--serif); font-style: italic; font-size: 1rem; letter-spacing: 0; }
.foot-links { display: flex; gap: 1.4rem; }
.foot-links a { text-decoration: none; text-transform: uppercase; letter-spacing: .12em; }
.foot-links a:hover { color: var(--fg); }


/* ============================================================
   PAPER
   The whole site is printed on something: a soft uneven tone, a fine grain
   laid over everything, torn scraps, ink that skips on the big letters.
   All of it is drawn from the four colours: it adds texture, not hues.
   ============================================================ */

body {
  background-image: var(--tex-mottle);
  background-size: 720px 720px;
}
/* the grain, over everything, never catching the mouse */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background-image: var(--tex-grain); background-size: 256px 256px; opacity: .34;
}
html[data-theme="dark"] body::after { opacity: .11; }

/* torn edges, top and bottom */
.torn {
  --edge: 12px;
  -webkit-mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
          mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
}

/* section words sit on a torn scrap of clay, pasted slightly askew */
.opener h2 {
  display: inline-block; background-color: var(--scrap);
  padding: .32em .5em .4em .42em; margin-left: -.15em;
  transform: rotate(-1.4deg); transform-origin: left center;
  --edge: 9px;
  -webkit-mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
          mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
}
.opener:nth-of-type(even) h2, .section:nth-of-type(even) .opener h2 { transform: rotate(.9deg); }
.page-title { display: inline-block; }

/* "left open" is a sheet torn out and laid across the page */
.open-spread .open-main {
  background-color: var(--scrap);
  padding: clamp(1.8rem, 3.5vw, 2.8rem) clamp(1.4rem, 3vw, 2.6rem);
  transform: rotate(-.35deg);
  --edge: 13px;
  -webkit-mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
          mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
}
.open-spread { border-top: 0; }

/* the big word: brick ink that skips a little, printed slightly off-register */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .word {
    background-image: var(--tex-voids), linear-gradient(var(--accent), var(--accent));
    background-size: 320px 320px, 100% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    /* room for italic overhang, ascenders and descenders inside the painted box */
    padding: .08em .18em .2em 0; margin: -.08em 0 -.2em 0;
    filter: drop-shadow(.03em .022em 0 var(--line));
  }
}

/* photographs look printed: a touch of warmth and grit, torn where they're cut */
.lead-img img, .piece-visual img, figure.fig img { filter: sepia(.12) saturate(.88) contrast(1.04); }
.lead-img::after, .piece-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--print); background-size: 200px 200px; opacity: .55; mix-blend-mode: multiply;
}
.lead-img {
  --edge: 12px;
  -webkit-mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
          mask: var(--tear-top) top left / 900px var(--edge) repeat-x,
                linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 2px) no-repeat,
                var(--tear-bottom) bottom left / 900px var(--edge) repeat-x;
}
.piece-visual { position: relative; }
.piece-visual > img {
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 15px) no-repeat, var(--tear-bottom) bottom left / 900px 16px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 15px) no-repeat, var(--tear-bottom) bottom left / 900px 16px repeat-x;
}
.piece-visual::after { bottom: 16px; }

/* quoted passages are on a slip of rougher paper */
.body blockquote.excerpt { background-image: var(--fibre); background-size: 260px 260px; }

@media print {
  body { background-image: none; }
  body::after { display: none; }
  body { padding-top: 0; }
  .masthead { position: static; }
  .masthead, .opener h2, .open-spread .open-main, .lead-img, .piece-visual > img { -webkit-mask: none; mask: none; }
}

/* ---------- motion ---------- */

.fade { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- narrower screens ---------- */

/* below ~1150px: no side columns. Text stays centred; wide things use the full width */
@media (max-width: 71.99rem) {
  .article-grid, .split, .open-spread {
    grid-template-columns: [full-start] minmax(0, 1fr) [text-start] minmax(0, 40rem) [text-end] minmax(0, 1fr) [full-end];
    column-gap: 0;
  }
  .article-grid .bleed-right, .article-grid .body > .bleed-right { grid-column: full; }
  .aside-left, .aside-right { display: none; }
  .split-label, .open-spread .open-label, .open-spread .open-main { grid-column: text; }
  .split-label { margin-bottom: .6rem; }
  .split-note { max-width: none; }
  .toc-inline { display: block; }
}

@media (max-width: 56rem) {
  a.lead, .project, .tb-grid { grid-template-columns: 1fr; }
  a.lead { align-content: space-between; }
  a.lead .lead-right { align-self: end; }
  a.lead .word { font-size: var(--word-size, min(19vw, 18vh)); }
  .creed { order: 3; flex-basis: 100%; }
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; }
  .nav-links { order: 4; flex-basis: 100%; }
  .tb-side { align-self: start; }
}

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .article-grid, .split.intro .split-main, .about .split-main { font-size: 1.125rem; }
  .nav-links { gap: .4rem 1.3rem; }
  figure.fig.pair .pair-imgs { grid-template-columns: 1fr; }
  .entry-title { font-size: 1.35rem; }
}

@media (pointer: coarse) {
  .nav-links a { padding: .6rem 0; }
  .search { padding: .7rem .1rem; }
  .theme-toggle { padding: .6rem 1rem; }
}

@media print {
  .navbar, .controls, .aside-left, .responses, .theme-toggle { display: none; }
}

/* ============================================================
   ADDED FOR THE FOLDER-BASED SITE
   ============================================================ */

/* the logo: the first "a" is only an outline, the second is solid.
   Vague, then clear. */
.brand, .foot-brand { display: inline-block; line-height: 0; }
.brand svg.logo { height: 1.08em; width: auto; display: block; overflow: visible; margin-bottom: -.28em; }
.foot-brand svg.logo { height: 1.9rem; width: auto; display: block; overflow: visible; }

/* "▶ video" beside an article that has one */
.has-video { color: var(--accent); white-space: nowrap; }

/* shown only on your own computer, when a picture's name doesn't match a file */
.missing {
  display: block; font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  color: var(--fg); background: var(--wash); border-left: 3px solid var(--accent);
  padding: .8rem 1rem; margin: 1.4rem 0;
}

/* previous / next part at the foot of an article that belongs to a project */
.story-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.6rem 0; margin: 3rem 0 0;
}
.story-nav a { text-decoration: none; color: var(--fg); display: block; }
.story-nav a.next { text-align: right; }
.story-nav .label { display: block; color: var(--accent); margin-bottom: .35rem; }
.story-nav .sn-title { font-size: 1.35rem; line-height: 1.25; }
.story-nav a:hover .sn-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
@media (max-width: 640px) { .story-nav { grid-template-columns: 1fr; } .story-nav a.next { text-align: left; } }

.proj-foot { gap: .6rem 2rem; flex-wrap: wrap; }

/* a hand drawing with a see-through background: drawn straight on the page */
figure.fig.drawing img { background: none; filter: none; mix-blend-mode: multiply; }
html[data-theme="dark"] figure.fig.drawing img { filter: invert(1) hue-rotate(180deg) brightness(1.15); mix-blend-mode: screen; }

/* PHONES. iPhone Safari lets the page show through behind the clock and
   battery unless the bar pinned to the top is a plain, solid block. So the
   masthead is a plain block, and its torn edge is a separate strip hung below it. */
.masthead { top: 0; padding-top: 0; padding-bottom: 0; -webkit-mask: none; mask: none; }
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 14px;
  background-color: var(--wash); pointer-events: none;
  -webkit-mask: var(--tear-bottom) bottom left / 900px 14px repeat-x;
          mask: var(--tear-bottom) bottom left / 900px 14px repeat-x;
}
body { min-height: 100vh; }
html { background-color: var(--wash); }
@media print { .masthead::after { display: none; } body { padding-top: 0; } }

/* iPhone Safari colours the strip behind the clock from whichever pinned layer
   is on top at the very top edge of the screen. The grain sheet used to be that
   layer, and it is see-through, so the page showed there. Now the grain sheet
   stops short of the top edge and the masthead carries its own grain for
   those few pixels, which leaves the solid masthead as the top layer. */
body::after { top: 8px; background-position: 0 -8px; }                 /* the grain sheet stops short of the top */
.masthead::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; pointer-events: none;
  background-image: var(--tex-grain); background-size: 256px 256px; opacity: .34;
}
html[data-theme="dark"] .masthead::before { opacity: .11; }
/* and a plain block of the same colour reaching above the screen, for browsers that draw there */
html::before {
  content: ""; position: fixed; left: 0; right: 0; top: -200px; height: 200px;
  background-color: var(--wash); pointer-events: none; z-index: 49;
}
@media print { html::before, .masthead::before { display: none; } }
