/* ZELR — notes on tools, work and the city.
   Newsprint white, press black, one signal red. Bodoni for the mark,
   Newsreader for reading, Instrument Sans for the small print. */

:root {
  --paper: #f7f4ec;
  --paper-2: #efeadf;
  --ink: #141311;
  --ink-2: #2f2c28;
  --muted: #625d55;
  --hair: #d9d2c3;
  --rule: #141311;
  --red: #a3161b;
  --red-ink: #9a1419;
  --mark: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 4.2vw, 56px);
  --max: 1280px;
  --measure: 40rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131210;
    --paper-2: #1c1a17;
    --ink: #f1ece2;
    --ink-2: #d9d3c7;
    --muted: #a39c90;
    --hair: #37332d;
    --rule: #f1ece2;
    --red: #e0575c;
    --red-ink: #ee7b7f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131210; --paper-2: #1c1a17; --ink: #f1ece2; --ink-2: #d9d3c7; --muted: #a39c90;
  --hair: #37332d; --rule: #f1ece2; --red: #e0575c; --red-ink: #ee7b7f; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 1.1875rem/1.62 var(--serif);
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 1px; }
::selection { background: var(--red); color: #fff; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; font: 600 14px/1 var(--sans); }
.skip:focus { left: 8px; }

/* small print */
.kicker, .meta, .rail-h, .tags li, .nav a, .bar-tag, .mast-strap, .mast-sub, .section-h, .src-host, .foot-nav, .foot-small, .more, .idx-n, .note-n {
  font-family: var(--sans);
  font-stretch: 88%;
}
.kicker {
  margin: 0 0 .9rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-ink);
}
.kicker a { text-decoration: none; }
.meta { margin: 0; font-size: .86rem; font-weight: 500; letter-spacing: .01em; color: var(--muted); }
.meta a { color: var(--ink); font-weight: 700; text-decoration: none; }
.meta a:hover { color: var(--red-ink); }

/* ------------------------------------------------------------ masthead */
.masthead {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 0;
  color: var(--ink);
}
.mast-strap {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.mast-strap a { text-decoration: none; }
.mast-mark {
  margin: 0; padding: clamp(10px, 2vw, 22px) 0 clamp(4px, 1vw, 10px);
  font: 900 clamp(5.4rem, 21vw, 17.5rem)/.8 var(--mark);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.02em; text-align: center;
}
.mast-mark a { text-decoration: none; color: var(--ink); display: inline-block; }
.mast-mark a:hover { color: var(--ink); }
.mast-rule { border-top: 4px solid var(--rule); border-bottom: 1px solid var(--rule); height: 8px; }
.mast-sub {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
  font-size: .82rem; font-weight: 500; color: var(--ink-2);
}
.mast-sub span:first-child { font-family: var(--serif); font-style: italic; font-size: 1.02rem; font-stretch: 100%; }
.masthead .nav { justify-content: center; border-bottom: 1px solid var(--hair); }

.nav { display: flex; gap: clamp(14px, 3vw, 36px); flex-wrap: wrap; padding: 12px 0; }
.nav a {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--red); color: var(--ink); }

