/* Benchmarks — Nell Penhallow
   Paper, ink, contour brown and water blue: the colours of a printed sheet. */

@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f3eee2;
  --paper-2: #ebe4d3;
  --ink: #26211c;
  --ink-2: #554c42;
  --ink-3: #8a7e70;
  --rule: #d6ccb8;
  --contour: #b1622a;
  --contour-strong: #94501f;
  --water: #2b6a93;
  --grid: #a9c3d0;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --measure: 34rem;
  --note: 14.5rem;
  --gutter: 3rem;
  color-scheme: light;
}

:root[data-theme="night"] {
  --paper: #141a20;
  --paper-2: #1b232b;
  --ink: #e9e2d3;
  --ink-2: #bdb4a5;
  --ink-3: #847c70;
  --rule: #2f3943;
  --contour: #d08a52;
  --contour-strong: #e19a62;
  --water: #79afd6;
  --grid: #2a4252;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    --paper: #141a20;
    --paper-2: #1b232b;
    --ink: #e9e2d3;
    --ink-2: #bdb4a5;
    --ink-3: #847c70;
    --rule: #2f3943;
    --contour: #d08a52;
    --contour-strong: #e19a62;
    --water: #79afd6;
    --grid: #2a4252;
    color-scheme: dark;
  }
}

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

html {
  font-size: clamp(17px, 15px + 0.35vw, 21px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--contour) 28%, transparent); }

a { color: inherit; }
a:focus-visible, button:focus-visible, .sn-toggle:focus-visible + .sn-ref {
  outline: 2px solid var(--water);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: .5rem .9rem; font-family: var(--sans); z-index: 10;
}
.skip:focus { top: 1rem; }

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

.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  flex-wrap: wrap;
  max-width: 82rem; margin: 0 auto;
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem) 1.2rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink);
}
.bm-glyph { width: 1.6rem; height: 1.6rem; flex: none; fill: none; stroke: var(--contour); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wm-name { font-size: 1.2rem; font-weight: 500; letter-spacing: .005em; }
.wm-title {
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .2em; color: var(--ink-3);
  padding-left: .7rem; margin-left: .15rem; border-left: 1px solid var(--rule);
  line-height: 1;
}
.masthead nav { display: flex; align-items: center; gap: .3rem 1.4rem; flex-wrap: wrap; }
.masthead nav a, .theme-toggle {
  font-family: var(--sans); font-size: .8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  text-decoration: none; color: var(--ink-2);
  padding: .3rem 0;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--contour); }
.theme-toggle {
  background: none; border: 0; cursor: pointer; margin-left: .4rem;
  border-left: 1px solid var(--rule); padding-left: 1.2rem; border-radius: 0;
  color: var(--ink-3);
}
.theme-toggle .tt-sep { margin: 0 .35em; opacity: .5; }
.theme-toggle .tt-day { color: var(--ink); }
:root[data-theme="night"] .theme-toggle .tt-day { color: inherit; }
:root[data-theme="night"] .theme-toggle .tt-night { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) .theme-toggle .tt-day { color: inherit; }
  :root:not([data-theme="day"]) .theme-toggle .tt-night { color: var(--ink); }
}

/* ---- the maps ------------------------------------------------------------ */

.plate-wrap { margin: 0 auto; max-width: 82rem; padding: 0 clamp(.5rem, 3vw, 2rem); }
svg.plate { display: block; width: 100%; height: auto; }
svg.plate path { vector-effect: non-scaling-stroke; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.m-paper { fill: var(--paper); }
.m-water { stroke: var(--water); stroke-width: .7px; }
.m-coast { stroke: var(--water); stroke-width: 1.5px; }
.m-contour { stroke: var(--contour); stroke-width: .65px; opacity: .8; }
.m-index { stroke: var(--contour-strong); stroke-width: 1.25px; }
.m-grid path { stroke: var(--grid); stroke-width: .7px; }
.m-neat { fill: none; stroke: var(--ink); stroke-width: 1.3px; vector-effect: non-scaling-stroke; }
.m-margin text { font: 500 12px var(--sans); fill: var(--ink-3); letter-spacing: .04em; }
.m-fig, .m-trig text, .m-bm text, .m-sea, .m-land {
  paint-order: stroke; stroke: var(--paper); stroke-linejoin: round;
}
.m-fig { font: 600 11px var(--sans); fill: var(--contour-strong); text-anchor: middle; stroke-width: 5px; }
.m-trig path, .m-bm path { stroke: var(--ink); stroke-width: 1.2px; }
.m-trig circle { fill: var(--ink); }
.m-trig text, .m-bm text { font: 500 12px var(--sans); fill: var(--ink); stroke-width: 4px; letter-spacing: .02em; }
.m-sea { font: italic 400 25px var(--serif); fill: var(--water); letter-spacing: .32em; stroke-width: 6px; }
.m-land { font: 500 19px var(--sans); fill: var(--ink); letter-spacing: .5em; text-transform: uppercase; stroke-width: 6px; }

.plate-wrap figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); padding: .55rem clamp(0rem, 2vw, 1.6rem) 0;
}

