/*
  Ran Craycraft, site styles.
  Two typefaces on warm paper. Newsreader for reading, Instrument Sans for everything around it,
  and Helvetica Neue for the name. One 12-column grid, with a 3-column rail for labels and meta.
*/

/* Fonts, served from this site. All are SIL Open Font License, see /assets/fonts/OFL.txt. */
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Color */
  --paper: #FAFAF7;
  --paper-2: #F1F0EB;
  --ink: #262624;      /* headlines, labels and UI, a warm dark grey rather than black */
  --text: #3A3A35;     /* reading text */
  --ink-2: #4A4A44;
  --muted: #6A6A64;
  --rule: #E3E2DC;
  --rule-2: #C9C8C1;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mark: "Helvetica Neue", Helvetica, "Inter Tight", Arial, sans-serif;

  /* Space */
  --gutter: clamp(20px, 4.2vw, 56px);
  --col-gap: clamp(16px, 2vw, 28px);
  --section: clamp(96px, 11vw, 176px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 12px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 2px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.rail { grid-column: 1 / span 3; }
.span-main { grid-column: 4 / span 7; }
.span-wide { grid-column: 4 / -1; }
.section { padding-top: var(--section); }

/* Type */
.serif { font-family: var(--serif); font-optical-sizing: auto; }
.eyebrow { font-size: 13px; line-height: 1.5; font-weight: 450; letter-spacing: 0.01em; color: var(--muted); }
.eyebrow.strong, .strong { color: var(--ink); font-weight: 500; }
.meta { font-size: 13px; line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { margin: 0 0.45em; color: var(--rule-2); }
.ext { font-family: var(--sans); }
.lede { font-size: clamp(19px, 1.55vw, 23px); line-height: 1.45; font-weight: 360; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.ul { text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 200ms var(--ease); }
.ul:hover { text-decoration-color: currentColor; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.arrow-link::after { content: "→"; transition: transform 250ms var(--ease); }
.arrow-link:hover::after { transform: translateX(3px); }
.arrow-link + .arrow-link { margin-left: 32px; }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500; transition: background 200ms var(--ease), transform 200ms var(--ease); }
.button::after { content: "→"; transition: transform 250ms var(--ease); }
.button:hover { background: #3A3A36; }
.button:hover::after { transform: translateX(3px); }
.button + .arrow-link { margin-left: 24px; }

/* Header */
.site-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; padding: 28px 0; }
.brand { font-family: var(--mark); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.site-nav { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.site-nav a { transition: color 200ms var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); font-weight: 500; }
.site-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }

/* Home hero */
.hero { padding: clamp(72px, 11vw, 168px) 0 0; }
.hero-title { font-size: clamp(38px, 6.4vw, 96px); line-height: 1.01; letter-spacing: -0.032em; font-weight: 320; max-width: 13.5em; text-wrap: balance; }
.hero-body { margin-top: clamp(40px, 5.5vw, 80px); }
.hero-body .eyebrow { padding-top: 0.4em; }
.hero-now { margin-top: 24px; font-size: 15px; color: var(--muted); max-width: 40em; }
.hero-more { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 0; }

/* Section heads */
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head > :first-child { grid-column: 1 / span 3; }
.section-note { grid-column: 4 / span 5; font-size: 13px; color: var(--muted); }
.section-head .carousel-nav, .section-head .filter { grid-column: 9 / -1; justify-self: end; }
.section-foot { margin-top: clamp(32px, 4vw, 48px); }

/* Media */
.media { display: block; overflow: hidden; border-radius: 2px; background: var(--paper-2); }
.cover, .cover-img { width: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
a:hover .cover, a:hover .cover-img { transform: scale(1.02); }
.cover { padding: clamp(16px, 2vw, 26px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.cover-kicker { font-size: 12px; letter-spacing: 0.01em; opacity: 0.72; }
.cover-lines { display: flex; flex-direction: column; font-family: var(--serif); font-size: clamp(20px, 2vw, 30px); line-height: 1.12; font-weight: 340; letter-spacing: -0.01em; }
.cover-lines .i { font-style: italic; }
.story-cover .cover-lines { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.08; letter-spacing: -0.015em; }

/* Cards */
.card { display: flex; flex-direction: column; }
.card .eyebrow { margin-top: 18px; }
.card-title { margin-top: 16px; font-size: 21px; line-height: 1.22; font-weight: 380; letter-spacing: -0.006em; text-wrap: balance; }
.card .eyebrow + .card-title { margin-top: 6px; }
.card-meta { margin-top: 10px; font-size: 13px; color: var(--muted); }
.card-title-lg { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.18; font-weight: 360; letter-spacing: -0.012em; }
.card-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.card:hover .card-title, .entry:hover .entry-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--rule-2); }

/* Stories carousel. Starts on the grid and runs off the right edge of the window. */
.carousel { margin: 0 calc(50% - 50vw) 0 0; padding: 0 var(--gutter) 8px 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(270px, 29vw, 400px); gap: var(--col-gap); }
.carousel-track > li { scroll-snap-align: start; }
.carousel:focus-visible { outline-offset: 8px; }
.carousel-nav { display: flex; align-items: center; gap: 10px; }
.carousel-count { margin-right: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.carousel-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--rule-2); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color 200ms var(--ease), background 200ms var(--ease); }
.carousel-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.carousel-btn:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* Latest feed. Writing as type, Making as pictures, labels in the rail. */
.filter { display: flex; gap: 20px; font-size: 13px; }
.filter button { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; transition: color 200ms var(--ease); }
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
/* Latest. The newest piece leads, three follow side by side, then a quick list of what came before.
   Making shows its picture. Writing gets a typographic panel so the two read differently at a glance. */
.section-links { grid-column: 9 / -1; justify-self: end; display: flex; gap: 24px; }
.section-links .arrow-link { font-size: 13px; }
.section-links .arrow-link + .arrow-link { margin-left: 0; }
.piece { display: flex; flex-direction: column; }
.piece-body { display: flex; flex-direction: column; }
.piece-kind { margin-top: 16px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.piece-title { margin-top: 6px; font-size: 21px; line-height: 1.22; font-weight: 380; letter-spacing: -0.008em; text-wrap: balance; }
.piece-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.piece:hover .piece-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--rule-2); }

.text-panel { aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(18px, 2vw, 28px); background: var(--ink); color: var(--paper); }
.text-panel-kicker { font-size: 12px; opacity: 0.7; }
.text-panel-title { font-family: var(--serif); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.1; font-weight: 340; letter-spacing: -0.016em; text-wrap: balance; transition: transform 700ms var(--ease); }
a:hover .text-panel-title { transform: translateY(-3px); }
.is-writing .piece-body .piece-title { display: none; }
.is-writing .piece-kind { margin-top: 16px; }

/* The lead */
.lead .piece { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--col-gap); align-items: end; }
.lead .piece-body { padding-bottom: 6px; }
.lead .piece-kind { margin-top: 0; }
.lead .piece-title, .lead .is-writing .piece-body .piece-title { display: block; margin-top: 10px; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -0.022em; font-weight: 340; }
.lead .piece-desc { margin-top: 14px; font-size: 17px; -webkit-line-clamp: 4; max-width: 30em; }
.lead .text-panel { aspect-ratio: 16 / 10; }
.lead .text-panel-title { font-size: clamp(32px, 3.6vw, 56px); }

/* The trio */
.trio { margin-top: clamp(48px, 5vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }

/* Earlier */
.earlier { margin-top: clamp(56px, 6vw, 88px); }
.earlier .rail { padding-top: 14px; }
.entries-feed > li { border-top: 1px solid var(--rule); }
.entries-feed > li:last-child { border-bottom: 1px solid var(--rule); }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 150px; column-gap: var(--col-gap); align-items: baseline; padding: 13px 0; }
.line-main { min-width: 0; }
.line-title { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.3; font-weight: 380; text-wrap: balance; transition: color 200ms var(--ease); }
.line-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-kind { color: var(--ink-2); }
.line-thumb { display: none; }
.entries-feed:hover .line-title { color: var(--muted); }
.entries-feed .line:hover .line-title, .entries-feed .line:focus-visible .line-title { color: var(--ink); }

/* The picture that appears in the rail beside the list */
.peek { position: fixed; left: 0; top: 0; z-index: 20; width: 300px; pointer-events: none; opacity: 0; transform: translate3d(0, 0, 0) scale(0.96); transition: opacity 180ms var(--ease), scale 180ms var(--ease); border-radius: 3px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(21, 21, 19, 0.35); }
.peek.on { opacity: 1; scale: 1; }
.peek .cover, .peek .cover-img { transform: none !important; }
.peek .cover-lines { font-size: 20px; }

/* Page heads */
.page-head { padding: clamp(64px, 9vw, 140px) 0 0; }
.page-title { font-size: clamp(56px, 9.4vw, 140px); line-height: 0.92; letter-spacing: -0.04em; font-weight: 300; text-wrap: balance; }
.page-title-md { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.05; letter-spacing: -0.028em; font-weight: 330; }
.page-head .grid { margin-top: clamp(28px, 3.4vw, 48px); }
.page-head + .tiles, .page-head + .section { margin-top: clamp(72px, 8vw, 128px); padding-top: 0; }

/* Tiles, for the Making and Stories pages */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(56px, 6vw, 88px) var(--col-gap); }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles-2 .story-cover .cover-lines { font-size: clamp(30px, 3vw, 44px); }

