/* seeknay.com, design B "What Pat is up to right now"
   One stylesheet for index, posts, post and about.

   1. Tokens          5. Page head (who)      9. Listing (posts.html)
   2. Base            6. Bands and rows      10. Article (post.html)
   3. Icons           7. Home                11. About
   4. Top bar         8. Footer              12. Motion, breakpoints
   13. Sides (Pat / seeknay)
*/

/* 1. Tokens ------------------------------------------------------------ */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour: all four taken from the avatar */
  --navy: #13283b;        /* text, first band, footer */
  --navy-2: #3a5468;      /* secondary text */
  --navy-hover: #1b3650;  /* row hover on navy */
  --teal: #1f5a61;        /* second band, links */
  --sky: #c0e4f4;         /* third band */
  --sky-soft: #e4f2f9;    /* row hover, panels */
  --ground: #f8fbfd;      /* page */
  --line: #c6dbe6;        /* rules on ground */
  --line-dark: #2e4a61;   /* rules on navy */
  --on-dark: #f8fbfd;
  --on-dark-2: #b4cfdd;
  /* Surfaces. Each side redefines these once (section 13) instead of patching rules. */
  --band-1: var(--navy);
  --band-2: var(--teal);
  --band-3: var(--sky);
  --on-band-3: var(--navy);
  --deep: var(--navy);        /* footer, code blocks, skip link */
  --code-ink: var(--on-dark);
  --slash: var(--line);
  --lead-hover: var(--sky);
  --avatar-bg: var(--sky);

  /* Type */
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(3rem, 7.2vw, 6rem);       /* page titles */
  --fs-band: clamp(2.125rem, 3.5vw, 3.125rem);  /* band labels, section heads */
  --fs-feature: 1.75rem;                        /* lead post, date, article h2 */
  --fs-lead: 1.3125rem;                         /* role line, intros */
  --fs-sub: 1.375rem;                           /* article h3 */
  --fs-title: 1.125rem;                         /* post titles, prose */
  --fs-body: 1.0625rem;
  --fs-small: 1rem;
  --lh-body: 1.5;
  --lh-prose: 1.65;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;
  --inset: 1.5rem;          /* left and right padding of every row and band */
  --frame: 79rem;           /* the page never grows wider than this */
  --split: 1.28fr 2fr;      /* the two-column split on list pages */
  --split-post: minmax(22.5rem, 1fr) 2.7fr;   /* posts: slimmer contents column */
  --measure: 38.5rem;       /* reading column, about 70 characters */
  --measure-post: 48rem;    /* posts: about 85 characters */
  --tap: 2.75rem;           /* smallest tap target */

  /* Icons */
  --icon-inline: 0.875em;
  --icon-list: 1.125rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-wash: cubic-bezier(.65, 0, .25, 1);
  color-scheme: light;
}

/* 2. Base -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--teal) var(--sky-soft);
  scroll-padding-top: var(--s-5);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--navy); color: var(--sky); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}
.band--navy :focus-visible, .foot :focus-visible, .skip:focus-visible { outline-color: var(--sky); }

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -5rem;
  z-index: 10;
  padding: var(--s-3) 1.125rem;
  background: var(--deep);
  color: var(--on-dark);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: var(--s-4); }

.wrap {
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
}
.inset { padding-inline: var(--inset); }

/* 3. Icons ------------------------------------------------------------- */
/* Two sizes, one colour (the text colour of whatever they sit in). */

.icon {
  width: var(--icon-inline);
  height: var(--icon-inline);
  fill: currentColor;
  flex: none;
}
.icon--list {
  width: var(--icon-list);
  height: var(--icon-list);
  /* centre on the first line of text */
  margin-top: calc((var(--lh-body) * 1em - var(--icon-list)) / 2);
}

/* 4. Top bar ----------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-3);
}
.top__mark {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 800;
  font-size: var(--fs-title);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.top__nav { display: flex; gap: var(--s-1); margin-right: -0.875rem; }
.top__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  min-width: var(--tap);
  justify-content: center;
  padding-inline: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--navy-2);
}
.top__nav a:hover { color: var(--navy); text-decoration: underline; text-decoration-thickness: 2px; }
.top__nav a[aria-current] {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.45em;
}

/* 5. Page head --------------------------------------------------------- */
/* Portrait or nothing, a large title, a line or two, and one fact on the right. */