@media (max-width: 720px) {
  svg.plate:not(.thumb) { height: 15rem; }
  .plate-wrap figcaption span:last-child { display: none; }
}

/* ---- headings shared by essay, about, notebook -------------------------- */

.kicker, .section-label {
  font-family: var(--sans); font-size: .76rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--contour-strong);
  margin: 0 0 .9rem;
}
.section-label { display: flex; align-items: center; gap: 1rem; color: var(--ink-3); }
.section-label::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

h1 {
  font-weight: 380;
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.018em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.dek {
  font-style: italic; font-size: 1.3rem; line-height: 1.42; color: var(--ink-2);
  margin: 0 0 1.8rem; max-width: 32em; text-wrap: pretty;
}

/* ---- essay --------------------------------------------------------------- */

.essay, .about { padding-top: .5rem; }
.essay-head, .prose, .essay-foot, .page-head, .notebook {
  width: min(var(--measure), 100% - 2.5rem);
  margin-left: auto; margin-right: auto;
}
@media (min-width: 1180px) {
  /* make room on the right for the margin notes */
  .essay-head, .prose, .essay-foot {
    margin-left: max(2.5rem, calc((100% - var(--measure) - var(--note) - var(--gutter)) / 2));
  }
}
.essay-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.meta {
  display: flex; flex-wrap: wrap; gap: .7rem 2rem;
  margin: 0 0 3rem; padding: .85rem 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.meta div { display: flex; flex-direction: column; gap: .1rem; }
.meta dt {
  font-family: var(--sans); font-size: .64rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em; color: var(--ink-3);
}
.meta dd { margin: 0; font-size: .92rem; }
.gridref { font-variant-numeric: lining-nums tabular-nums; letter-spacing: .03em; }

.prose { font-size: 1.06rem; line-height: 1.66; hanging-punctuation: first; }
.prose p { margin: 0; text-wrap: pretty; }
.prose p + p { text-indent: 1.5em; }
.prose .lede {
  font-family: var(--sans); font-weight: 500; text-transform: uppercase;
  font-size: .8em; letter-spacing: .12em;
}
.prose em { font-style: italic; }
.prose a, .about a, .dek a, .intro a, .reply a, .lost a {
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--contour) 60%, transparent);
  text-decoration-thickness: 1px; text-underline-offset: .2em;
}
.prose a:hover, .dek a:hover, .intro a:hover, .reply a:hover { text-decoration-color: var(--contour); color: var(--contour-strong); }
.prose h2 {
  font-weight: 500; font-size: 1.35rem; line-height: 1.25; margin: 2.6rem 0 .8rem;
  letter-spacing: -.005em;
}
.prose h2 + p { text-indent: 0; }
.prose h2 em { font-style: italic; }
.prose blockquote { margin: 1.4rem 0 1.4rem 1.5em; font-style: italic; color: var(--ink-2); }

.ornament { display: flex; justify-content: center; margin: 2.2rem 0 2rem; }
.ornament svg { width: 3.2rem; height: 1.3rem; }
.ornament path { fill: none; stroke: var(--contour); stroke-width: 1.1; }
.ornament + p { text-indent: 0 !important; }

.endmark { text-align: left; margin-top: .9rem !important; text-indent: 0 !important; }
.endmark .bm-glyph { width: 1.2rem; height: 1.2rem; vertical-align: middle; }