/* Entry lists */
.list-section .rail { padding-top: 18px; }
.list-section + .list-section { padding-top: clamp(64px, 7vw, 112px); }
.rail-note { margin-top: 4px; font-size: 13px; color: var(--muted); }
.entries > li { border-top: 1px solid var(--rule); }
.entries > li:last-child { border-bottom: 1px solid var(--rule); }
.entry { display: flex; flex-direction: column; padding: 20px 0 22px; }
.entry-title { font-size: 23px; line-height: 1.22; font-weight: 380; letter-spacing: -0.01em; text-wrap: balance; }
.entry-desc { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 40em; }
.entry .meta { margin-top: 8px; }
.entry-row { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; }
.entry-row .entry-title { font-size: 20px; }
.entry-row .meta { margin: 0; white-space: nowrap; }
.facts > li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.facts > li:last-child { border-bottom: 1px solid var(--rule); }
.facts .meta { white-space: nowrap; }

/* Articles. The rail holds the meta, the main column holds the reading. */
.article-head { padding: clamp(56px, 8vw, 128px) 0 clamp(36px, 4.4vw, 64px); }
.article-head .rail { padding-top: 0.6em; }
.article-title { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.07; letter-spacing: -0.024em; font-weight: 350; text-wrap: balance; }
.article-head .lede { margin-top: 20px; }
.article-grid { align-items: start; }
.article-meta { position: sticky; top: 28px; font-size: 13px; line-height: 1.7; color: var(--muted); font-variant-numeric: tabular-nums; }
.article-cover { margin-bottom: clamp(36px, 4vw, 56px); }
.article-cover figcaption, .case-cover figcaption { margin-top: 10px; }
.tldr { margin-bottom: 40px; padding: 20px 24px 22px; background: var(--paper-2); border-radius: 2px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.tldr .eyebrow { margin-bottom: 6px; }

.prose { color: var(--text); font-size: clamp(18px, 1.35vw, 20px); line-height: 1.62; font-weight: 380; max-width: 36em; hanging-punctuation: first; text-wrap: pretty; }
.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3 { font-family: var(--sans); font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -0.005em; margin-top: 2.4em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-color 200ms var(--ease); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul { list-style: disc; padding-left: 1.1em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 560; color: var(--ink); }
.prose img { border-radius: 2px; margin: 2em 0; }
/* Book spreads and other pages shown in a post. A hairline keeps white pages off the paper. */
.prose figure { margin: 2.5em 0; }
.prose figure img { display: block; width: 100%; height: auto; margin: 0; box-shadow: 0 0 0 1px var(--rule); }
.prose figcaption { margin-top: 10px; font-family: var(--sans); font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.prose blockquote { font-style: italic; color: var(--ink-2); padding-left: 1em; border-left: 1px solid var(--rule-2); }
.prose code { font-size: 0.86em; background: var(--paper-2); padding: 0.1em 0.3em; border-radius: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose .pull { font-size: 1.2em; line-height: 1.4; color: var(--muted); font-style: italic; margin-top: 1.6em; }
.try { margin-top: 36px; }

.series { margin-top: 72px; border-top: 1px solid var(--ink); padding-top: 14px; max-width: 36em; }
.series-count { margin-left: 10px; color: var(--muted); font-weight: 450; }
.series ol { margin-top: 14px; counter-reset: s; font-size: 15px; }
.series li { counter-increment: s; display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 10px 0; border-top: 1px solid var(--rule); }
.series li::before { content: counter(s, decimal-leading-zero); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.series a { color: var(--ink-2); transition: color 200ms var(--ease); }
.series a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.2em; }
.series .current { font-weight: 600; }
.author { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); max-width: 36em; display: flex; gap: 16px; align-items: flex-start; }
.author-photo { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }

/* Agent skill panel */
.skill { margin-top: 64px; padding: clamp(22px, 2.6vw, 32px); background: var(--paper-2); border-radius: 3px; max-width: 40em; scroll-margin-top: 24px; }
.skill-name { margin-top: 10px; font-family: var(--mark); font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.skill-name-sm { font-family: var(--mark); font-size: 21px; font-weight: 700; letter-spacing: -0.025em; }
.skill-desc { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.skill-tabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--rule-2); }
.skill-tabs button { background: none; border: 0; padding: 8px 10px 10px; margin-bottom: -1px; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; transition: color 200ms var(--ease); }
.skill-tabs button:hover { color: var(--ink); }
.skill-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.skill-panel { margin-top: 16px; }
.skill-panel[hidden] { display: none; }
.skill-how { font-size: 13px; color: var(--muted); }
.code { position: relative; margin-top: 10px; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; background: var(--ink); color: #EDEDE8; border-radius: 3px; }
.code code { flex: 1; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.copy { flex: none; background: transparent; border: 1px solid #4A4A45; color: #EDEDE8; border-radius: 2px; padding: 3px 9px; font-size: 12px; cursor: pointer; transition: background 200ms var(--ease), border-color 200ms var(--ease); }
.copy:hover { border-color: #EDEDE8; }
.copy[data-copied] { background: #EDEDE8; color: var(--ink); }
.skill-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.skill-links .arrow-link + .arrow-link { margin-left: 0; }

/* Story pages, set for long reading */
.case .prose > p:first-of-type::first-letter { float: left; font-size: 3.4em; line-height: 0.82; padding: 0.06em 0.08em 0 0; font-weight: 340; }
.case .prose hr { border: 0; margin: 2.6em 0; text-align: center; }
.case .prose hr::after { content: "⁂"; color: var(--muted); font-size: 1.1em; letter-spacing: 0.2em; }
.case-org { margin-bottom: 18px; font-size: 15px; font-weight: 500; }
.case-title { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.0; letter-spacing: -0.034em; font-weight: 320; max-width: 14em; text-wrap: balance; }
.case .article-head .lede { margin-top: 28px; }
.case-cover { margin: 0 0 clamp(56px, 7vw, 104px); }
.case-cover .media { border-radius: 2px; }
.case-cover .story-cover .cover-lines { font-size: clamp(30px, 4vw, 60px); line-height: 1.04; }
.case-facts { position: sticky; top: 28px; border-top: 1px solid var(--ink); padding-top: 14px; }
.case-facts dl { display: flex; flex-direction: column; gap: 18px; }
.case-facts dt { font-size: 12px; color: var(--muted); letter-spacing: 0.01em; }
.case-facts dd { margin-top: 3px; font-size: 14px; line-height: 1.45; }
.case-facts ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.case-facts li { padding-left: 14px; position: relative; }
.case-facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 1px; background: var(--ink); }
.case .prose { font-size: clamp(18px, 1.4vw, 21px); }
.case .prose h2 { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; font-weight: 360; letter-spacing: -0.016em; margin-top: 1.9em; }
.case .prose h3 { margin-top: 2em; }
.case .prose > :first-child { margin-top: 0; }
.article-byline { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); }

/* About */
.about-head { align-items: end; }
.portrait img, .portrait-empty { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 2px; object-fit: cover; }
.portrait-empty { background: var(--paper-2); display: grid; place-items: center; font-family: var(--serif); font-size: 44px; color: var(--muted); }
.about-head + .grid { margin-top: clamp(40px, 5vw, 72px); }

/* Closing invitation */
.closing { padding-top: var(--section); }
.closing .rail { padding-top: 0.7em; }
.closing-title { font-size: clamp(32px, 4.2vw, 60px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 330; max-width: 15em; text-wrap: balance; }
.closing-note { margin-top: 18px; font-size: clamp(20px, 1.9vw, 27px); line-height: 1.35; font-weight: 340; color: var(--muted); max-width: 30em; }
.closing-note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.closing-note a:hover { text-decoration-color: currentColor; }

.closing-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 0; }
.closing-small { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Read next, at the end of a story */
.read-next-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--col-gap); }
.read-next-list.is-single { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.read-next .section-foot { margin-top: 40px; }

/* Keep reading, a full-width band at the end of a Writing or Making post */
.keep { margin: var(--section) calc(50% - 50vw) 0; padding: clamp(64px, 7vw, 112px) calc(50vw - 50%); background: var(--paper-2); }
.keep .media { background: var(--paper); }
.up-next { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.up-next-media { border-radius: 3px; box-shadow: 0 1px 2px rgba(21, 21, 19, 0.06), 0 12px 32px -12px rgba(21, 21, 19, 0.18); }
.up-next-media .cover-lines { font-size: clamp(26px, 3vw, 44px); }
.up-next-body { display: flex; flex-direction: column; }
.up-next-title { margin-top: 12px; font-size: clamp(26px, 2.5vw, 38px); line-height: 1.1; font-weight: 340; letter-spacing: -0.02em; text-wrap: balance; }
.up-next-desc { margin-top: 14px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.up-next-go { margin-top: 22px; }
.up-next:hover .up-next-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; text-decoration-color: var(--rule-2); }
.up-next:hover .up-next-go::after { transform: translateX(3px); }
.more-h { margin-top: clamp(64px, 7vw, 96px); padding-top: 14px; border-top: 1px solid var(--ink); }
.more-list { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.pager { margin-top: clamp(56px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px var(--col-gap); border-top: 1px solid var(--rule-2); padding-top: 22px; }
.pager a { display: flex; flex-direction: column; gap: 4px; }
.pager-title { font-size: 18px; line-height: 1.3; max-width: 24em; color: var(--ink-2); transition: color 200ms var(--ease); }
.pager a:hover .pager-title { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.18em; }
.keep-foot { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }

/* You might also like, set inside a longer post */
.prose .also { margin: 2.6em 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.prose .also a { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 20px; align-items: center; text-decoration: none; }
.prose .also img { margin: 0; }
.also-thumb { align-self: start; }
.also-thumb .cover { padding: 10px; }
.also-thumb .cover-kicker { display: none; }
.also-thumb .cover-lines { font-size: 14px; line-height: 1.1; }
.also-body { display: flex; flex-direction: column; }
.also-title { margin-top: 4px; font-size: 21px; line-height: 1.22; font-weight: 400; letter-spacing: -0.006em; color: var(--ink); text-wrap: balance; }
.also-desc { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prose .also a:hover .also-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; text-decoration-color: var(--rule-2); }

/* Logo wall. Quiet on purpose, small and soft, no dividers. */
.logos-section { padding-top: clamp(72px, 8vw, 120px); align-items: start; }
.logos-section .rail { padding-top: 6px; max-width: 14em; }
.logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) var(--col-gap); align-items: center; justify-items: start; }
.logos li { display: flex; align-items: center; min-height: 56px; }
.logos img { width: var(--w); max-width: 100%; height: auto; opacity: 0.38; transition: opacity 300ms var(--ease); }
.logos li:hover img { opacity: 0.7; }
.section > .logos-section { padding-top: 0; }
.awards-label, .logos.awards { margin-top: clamp(36px, 4vw, 56px); }
.awards-label { padding-top: 6px; }

/* Work together */
.work-photo { margin-top: clamp(56px, 7vw, 112px); }
.work-photo img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: 70% 30%; border-radius: 3px; }
.work-photo + .section { padding-top: clamp(72px, 8vw, 128px); }
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.offer { border-top: 1px solid var(--ink); padding-top: 18px; }
.offer-title { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; font-weight: 360; letter-spacing: -0.014em; text-wrap: balance; }
.offer-text { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.offer-proof { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.offer-proof a { color: var(--ink); }
.offer-section .rail { padding-top: 18px; }
.steps > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 16px 0; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps strong { color: var(--ink); font-weight: 560; }
.step-n { font-family: var(--serif); font-size: 22px; line-height: 1.1; color: var(--muted); }
.story-cta { margin-top: clamp(72px, 8vw, 112px); }
.story-cta .span-main { padding: clamp(24px, 3vw, 36px); background: var(--paper-2); border-radius: 3px; }
.story-cta-title { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; font-weight: 360; letter-spacing: -0.014em; }
.story-cta-text { margin-top: 10px; font-size: 16px; color: var(--ink-2); max-width: 34em; }
.story-cta .closing-actions { margin-top: 22px; }

/* Footer */
.site-footer { margin-top: clamp(120px, 13vw, 208px); padding: 20px 0 48px; border-top: 1px solid var(--rule); font-size: 14px; row-gap: 24px; }
.footer-name { font-family: var(--mark); font-weight: 700; letter-spacing: -0.02em; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.footer-col:nth-of-type(1) { grid-column: 4 / span 2; }
.footer-col:nth-of-type(2) { grid-column: 6 / span 2; }
.footer-col a { transition: color 200ms var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-legal { grid-column: 9 / -1; justify-self: end; color: var(--muted); }

/* Tablet */
@media (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-main { grid-column: 4 / -1; }
}

/* Phone */
@media (max-width: 820px) {
  .work-photo img { aspect-ratio: 4 / 3; }
  .up-next { grid-template-columns: minmax(0, 1fr); }
  .more-list { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 8px; }
  .more-list li + li { border-top: 1px solid var(--rule-2); }
  .more-list .card { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px; padding: 18px 0; }
  .more-list .card .media { grid-row: 1 / span 3; align-self: start; }
  .more-list .card .eyebrow { margin-top: 0; }
  .more-list .card .card-title { font-size: 18px; margin-top: 2px; }
  .more-list .card .card-desc { display: none; }
  .more-list .cover-lines { font-size: 13px; }
  .more-list .cover { padding: 8px; }
  .more-list .cover-kicker { display: none; }
  .prose .also a { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
  .also-title { font-size: 18px; }
  .grid, .section-head { display: block; }
  .rail { margin-bottom: 14px; }
  .site-header { padding: 20px 0; }
  .brand { font-size: 22px; }
  .site-nav { gap: 22px; width: 100%; }
  .hero-body .eyebrow { display: none; }
  .section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
  .section-note { order: 3; width: 100%; }
  .carousel-count { display: none; }
  .carousel-track { grid-auto-columns: 82%; }
  .section-links { display: none; }
  .lead .piece { grid-template-columns: minmax(0, 1fr); }
  .lead .piece-kind { margin-top: 16px; }
  .trio { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px; margin-right: calc(50% - 50vw); padding-right: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .trio::-webkit-scrollbar { display: none; }
  .trio > .piece { scroll-snap-align: start; }
  .line { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 14px 0; }
  .line.has-thumb { grid-template-columns: minmax(0, 1fr) 84px; }
  .line-thumb { display: block; grid-column: 2; grid-row: 1 / span 2; align-self: start; border-radius: 2px; overflow: hidden; }
  .line-thumb .cover > * { display: none; }
  .line-meta { justify-content: flex-start; gap: 10px; }
  .line-meta time::before { content: "·"; margin-right: 10px; color: var(--rule-2); }
  .entries-feed:hover .line-title { color: var(--ink); }
  .tiles, .tiles-2 { grid-template-columns: minmax(0, 1fr); }
  .offers { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .read-next-list { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .logos { display: flex; flex-wrap: wrap; gap: 18px 26px; }
  .logos li { min-height: 40px; }
  .logos img { width: calc(var(--w) * 0.78); }
  .awards-label { margin-top: 32px; }
  .logos.awards { margin-top: 12px; }
  .site-nav { gap: 14px; font-size: 14px; flex-wrap: nowrap; white-space: nowrap; }
  .section-foot .arrow-link { display: flex; margin: 0 0 12px; }
  .entry-row { flex-direction: column; gap: 4px; }
  .facts > li { flex-direction: column; gap: 2px; }
  .facts .meta { white-space: normal; }
  .article-meta, .case-facts { position: static; margin-bottom: 36px; }
  .case-facts dl { gap: 10px; }
  .case-facts dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .case-facts dd { margin-top: 0; }
  .article-meta { display: flex; flex-wrap: wrap; gap: 0 14px; }
  .article-head .rail { margin-bottom: 18px; padding: 0; }
  .case-cover .cover, .case-cover .cover-img { aspect-ratio: 4 / 3 !important; }
  .portrait { max-width: 200px; margin-bottom: 32px; }
  .closing .rail { margin-bottom: 12px; }
  .site-footer { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-name, .footer-legal { grid-column: 1 / -1; justify-self: start; }
  .footer-col:nth-of-type(1), .footer-col:nth-of-type(2) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  a:hover .cover, a:hover .cover-img { transform: none; }
}