.who {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  column-gap: var(--s-6);
  padding-block: 2.25rem 2.75rem;
}
.who--plain { grid-template-columns: 1fr auto; }
.who__face {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 1.25rem;
  display: block;
  background: var(--avatar-bg);
}
.who__name {
  font-size: var(--fs-display);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.who__name .slash { color: var(--slash); font-weight: 400; margin-inline: 0.06em; }
.who__name .handle { color: var(--teal); font-weight: 400; }
.who__role {
  margin-top: var(--s-4);
  font-size: var(--fs-lead);
  line-height: 1.3;
  font-weight: 600;
}
.who__fact { margin-top: var(--s-1); color: var(--navy-2); max-width: 46ch; }
.who__date {
  text-align: right;
  color: var(--navy-2);
  padding-bottom: 0.125rem;
}
.who__date time, .who__date b {
  display: block;
  font-size: var(--fs-feature);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

/* 6. Bands and rows ---------------------------------------------------- */

.band {
  padding: 1.375rem var(--inset) 1.25rem;
  font-size: var(--fs-band);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.band--navy { background: var(--band-1); color: var(--on-dark); }
.band--teal { background: var(--band-2); color: var(--on-dark); }
.band--sky { background: var(--band-3); color: var(--on-band-3); }

.items > li { display: flex; border-bottom: 1px solid var(--line); }
.row {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-content: center;
  align-items: start;
  column-gap: var(--s-3);
  min-height: 3.5rem;
  padding: 0.9375rem var(--inset);
  color: var(--navy-2);
  text-decoration: none;
}
.row b { font-weight: 700; color: var(--navy); }
.row__out { color: var(--teal); margin-top: 0.42em; transition: transform 0.25s var(--ease); }
a.row:hover, .post:hover { background: var(--sky-soft); }
a.row:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a.row:hover .row__out { transform: translate(0.15em, -0.1em); }
a.row:hover .row__out--go { transform: translateX(0.2em); }
a.row:focus-visible, .post:focus-visible, .link:focus-visible { outline-offset: -3px; }

.h2 {
  font-size: var(--fs-band);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede { margin-top: 0.875rem; color: var(--navy-2); max-width: 30ch; }
/* The bold underlined text link: "more" links, the breadcrumb, project links */
.more, .crumb a, .entry__body .tlink {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  font-weight: 700;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.more { margin-top: var(--s-4); }
.more:hover, .crumb a:hover, .entry__body .tlink:hover { color: var(--navy); }
.more .icon { transition: transform 0.25s var(--ease); }
.more:hover .icon { transform: translateX(0.2em); }

/* A two-column section: heading on the left, content on the right */
.split {
  display: grid;
  grid-template-columns: var(--split);
  padding-block: var(--s-8);
}
.split__head { padding-inline: var(--inset); }
.split + .split { padding-top: 0; }

/* Post rows: date, title, reading time */
.plist { border-top: 2px solid var(--navy); }
.plist > li { border-bottom: 1px solid var(--line); }
.post {
  display: grid;
  grid-template-columns: 8.25rem 1fr auto;
  align-items: baseline;
  column-gap: 1.25rem;
  min-height: 3.5rem;
  padding: 0.9375rem var(--inset);
  text-decoration: none;
}
.post time, .post .mins, .post .lane, .post .sum { color: var(--navy-2); }
.post .mins { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.post .title { font-weight: 700; font-size: var(--fs-title); line-height: 1.35; }
.post:hover .title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* 7. Home -------------------------------------------------------------- */

.now { display: grid; grid-template-columns: var(--split); }
.now > .block { display: flex; flex-direction: column; }
/* The long first list shares out any spare height, so all three columns end on one line */
.now > .block > .items { flex: 1; display: grid; }
.now__side { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
.now__side > .lead { grid-column: 1 / -1; }

@supports (grid-template-rows: subgrid) {
  /* Writing about and Enjoying share five row tracks, so their rules line up */
  .now__side { grid-template-rows: auto repeat(5, auto) 1fr; }
  .now__side > .block { display: grid; grid-row: 1 / 7; grid-template-rows: subgrid; }
  .now__side > .block > .items { display: grid; grid-row: 2 / 7; grid-template-rows: subgrid; }
}

/* Newest post: fills the space under the two shorter lists */
.lead {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-6) var(--inset);
  background: var(--sky-soft);
  transition: background-color 0.25s var(--ease);
}
.lead:hover { background: var(--lead-hover); }
.lead__title {
  font-size: var(--fs-feature);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead__title a { text-decoration: none; }
.lead__title a::after { content: ""; position: absolute; inset: 0; }
.lead__title a:focus-visible { outline: none; }
.lead:has(a:focus-visible) { outline: 3px solid var(--teal); outline-offset: -3px; }
.lead:hover .lead__title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.lead__sum { margin-top: var(--s-2); color: var(--navy-2); max-width: 58ch; }
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) 1.25rem;
  color: var(--navy-2);
}
.meta > * { display: inline-flex; align-items: center; gap: 0.45em; }
.meta b { color: var(--navy); font-weight: 700; }
.lead .meta { margin-top: var(--s-4); }
.lead .meta .go { margin-left: auto; color: var(--teal); font-weight: 700; }
.lead .meta .go .icon { transition: transform 0.25s var(--ease); }
.lead:hover .meta .go .icon { transform: translateX(0.2em); }

/* Audience strip: live follower counts under the page head */
.reach { display: grid; grid-template-columns: var(--split); border-top: 2px solid var(--navy); }
.reach__total { padding: var(--s-5) var(--inset) var(--s-6); }
.reach__total b {
  display: block;
  font-size: clamp(3rem, 5.6vw, 4.75rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.reach__total p:first-of-type > span { display: block; margin-top: var(--s-2); font-size: var(--fs-lead); font-weight: 600; }
.reach__as { margin-top: var(--s-1); color: var(--navy-2); }
.reach__nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.reach__nets a {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  height: 100%;
  padding: var(--s-5) var(--s-2) var(--s-6) var(--inset);
  border-left: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.reach__nets a:hover { background: var(--sky-soft); }
.reach__nets a:focus-visible { outline-offset: -3px; }
.reach__nets b { margin-top: var(--s-5); font-size: clamp(1.5rem, 2.4vw, 2.25rem); line-height: 1; font-weight: 700; letter-spacing: -0.025em; }
.reach__nets span { color: var(--navy-2); }
@media (max-width: 60rem) {
  .reach { grid-template-columns: 1fr; }
  .reach__nets { border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
  .reach__nets li:first-child a { border-left: 0; }
}
@media (max-width: 40rem) {
  .reach__nets { grid-template-columns: 1fr 1fr; }
  .reach__nets li:nth-child(odd) a { border-left: 0; }
  .reach__nets li:nth-child(n + 3) a { border-top: 1px solid var(--line); }
  .reach__nets b { font-size: 1.75rem; }
  .reach__total p:first-of-type > span { font-size: var(--fs-title); }
}

.passage { padding-inline: var(--inset); max-width: calc(var(--measure) + 2 * var(--inset)); }
.passage p { font-size: var(--fs-lead); line-height: 1.45; }
.passage p + p { margin-top: var(--s-4); }

/* 8. Footer ------------------------------------------------------------ */

.foot { background: var(--deep); color: var(--on-dark); }
.foot ::selection { background: var(--sky); color: var(--navy); }
.else { padding-block: var(--s-8) 3.5rem; }
.else .lede { color: var(--on-dark-2); }
.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--sky);
}
.links > li { border-bottom: 1px solid var(--line-dark); }
.link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 3.75rem;
  padding: var(--s-4) var(--inset);
  text-decoration: none;
  color: var(--on-dark-2);
}
.link b { font-weight: 700; font-size: 1.25rem; color: var(--on-dark); letter-spacing: -0.01em; }
.link .icon--list { margin-top: 0; width: 1.25rem; height: 1.25rem; color: var(--on-dark); }
.link__out { margin-left: auto; color: var(--sky); transition: transform 0.25s var(--ease); }
.link:hover { background: var(--navy-hover); }
.link:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.link:hover .link__out { transform: translate(0.15em, -0.1em); }

.base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-5);
  padding-block: var(--s-4) 1.75rem;
  color: var(--on-dark-2);
  font-size: var(--fs-small);
}
.base nav { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-inline: -0.875rem; }
.base a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: var(--tap);
  padding-inline: 0.875rem;
  text-decoration: none;
}
.base a:hover { color: var(--on-dark); text-decoration: underline; }
.base a[aria-current] { color: var(--on-dark); font-weight: 700; }

.base button {
  min-height: var(--tap);
  padding-inline: 0.875rem;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.base button:hover { color: var(--on-dark); text-decoration: underline; }

/* Cookie choice: a bar pinned to the bottom until the visitor picks */
.consent {
  position: fixed;
  inset: auto var(--s-4) var(--s-4) var(--s-4);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  max-width: 46rem;
  margin-inline: auto;
  padding: var(--s-4) var(--s-5);
  color: var(--on-dark);
  background: var(--deep);
  border: 1px solid var(--line-dark);
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.28);
}
.consent[hidden] { display: none; }
.consent p { flex: 1 1 18rem; font-size: var(--fs-small); }
.consent__actions { display: flex; gap: var(--s-2); }
.consent button {
  min-height: var(--tap);
  padding-inline: var(--s-5);
  font: inherit;
  font-weight: 700;
  color: var(--deep);
  background: var(--on-dark);
  border: 2px solid var(--on-dark);
  cursor: pointer;
}
.consent button:hover { background: var(--sky); border-color: var(--sky); }
.consent :focus-visible { outline-color: var(--sky); }
@media print { .consent { display: none; } }
@media (max-width: 40rem) {
  .consent { inset-inline: 0; bottom: 0; border-inline: 0; border-bottom: 0; padding-bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); }
  /* Keep the footer reachable while the bar is open */
  body:has(.consent:not([hidden])) { padding-bottom: 10rem; }
  .consent__actions { flex: 1; }
  .consent button { flex: 1; }
}

/* 9. Listing (posts.html) --------------------------------------------- */
/* The filter is five radio buttons and sibling selectors. No script needed. */

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0 var(--inset) var(--s-5);
}
.filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.filter label:hover { background: var(--sky-soft); }
.filter .n { font-weight: 400; color: var(--navy-2); font-variant-numeric: tabular-nums; }

/* Search: shown by script, filters the same rows as the topic filter */
.search {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: 30rem;
  margin: 0 var(--inset) var(--s-5);
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
}
.search[hidden], .plist li[hidden], .year[hidden] { display: none; }
.search:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.search label { display: flex; color: var(--navy-2); }
.search input { flex: 1; min-width: 0; min-height: var(--tap); border: 0; background: none; color: inherit; font: inherit; outline: none; }
.search input::placeholder { color: var(--navy-2); opacity: 1; }
.empty--none:not([hidden]) { display: block; }
/* Says which side is showing, since a side hides some posts */
.viewnote { padding: 0 var(--inset) var(--s-4); color: var(--navy-2); }
.viewnote .reset { display: inline; margin: 0 0 0 var(--s-2); min-height: 0; }
html[data-side="both"] .viewnote { display: none; }

/* The chosen topic's label. The per-topic rules that hide rows are written by
   _includes/topic-filter-css.html from _data/topics.yml, so a new topic needs no CSS. */
.empty {
  display: none;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--line);
  padding: var(--s-7) var(--inset);
}
.empty h2 { font-size: var(--fs-feature); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
.empty p { margin-top: var(--s-2); color: var(--navy-2); max-width: 52ch; }

.year + .year { margin-top: var(--s-7); }
.year .plist { border-top: 0; }
.post--full { grid-template-columns: 8.25rem 1fr 11rem 4.5rem; }
.post--full .sum { display: block; margin-top: 0.125rem; font-size: var(--fs-body); font-weight: 400; line-height: 1.45; max-width: 62ch; }
.listing { padding-bottom: var(--s-9); }

/* 10. Article (post.html) --------------------------------------------- */

.crumb { padding-block: var(--s-4) var(--s-5); }
.crumb .icon { transform: scaleX(-1); }

.arthead { display: grid; grid-template-columns: var(--split-post); }
.arthead .band--navy {
  grid-column: 1 / -1;
  padding-block: var(--s-7) 2.5rem;
}
.arthead h1 {
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 20ch;
  text-wrap: balance;
}
.arthead .dek {
  margin-top: var(--s-4);
  font-size: var(--fs-lead);
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--on-dark-2);
  max-width: 52ch;
}
.arthead .band--teal, .arthead .band--sky {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding-block: var(--s-3);
  font-size: var(--fs-body);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0;
}
.arthead .meta { color: inherit; }
.arthead .meta b { color: inherit; }
.byline__face { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; display: block; }