/* margin notes */
.sn-ref {
  font-family: var(--sans); font-weight: 600; font-size: .68em;
  color: var(--contour-strong); vertical-align: .55em; line-height: 0;
  padding: 0 .1em 0 .15em; cursor: pointer;
  font-variant-numeric: lining-nums;
}
.sn-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sidenote {
  display: none;
  text-indent: 0;
  font-size: .86rem; line-height: 1.5; color: var(--ink-2);
  font-optical-sizing: auto;
}
.sn-num {
  font-family: var(--sans); font-weight: 600; font-size: .78em;
  color: var(--contour-strong); margin-right: .45em;
  font-variant-numeric: lining-nums;
}
.sn-toggle:checked + .sn-ref + .sidenote {
  display: block;
  margin: .7rem 0 .9rem; padding: .7rem 1rem .75rem;
  background: var(--paper-2); border-left: 2px solid var(--contour);
}
.sn-toggle:checked + .sn-ref { color: var(--ink); }
@media (min-width: 1180px) {
  .sn-ref { cursor: default; }
  .sn-toggle { display: none; }
  .sidenote, .sn-toggle:checked + .sn-ref + .sidenote {
    display: block;
    float: right; clear: right;
    width: var(--note);
    margin: .3rem calc(-1 * (var(--note) + var(--gutter))) 1.2rem 0;
    padding: 0 0 0 .9rem; background: none;
    border-left: 1px solid var(--rule);
    font-size: .78rem; line-height: 1.5;
  }
}

.essay-foot { margin-top: 4rem; }
.reply {
  font-style: italic; color: var(--ink-2); font-size: 1rem;
  padding: 1.2rem 0; border-top: 1px solid var(--rule); margin: 0;
}
.neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.neighbour { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.neighbour.next { text-align: right; }
.neighbour .label {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
}
.neighbour .n-title { font-size: 1.3rem; line-height: 1.15; font-weight: 450; }
.neighbour .n-dek { font-size: .85rem; line-height: 1.4; color: var(--ink-2); font-style: italic; }
a.neighbour:hover .n-title { color: var(--contour-strong); }
.neighbour.empty .n-dek { color: var(--ink-3); }
@media (max-width: 600px) {
  .neighbours { grid-template-columns: 1fr; }
  .neighbour.next { text-align: left; }
}

/* ---- home ---------------------------------------------------------------- */

.hero { max-width: 82rem; margin: 0 auto; padding: clamp(2rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 4rem); }
.hero h1 { max-width: 13.5em; font-size: clamp(2.6rem, 1.2rem + 5vw, 5.4rem); line-height: 1; margin-bottom: 1.6rem; }
.intro { max-width: 31em; font-size: 1.22rem; line-height: 1.55; color: var(--ink-2); margin: 0; text-wrap: pretty; }

.latest, .home-cols { max-width: 82rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.latest .plate-wrap { padding: 0; }
.latest-card { display: block; text-decoration: none; color: inherit; }
.latest-text {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: .5rem 3rem;
  padding: 1.6rem 0 0; align-items: start;
}
.latest-text .entry-meta { grid-column: 1 / -1; }
.latest-title { font-size: clamp(2.1rem, 1.4rem + 2.5vw, 3.4rem); line-height: 1.02; letter-spacing: -.015em; font-weight: 400; }
.latest-dek { font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--ink-2); }
.read-on {
  grid-column: 2; font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--contour-strong);
}
.latest-card:hover .latest-title { color: var(--contour-strong); }
@media (max-width: 760px) {
  .latest-text { grid-template-columns: 1fr; }
  .read-on { grid-column: 1; }
}

.entry-meta {
  display: flex; flex-wrap: wrap; gap: .2rem 1.1rem;
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}