/* compact bar on inner pages */
.bar { border-bottom: 1px solid var(--rule); box-shadow: 0 3px 0 -2px var(--rule); margin-bottom: 3px; }
.bar-in {
  max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.bar-mark { font: 900 2.1rem/1 var(--mark); letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.bar-mark:hover { color: var(--ink); }
.bar-tag { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-left: 18px; border-left: 1px solid var(--hair); }
.bar .nav { margin-left: auto; padding: 0; }

/* ------------------------------------------------------------ home */
.home { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.lead {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(28px, 5vw, 72px);
  padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.lead-h {
  margin: 0 0 1.1rem;
  font: 600 clamp(2.4rem, 5.6vw, 4.6rem)/1.02 var(--serif);
  font-variation-settings: "opsz" 72;
  letter-spacing: -.022em; color: var(--ink); text-wrap: balance;
}
.lead-h a { text-decoration: none; }
.lead-h a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.lead-dek { margin: 0 0 1.3rem; max-width: 36em; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.42; font-style: italic; font-weight: 350; color: var(--ink-2); }
.lead-open { margin: 1.6rem 0 1.1rem; max-width: var(--measure); padding-top: 1.4rem; border-top: 1px solid var(--hair); }
.lead-open::first-letter {
  float: left; font: 600 4.3em/.8 var(--serif); font-variation-settings: "opsz" 72;
  padding: .06em .09em 0 0; color: var(--red);
}
.more { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 2px; }

.lead-index { border-left: 1px solid var(--hair); padding-left: clamp(20px, 3vw, 36px); }
.rail-h { margin: 0 0 1rem; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.idx { list-style: none; margin: 0; padding: 0; }
.idx li { border-top: 1px solid var(--hair); }
.idx li:last-child { border-bottom: 1px solid var(--hair); }
.idx a { display: grid; grid-template-columns: 2.1rem 1fr; gap: 6px; padding: .8rem 0; text-decoration: none; font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.idx a:hover .idx-t { text-decoration: underline; text-decoration-color: var(--red); }
.idx-n { font-size: .78rem; font-weight: 700; color: var(--red-ink); padding-top: .2rem; letter-spacing: .04em; }
.lead-about { margin-top: 1.6rem; padding: 1.1rem 1.2rem; background: var(--paper-2); font-size: 1rem; line-height: 1.5; }
.lead-about p { margin: 0 0 .6rem; }
.lead-about a { font: 700 .76rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--red-ink); }

.section-h {
  display: flex; align-items: center; gap: 16px; margin: 0;
  padding: clamp(28px, 4vw, 44px) 0 clamp(18px, 3vw, 28px);
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}
.section-h::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }

.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 5vw, 72px); padding-bottom: clamp(40px, 6vw, 80px); }
.note { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 12px; padding: 1.6rem 0 1.8rem; border-top: 1px solid var(--rule); }
.note-n { margin: 0; font: 900 2.1rem/1 var(--mark); color: var(--red); font-stretch: 100%; }
.note .kicker { margin-bottom: .55rem; }
.note-h { margin: 0 0 .6rem; font: 600 clamp(1.45rem, 2.3vw, 1.85rem)/1.14 var(--serif); font-variation-settings: "opsz" 48; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
.note-h a { text-decoration: none; }
.note-h a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.note-dek { margin: 0 0 .8rem; font-size: 1.04rem; line-height: 1.5; color: var(--ink-2); }

/* ------------------------------------------------------------ article */
.article { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.art-head { max-width: 54rem; padding: clamp(36px, 6vw, 80px) 0 clamp(26px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.art-h { margin: 0 0 1.1rem; font: 600 clamp(2.3rem, 5.4vw, 4.3rem)/1.03 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.022em; color: var(--ink); text-wrap: balance; }
.art-dek { margin: 0 0 1.4rem; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.42; font-style: italic; font-weight: 350; }
.art-grid { display: grid; grid-template-columns: 15rem minmax(0, var(--measure)); gap: clamp(32px, 6vw, 88px); padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 72px); }
.art-rail { position: relative; }
.toc { position: sticky; top: 28px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; border-top: 1px solid var(--hair); }
.toc a { display: grid; grid-template-columns: 1.8rem 1fr; padding: .55rem 0; font-size: .95rem; line-height: 1.3; text-decoration: none; color: var(--ink-2); }
.toc a::before { content: counter(t, decimal-leading-zero); font: 700 .72rem/1.9 var(--sans); color: var(--red-ink); }
.toc a:hover { color: var(--red-ink); }

.prose { min-width: 0; }
.prose > p:first-of-type::first-letter {
  float: left; font: 600 4.6em/.78 var(--serif); font-variation-settings: "opsz" 72;
  padding: .07em .09em 0 0; color: var(--red);
}
.plain .prose > p:first-of-type::first-letter { all: unset; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose h2 {
  margin: 2.1em 0 .7em; padding-top: .9em; border-top: 1px solid var(--rule);
  font: 600 1.7rem/1.16 var(--serif); font-variation-settings: "opsz" 48; letter-spacing: -.012em; color: var(--ink);
}
.prose h3 { margin: 1.7em 0 .45em; font: 700 1.12rem/1.3 var(--serif); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose ul li::marker { color: var(--red); }
.prose ol li::marker { font: 700 .85em var(--sans); color: var(--red-ink); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--red); font-style: italic; font-size: 1.15em; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose code { font: .88em ui-monospace, Menlo, monospace; }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); }
.prose table { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .7em .8em .7em 0; border-bottom: 1px solid var(--hair); }
.prose thead th { font: 700 .74rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.prose tbody th { font-weight: 650; color: var(--ink); }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
.disclosure { font-size: .92rem; font-style: italic; color: var(--muted); padding-top: 1em; border-top: 1px solid var(--hair); }

.sources { margin-top: 2.4em; padding: 1.4em 1.5em 1em; background: var(--paper-2); }
.sources h2 { margin: 0 0 .8em; padding: 0; border: 0; font: 700 .78rem/1 var(--sans); font-stretch: 88%; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.sources ol { margin: 0; padding-left: 1.4em; font-size: .95rem; line-height: 1.45; }
.sources li { margin-bottom: .6em; }
.src-host { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.8em 0 0 !important; padding: 0 !important; }
.tags li { margin: 0; padding: 5px 10px !important; border: 1px solid var(--hair); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.byline-card { margin-top: 2em; padding-top: 1.2em; border-top: 3px double var(--rule); font-size: 1rem; }
.byline-card p { margin: 0; }
.byline-card a { font-weight: 650; color: var(--ink); }

.more-notes { border-top: 1px solid var(--rule); padding-bottom: clamp(40px, 6vw, 72px); }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
.more-list li { border-top: 1px solid var(--hair); padding-top: 1rem; }
.more-list .kicker { margin-bottom: .45rem; }
.more-list a { font: 600 1.3rem/1.2 var(--serif); font-variation-settings: "opsz" 36; color: var(--ink); text-decoration: none; text-wrap: balance; }
.more-list a:hover { text-decoration: underline; text-decoration-color: var(--red); }

/* ------------------------------------------------------------ about / editor */
.plain { max-width: 52rem; margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 7vw, 96px); }
.plain-head { padding: clamp(36px, 6vw, 80px) 0 clamp(24px, 4vw, 36px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(24px, 4vw, 40px); }
.plain-h { margin: 0 0 .8rem; font: 600 clamp(2.6rem, 6.4vw, 4.8rem)/1 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.024em; color: var(--ink); }
.plain-lede { margin: 0; font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.45; font-style: italic; font-weight: 350; }
.plain .prose { max-width: var(--measure); }
.ed-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: end; }
.monogram {
  width: clamp(88px, 16vw, 148px); aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font: 900 clamp(2.2rem, 5vw, 3.6rem)/1 var(--mark); letter-spacing: -.02em;
  border-bottom: 6px solid var(--red);
}
.ed-list { list-style: none; padding: 0 !important; }
.ed-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .7em 0 !important; margin: 0 !important; border-top: 1px solid var(--hair); }
.ed-list li:last-child { border-bottom: 1px solid var(--hair); }
.ed-list a { font-weight: 550; color: var(--ink); text-decoration: none; }
.ed-list a:hover { color: var(--red-ink); text-decoration: underline; }
.ed-list time { flex: none; font: 500 .8rem/1 var(--sans); color: var(--muted); }

/* ------------------------------------------------------------ footer */
.foot { background: var(--ink); color: var(--paper); margin-top: 0; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 5vw, 64px) var(--gutter) 40px; }
.foot-mark { font: 900 clamp(3.6rem, 10vw, 7rem)/.85 var(--mark); letter-spacing: -.02em; border-bottom: 1px solid rgba(255,255,255,.22); padding-bottom: 18px; }
.foot-line { margin: 18px 0 14px; font-size: 1.05rem; font-style: italic; }
.foot a { color: inherit; }
.foot a:hover { color: #ff9ea1; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 22px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.foot-nav a { text-decoration: none; }
.foot-small { margin: 0; max-width: 46rem; font-size: .8rem; line-height: 1.55; opacity: .72; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .foot { background: #000; color: var(--ink); }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1060px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .art-grid .prose { max-width: var(--measure); }
  .art-rail { order: 0; }
  .toc { position: static; max-width: var(--measure); padding: 1rem 1.2rem .6rem; background: var(--paper-2); }
}
@media (max-width: 900px) {
  .lead { grid-template-columns: minmax(0, 1fr); }
  .lead-index { border-left: 0; padding-left: 0; }
  .notes-grid { grid-template-columns: minmax(0, 1fr); }
  .more-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .more-list li { padding-bottom: 1rem; }
  .bar-tag { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 1.125rem; }
  .mast-strap { font-size: .66rem; letter-spacing: .1em; }
  .mast-strap-mid { display: none; }
  .mast-sub { flex-direction: column; gap: 4px; text-align: center; }
  .masthead .nav { gap: 22px; }
  .bar-in { gap: 10px 18px; }
  .bar .nav { margin-left: 0; width: 100%; gap: 22px; }
  .note { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .note-n { font-size: 1.6rem; }
  .ed-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ed-list li { flex-direction: column; gap: 4px; }
  .sources { padding: 1.2em 1em .8em; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print {
  .bar, .masthead .nav, .art-rail, .more-notes, .foot { display: none; }
  body { background: #fff; color: #000; }
}