.article {
  display: grid;
  grid-template-columns: var(--split-post);
  align-items: start;
  padding-block: var(--s-7) var(--s-8);
}
.article:not(.article--plain) { --measure: var(--measure-post); }
.article > * { min-width: 0; }
/* The text stays in the reading column whether or not a contents list is shown */
.article__body { grid-column: 2; }

.toc { position: sticky; top: var(--s-5); padding-right: var(--s-5); }
.toc summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--tap);
  padding: var(--s-2) var(--inset);
  border-bottom: 2px solid var(--navy);
  font-weight: 800;
  font-size: var(--fs-title);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary .chev { margin-left: auto; transition: transform 0.25s var(--ease); }
.toc[open] summary .chev { transform: rotate(90deg); }
.toc li { border-bottom: 1px solid var(--line); }
.toc a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: var(--s-2) var(--inset);
  text-decoration: none;
  color: var(--navy-2);
}
.toc a:hover { background: var(--sky-soft); color: var(--navy); text-decoration: underline; }
.toc a:focus-visible { outline-offset: -3px; }

.prose {
  max-width: calc(var(--measure) + 2 * var(--inset));
  padding-inline: var(--inset);
  font-size: var(--fs-title);
  line-height: var(--lh-prose);
}
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  margin-top: 2.25em;
  padding-top: var(--s-4);
  border-top: 2px solid var(--navy);
  font-size: var(--fs-feature);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.prose h3 {
  margin-top: 1.9em;
  font-size: var(--fs-sub);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose h2 + h3 { margin-top: 1.1em; }
.prose strong { font-weight: 700; }
.prose a { color: var(--teal); font-weight: 600; text-decoration-thickness: 2px; }
.prose a:hover { color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li > ul { margin-top: 0.4em; }
.prose li::marker { color: var(--teal); font-weight: 700; font-variant-numeric: normal; }
.prose p + ul, .prose p + ol { margin-top: 0.6em; }
.prose blockquote {
  padding: var(--s-4) 1.25rem;
  background: var(--sky-soft);
  color: var(--navy);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin-top: var(--s-7); }

.tablewrap { overflow-x: auto; scrollbar-width: thin; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.4;
}
.prose caption {
  text-align: left;
  padding-bottom: var(--s-2);
  font-weight: 800;
  font-size: var(--fs-title);
  letter-spacing: -0.01em;
}
.prose th, .prose td { padding: 0.7rem var(--s-3); text-align: left; vertical-align: top; }
.prose th:first-child, .prose td:first-child { padding-left: 0; }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose thead th {
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  font-weight: 700;
  white-space: nowrap;
}
.prose tbody tr { border-bottom: 1px solid var(--line); }
.prose tbody th { font-weight: 700; }
.prose .num { text-align: right; white-space: nowrap; }
.prose .media video, .prose .media iframe { display: block; width: 100%; height: auto; border: 0; background: var(--deep); }
.prose .media--embed iframe { aspect-ratio: 16 / 9; }
.prose figcaption { margin-top: var(--s-2); color: var(--navy-2); font-size: var(--fs-small); line-height: 1.5; }

.prose pre {
  margin: 0;
  padding: 1.125rem 1.25rem;
  overflow-x: auto;
  background: var(--deep);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.6;
  tab-size: 2;
  scrollbar-color: var(--sky) var(--deep);
}
.prose pre .c { color: var(--on-dark-2); }
.prose pre .v { color: var(--sky); }
.prose pre ::selection { background: var(--sky); color: var(--navy); }
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  background: var(--sky-soft);
}

.endmatter {
  max-width: calc(var(--measure) + 2 * var(--inset));
  margin-top: var(--s-7);
  padding-inline: var(--inset);
}
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--line); }
.pager > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 5rem;
  padding: var(--s-4) 0;
  color: var(--navy-2);
  font-size: var(--fs-small);
  line-height: 1.4;
  text-decoration: none;
}
.pager > * + * { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.pager > :first-child { padding-right: var(--s-5); }
.pager b { display: block; color: var(--navy); font-size: var(--fs-title); font-weight: 700; line-height: 1.3; }
.pager a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.pager .dir { display: inline-flex; align-items: center; gap: 0.45em; }
.pager .back .icon { transform: scaleX(-1); }

.author {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.25rem;
  align-items: start;
  margin-top: var(--s-6);
  padding: var(--s-5);
  background: var(--sky-soft);
  line-height: var(--lh-body);
  font-size: var(--fs-body);
}
.author img { width: 5rem; height: 5rem; border-radius: 0.875rem; display: block; background: var(--sky); }
.author h2 { font-size: var(--fs-sub); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.author .handle { color: var(--teal); font-weight: 400; }
.author p { margin-top: var(--s-1); color: var(--navy-2); }
.author .more { margin-top: var(--s-1); }

/* 11. About ------------------------------------------------------------ */

.bio { padding-bottom: var(--s-8); }
.sect + .sect { margin-top: var(--s-7); }
.sect:last-child { padding-bottom: var(--s-9); }
.entries > li { border-bottom: 1px solid var(--line); }
.entry {
  display: grid;
  grid-template-columns: var(--split);
  align-items: start;
}
.entry__name {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s-3);
  padding: 1.125rem var(--inset);
  font-weight: 700;
  font-size: var(--fs-title);
  line-height: var(--lh-body);
}
.entry__name .icon--list { color: var(--navy-2); }
.entry__body { padding: 1.125rem var(--inset); color: var(--navy-2); max-width: calc(var(--measure) + 2 * var(--inset)); }
.entry__body .tlink { margin-top: var(--s-1); }
.entry__body .tlink .icon:last-child { transition: transform 0.25s var(--ease); }
.entry__body .tlink:hover .icon:last-child { transform: translate(0.15em, -0.1em); }

/* 12. Motion and breakpoints ------------------------------------------ */

/* One authored moment: the three home bands draw across like a line being ruled */
@media (prefers-reduced-motion: no-preference) {
  .now .band { animation: rule-in 0.8s var(--ease) both; }
  .now .band--teal { animation-delay: 0.09s; }
  .now .band--sky { animation-delay: 0.18s; }
  @keyframes rule-in {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (min-width: 60.0625rem) and (max-width: 72rem) {
  .links { grid-template-columns: 1fr; }
  .post--full { grid-template-columns: 7.5rem 1fr 4.5rem; }
  .post--full .lane { grid-column: 2; grid-row: 2; }
}

/* Tablet and below: everything becomes a single column */
@media (max-width: 60rem) {
  .who { grid-template-columns: auto 1fr; row-gap: var(--s-5); }
  .who--plain { grid-template-columns: 1fr; }
  .who__date { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: var(--s-2); }
  .who__date time, .who__date b { display: inline; font-size: 1.25rem; }
  .now, .split, .arthead, .article, .entry { grid-template-columns: 1fr; }
  .now__side { display: block; }
  .now__side > .block { display: block; }
  .now__side > .block > .items { display: block; }
  .now .block { margin-top: var(--s-6); }
  .now > .block:first-child { margin-top: 0; }
  .lead { margin-top: var(--s-6); }
  .split { padding-block: 3.5rem; row-gap: 1.75rem; }
  .else { padding-block: 3.5rem 2.5rem; }
  .lede { max-width: 46ch; }
  .post--full { grid-template-columns: 8.25rem 1fr 4.5rem; }
  .post--full .lane { grid-column: 2; grid-row: 2; }
  .arthead .band--navy { padding-block: var(--s-6) var(--s-5); }
  .article { padding-top: var(--s-5); row-gap: var(--s-6); }
  .toc { position: static; padding-right: 0; }
  .article__body { grid-column: auto; }
  .entry__name { padding-bottom: 0; }
  .entry__body { padding-top: var(--s-1); padding-left: calc(var(--inset) + var(--icon-list) + var(--s-3)); }
}

@media (max-width: 36rem) {
  :root { --inset: 1.125rem; }
  .who { grid-template-columns: 1fr; padding-block: 1.25rem var(--s-6); row-gap: 0; }
  .who__face { width: 6.5rem; height: 6.5rem; border-radius: 1rem; margin-bottom: 1.25rem; }
  .who__name { font-size: 3.25rem; }
  .who__role { font-size: 1.1875rem; margin-top: 0.875rem; }
  .who__date { margin-top: 1.25rem; padding-top: var(--s-4); border-top: 2px solid var(--navy); }
  .band { padding-block: 1.125rem 1rem; }
  .post, .post--full { grid-template-columns: 1fr auto; row-gap: 0.125rem; }
  .post .title { grid-column: 1 / -1; grid-row: 2; }
  .post--full .lane { grid-column: 1 / -1; grid-row: 3; margin-top: var(--s-1); }
  .links { grid-template-columns: 1fr; }
  .top__nav a { padding-inline: 0.5rem; }
  .top__nav { margin-right: -0.5rem; gap: 0; }
  .lead .meta .go { margin-left: 0; flex-basis: 100%; }
  .passage p { font-size: 1.1875rem; }
  .pager { grid-template-columns: 1fr; }
  .pager > * + * { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .author { grid-template-columns: 1fr; row-gap: var(--s-4); padding: 1.125rem; }
  .author img { width: 4rem; height: 4rem; }
  .prose { font-size: var(--fs-body); }
  .prose pre { margin-inline: calc(-1 * var(--inset)); padding-inline: var(--inset); }
}
@media (max-width: 22rem) {
  .who__name { font-size: 2.75rem; }
  .band { font-size: 1.875rem; }
}


/* 13. Sides -----------------------------------------------------------
   <html data-side> is "both" (combined), "pat" or "seeknay".
   Anything tagged data-for is shown or hidden by these three rules:
     work, personal            that side and the combined view (work = Pat, personal = seeknay)
     work-only, personal-only  that side alone
     combined-only         the combined view alone
   Untagged content shows everywhere. */
html[data-side="both"] :is([data-for="work-only"], [data-for="personal-only"]),
html[data-side="pat"] :is([data-for="personal"], [data-for="personal-only"], [data-for="combined-only"]),
html[data-side="seeknay"] :is([data-for="work"], [data-for="work-only"], [data-for="combined-only"]) { display: none !important; }
html[data-side="both"] .reset { display: none; }
html[data-side="pat"] .year:not(:has(li:not([data-for="personal"]))),
html[data-side="seeknay"] .year:not(:has(li:not([data-for="work"]))) { display: none; }

.pick { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: .08em;
  text-decoration: underline; text-decoration-thickness: .045em; text-underline-offset: .12em; text-decoration-color: transparent; transition: text-decoration-color .2s, opacity .3s; }
.pick:hover { text-decoration-color: currentColor; }
.pick[aria-pressed="true"] { text-decoration-color: currentColor; }
.pick:focus-visible { outline: 3px solid var(--teal); outline-offset: .06em; }
html[data-side="pat"] .pick.handle, html[data-side="seeknay"] .pick:not(.handle) { opacity: .38; }
html[data-side="seeknay"] .pick.handle { font-weight: 800; }
html[data-side="seeknay"] .pick:not(.handle) { font-weight: 400; }
.reset { display: block; margin-top: var(--s-1); font: inherit; font-weight: 700; color: var(--teal); background: none; border: 0; padding: 0; min-height: var(--tap); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.who__pic { position: relative; width: 9.5rem; height: 9.5rem; align-self: start; margin-top: .35rem; }
/* Two overlapping tiles in "both" (photo in front, avatar behind); the chosen side's picture grows to fill the frame */
.who__pic .who__face, .who__photo {
  position: absolute; display: block; object-fit: cover; margin: 0;
  width: 70%; height: 70%; border-radius: 1.1rem;
  box-shadow: 0 0 0 4px var(--ground);
  transition: width .5s var(--ease-wash), height .5s var(--ease-wash), top .5s var(--ease-wash), left .5s var(--ease-wash), opacity .3s;
}
.who__photo { top: 0; left: 0; z-index: 2; }
.who__pic .who__face { top: 30%; left: 30%; z-index: 1; }
html[data-side="pat"] .who__photo,
html[data-side="seeknay"] .who__pic .who__face { top: 0; left: 0; width: 100%; height: 100%; border-radius: 1.25rem; }
html[data-side="pat"] .who__pic .who__face,
html[data-side="seeknay"] .who__photo { opacity: 0; }

/* Pat: quieter, squarer, cool neutrals */
html[data-side="pat"] { --ground: #ffffff; --sky: #dde5ec; --sky-soft: #eef2f5; --teal: #1d4a66; --line: #d3dbe2; --band-2: #2b4257; }
html[data-side="pat"] .now__side > .block { grid-column: 1 / -1; }
/* seeknay: the dark side. Navy ground, grey-blue text, lighter blues for bands and links */
html[data-side="seeknay"] { --ground: #0e1c2a; --navy: #e9f0f6; --navy-2: #a7bccb; --teal: #86c8e6; --sky: #33607f; --sky-soft: #16293b; --line: #263d52; color-scheme: dark;
  --band-1: #1d3550; --band-2: #27506f; --band-3: #3d6f92; --on-band-3: #f8fbfd; --deep: #08121c; --code-ink: #e9f0f6; --slash: #3a556c; --lead-hover: #1c3349; --avatar-bg: #c0e4f4; }
@media (max-width: 760px) { .who__pic { width: 6.5rem; height: 6.5rem; margin-bottom: var(--s-4); } }

/* The switch: the new side washes across the page with a soft leading edge.
   Left to right when going to seeknay, right to left when coming back. */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) {
  -webkit-mask-image: linear-gradient(90deg, #000 0 45%, transparent 55% 100%); mask-image: linear-gradient(90deg, #000 0 45%, transparent 55% 100%);
  -webkit-mask-size: 220% 100%; mask-size: 220% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: wash .85s var(--ease-wash) both;
}
@keyframes wash { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
html[data-dir="back"]::view-transition-new(root) {
  -webkit-mask-image: linear-gradient(270deg, #000 0 45%, transparent 55% 100%); mask-image: linear-gradient(270deg, #000 0 45%, transparent 55% 100%);
  animation-name: wash-back;
}
@keyframes wash-back { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 100% 0; mask-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-new(root) { animation: none; -webkit-mask-image: none; mask-image: none; } }

/* 14. Post body extras: callouts written as {: .notice--info} in Markdown */
.prose [class*="notice"] { background: var(--sky-soft); padding: var(--s-4) var(--s-5); margin-block: var(--s-5); border-left: 4px solid var(--teal); }
.prose [class*="notice"] > :first-child { margin-top: 0; }
.article--plain { display: block; }
.article--plain > .prose-col { max-width: calc(var(--measure) + 2 * var(--inset)); margin-inline: auto; }
.prose blockquote p + p, .prose [class*="notice"] p + p { margin-top: var(--s-3); }
.prose li pre { margin-block: var(--s-3); }
.prose .sources { font-size: var(--fs-small); line-height: 1.55; color: var(--navy-2); margin-top: var(--s-2); }