.home-cols {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 4rem;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
@media (max-width: 900px) { .home-cols { grid-template-columns: 1fr; gap: 3rem; } }

.entries { list-style: none; margin: 0; padding: 0; }
.entry a {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
}
.entry:first-child a { padding-top: .4rem; }
.entry-map { display: block; aspect-ratio: 1; border: 1px solid var(--rule); overflow: hidden; background: var(--paper); }
.entry-map svg { width: 100%; height: 100%; display: block; }
svg.thumb .m-contour { stroke-width: .5px; }
svg.thumb .m-index { stroke-width: .9px; }
svg.thumb .m-coast { stroke-width: 1.1px; }
svg.thumb .m-water { stroke-width: .5px; }
svg.thumb .m-neat { display: none; }
.entry-text { display: flex; flex-direction: column; gap: .35rem; }
.entry-title { font-size: 1.75rem; line-height: 1.08; letter-spacing: -.01em; }
.entry-dek { font-style: italic; color: var(--ink-2); line-height: 1.45; text-wrap: pretty; }
.entry-place { font-family: var(--sans); font-size: .8rem; letter-spacing: .04em; color: var(--ink-3); }
.entry a:hover .entry-title { color: var(--contour-strong); }
.entry a:hover .entry-map { border-color: var(--contour); }
@media (max-width: 520px) {
  .entry a { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; }
  .entry-title { font-size: 1.45rem; }
}

.notebook-peek .note { padding: 0 0 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.notebook-peek .note p { margin: 0; font-size: .95rem; line-height: 1.55; }
.notebook-peek .note-head, .nb-head {
  font-family: var(--sans); font-size: .7rem !important; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .35rem !important;
}
.more {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--contour-strong); text-decoration: none;
}
.more:hover { text-decoration: underline; text-underline-offset: .25em; }

/* ---- notebook ------------------------------------------------------------ */

.page-head { padding-top: clamp(2.5rem, 7vw, 5rem); }
.notebook { list-style: none; padding: 0; margin-top: 1rem; border-top: 1px solid var(--ink); }
.nb-entry { padding: 1.6rem 0 1.7rem; border-bottom: 1px solid var(--rule); }
.nb-head { display: flex; justify-content: space-between; gap: 1rem; margin: 0; }
.nb-text { margin: 0; font-size: 1.08rem; line-height: 1.62; text-wrap: pretty; }

/* ---- about --------------------------------------------------------------- */

.about .prose h2 { font-size: 1.5rem; }
.signoff { margin-top: 2.4rem !important; text-indent: 0 !important; font-style: italic; font-size: 1.25rem; line-height: 1.3; }
.signoff span { font-style: normal; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* ---- 404 ----------------------------------------------------------------- */

.lost { padding: 2rem 0; }
.lost > :not(.plate-wrap) { width: min(var(--measure), 100% - 2.5rem); margin-left: auto; margin-right: auto; }
.lost .kicker { margin-top: 3rem; }

/* ---- colophon ------------------------------------------------------------ */

.colophon {
  max-width: var(--measure); margin: clamp(5rem, 10vw, 8rem) auto 0; padding: 2.5rem 1.25rem 3.5rem;
  text-align: center; color: var(--ink-3); font-size: .85rem; line-height: 1.55;
}
.colophon p { margin: 0 auto .7rem; max-width: 30em; font-style: italic; }
.colophon .small { font-style: normal; font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; }
.colophon a { color: var(--ink-2); text-underline-offset: .2em; }
.scalebar {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr);
  width: 11rem; height: .4rem; margin: 0 auto 2.2rem;
  border: 1px solid var(--ink-2);
}
.scalebar span:nth-child(odd) { background: var(--ink-2); }
.scalebar i {
  position: absolute; top: .7rem; transform: translateX(-50%);
  font-style: normal; font-family: var(--sans); font-size: .66rem; letter-spacing: .06em; color: var(--ink-3);
}
.scalebar i:nth-of-type(1) { left: 0; }
.scalebar i:nth-of-type(2) { left: 50%; }
.scalebar i:nth-of-type(3) { left: 100%; transform: none; margin-left: -.2rem; white-space: nowrap; }

@media (max-width: 720px) {
  .wm-title { display: none; }
  .masthead { padding-bottom: .6rem; }
  .masthead nav { gap: .2rem 1.1rem; }
  .theme-toggle { border-left: 0; padding-left: 0; margin-left: 0; }
  .prose { hyphens: auto; -webkit-hyphens: auto; }
}

@media print {
  .masthead nav, .colophon, .essay-foot, .skip { display: none; }
  body { background: white; }
  .sidenote { display: block; float: none; margin: .5rem 0; font-size: .8rem; }
}

