  :root{
    --paper:#F6EFDC;
    --ink:#2176CC;
    --ink-hover:#0F4F92;
    --rule:rgba(33,118,204,.3);
    --tint:rgba(33,118,204,.08);
    --serif:"Petrona",Georgia,"Times New Roman",serif;
    --grot:"Inter",Helvetica,Arial,sans-serif;
    --gscale:.9;
    --ls:-.035em;
    --ls-text:-.01em;
    --lh:1.06;
    --sw:300;
    --gw:500;
    --gut:clamp(1rem,4.2vw,3.1rem);
    --hang:10.5rem;
    /* vertical rhythm, named to match the design system */
    --section-y:clamp(2.2rem,6.5vw,5rem);
    --block-y:clamp(2.4rem,5vw,4rem);
    --col-gap:1.7rem;
    /* the page stops growing here. Above this the layout is centred, so a
       statement never runs past a readable measure on a wide display. */
    --max-w:96rem;
    color-scheme:light;
  }
  /* dark: a true reversal. The same two colors, swapped - the brand blue
     becomes the ground and the paper becomes the type. Every alpha matches
     its light-mode counterpart. */
  :root[data-theme="dark"]{
    --paper:#2176CC;
    --ink:#F6EFDC;
    --ink-hover:#FFFFFF;
    --rule:rgba(246,239,220,.3);
    --tint:rgba(246,239,220,.08);
    color-scheme:dark;
  }
  /* brief cross-fade only while switching, so it doesn't slow other hovers */
  html.theming,html.theming *,html.theming *::after{
    transition:background-color .35s ease,color .35s ease,border-color .35s ease,
      box-shadow .35s ease,text-decoration-color .35s ease!important}
  *{box-sizing:border-box}
  html{-webkit-text-size-adjust:100%;background:var(--paper)}
  body{margin:0;background:var(--paper);color:var(--ink);
    font-family:var(--grot);line-height:1.5;-webkit-font-smoothing:antialiased;
    padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
  .wrap{padding:0 var(--gut);max-width:var(--max-w);margin-inline:auto}
  a{color:var(--ink)}

  /* ---------- chrome: name (links home) left, theme toggle center, get in touch right ---------- */
  .chrome{
    display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;
    padding-top:1.05rem;padding-bottom:1.05rem;
  }
  .chrome .name:last-child{justify-self:end}
  .chrome .name{font-size:.75rem;font-weight:500;letter-spacing:.075em;text-transform:uppercase;
    text-decoration:none}
  .chrome .name:hover{color:var(--ink-hover)}
  .mode{appearance:none;border:0;background:none;padding:.35rem;margin:-.35rem;cursor:pointer;
    color:var(--ink);line-height:0;border-radius:50%}
  .mode svg{display:block;width:1rem;height:1rem;transition:transform .45s cubic-bezier(.3,.7,.2,1)}
  .mode:hover{color:var(--ink-hover)}
  :root[data-theme="dark"] .mode svg{transform:rotate(180deg)}
  button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

  /* ---------- section labels, hanging in the margin (no underline) ---------- */
  .marginal{display:block;margin:0;font-family:var(--grot);font-size:.8125rem;font-weight:500;line-height:1.5}

  /* ---------- opening statement ---------- */
  .statement{position:relative;
    padding-top:clamp(2.2rem,6.5vw,5rem);padding-bottom:clamp(2.4rem,7vw,5.5rem)}
  .statement .marginal{margin-bottom:1.2rem}
  @media(min-width:60rem){
    .statement .marginal{position:absolute;top:calc(clamp(2.2rem,6.5vw,5rem) + .5em);left:0;margin:0}
  }
  .lede{font-family:var(--serif);font-weight:var(--sw);
    font-size:clamp(2.05rem,5.45vw,5.1rem);
    line-height:var(--lh);letter-spacing:var(--ls);margin:0;text-wrap:pretty}
  @media(min-width:60rem){ .lede{text-indent:var(--hang)} }
  .g{font-family:var(--grot);font-weight:var(--gw);font-size:calc(var(--gscale) * 1em);letter-spacing:-.016em;
    font-variation-settings:'opsz' 32}
  .conj{font-family:var(--serif);font-style:normal;font-weight:var(--sw);
    font-size:calc(1em / var(--gscale));letter-spacing:var(--ls)}

  /* ---------- work index ---------- */
  .index{padding-bottom:clamp(2.4rem,5vw,4rem)}
  .index ol{list-style:none;margin:1.3rem 0 0;padding:0}
  .index li{border-top:1px solid var(--rule)}
  .index li:last-child{border-bottom:1px solid var(--rule)}
  .row{
    display:grid;grid-template-columns:6.75rem 1fr;gap:1.1rem;align-items:start;
    padding:.9rem 0;color:var(--ink);text-decoration:none;
  }
  .row .txt{display:block;min-width:0}
  /* stacked layout: drop the thumb to the cap height of the project name so the edges meet optically */
  @media(max-width:59.99rem){ .row .thumb{margin-top:.26rem} }
  @media(min-width:60rem){
    .index ol{margin-left:var(--hang)}
    .row{grid-template-columns:var(--hang) 14rem 1fr;gap:1.7rem;align-items:center}
    .row .txt{display:contents}
  }
  .thumb{
    display:block;position:relative;width:100%;aspect-ratio:3/2;background-size:cover;background-position:center;
  }
  /* duotone layer: a gradient map from the blue (shadows) to the paper (highlights), see #duo.
     One filter serves both themes - dark reverses the same two colors, so the mapping is unchanged. */
  .thumb::after,.cover::after{content:"";position:absolute;inset:0;background:inherit;
    filter:url(#duo);transition:opacity .32s ease}
  .row .src{display:block;line-height:1.24}
  .row .proj{display:block;font-weight:600;font-size:clamp(1.02rem,1.42vw,1.24rem);letter-spacing:-.014em}
  .row .cat{display:block;margin-top:.14em;font-weight:400;font-size:clamp(.78rem,.96vw,.875rem);letter-spacing:.002em}
  .row .ttl{display:block;font-family:var(--serif);letter-spacing:var(--ls-text);
    font-size:clamp(1.05rem,1.85vw,1.48rem);line-height:1.2;margin-top:.3em}
  @media(min-width:60rem){ .row .ttl{margin-top:0} }
  /* brand palette chips: outlined in the site blue, filled with the client's colors on hover */
  .swatches{display:flex;gap:.3rem;margin-top:.5rem}
  .swatches i{display:block;width:.8rem;height:.8rem;border-radius:50%;
    box-shadow:inset 0 0 0 1px var(--rule);background:transparent;
    transition:background-color .32s ease,box-shadow .32s ease}
  @media(hover:hover){
    .row:hover .thumb::after{opacity:0}
    a.row:hover .ttl{font-style:italic}
    .row:hover .swatches i{background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
  }
  @media(hover:none){
    .thumb::after,.cover::after{opacity:0}
    .swatches i{background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
  }
  .row:focus-visible .thumb::after{opacity:0}
  .row:focus-visible .swatches i{background:var(--c)}

  .t1{background-image:url(images/home-coca-cola.jpg)}
  .t2{background-image:url(images/home-sound-coffee.jpg)}
  .t3{background-image:url(images/home-goo-goo.jpg)}
  .t4{background-image:url(images/home-mighty-ally.jpg)}
  .t5{background-image:url(images/micah-child.jpg)}

  /* ---------- currently: reading, listening, watching ---------- */
  .now{padding-bottom:clamp(2.4rem,5vw,4rem)}
  .now-head{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
  .now-date{font-size:.8125rem;font-weight:500;line-height:1.5}
  .now ul{list-style:none;margin:1.3rem 0 0;padding:0;
    display:grid;grid-template-columns:1fr;border-top:1px solid var(--rule)}
  .now li{display:grid;grid-template-columns:4.5rem 1fr;gap:1.1rem;align-items:start;
    padding:1.1rem 0;border-bottom:1px solid var(--rule)}
  @media(min-width:48rem){
    .now ul{grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--rule)}
    .now li{grid-template-columns:1fr;gap:1rem;padding:1.3rem 1.4rem 1.6rem;border-bottom:0;
      border-left:1px solid var(--rule)}
    .now li:first-child{border-left:0;padding-left:0}
    .now li:last-child{padding-right:0}
  }
  @media(min-width:60rem){
    .now ul{margin-left:var(--hang)}
  }
  .cover{display:block;position:relative;width:100%;background:var(--tint) center/cover no-repeat}
  .cover.book,.cover.film{aspect-ratio:2/3}
  .cover.album{aspect-ratio:1/1}
  @media(min-width:48rem){ .cover{width:auto;height:clamp(9rem,13vw,12rem);max-width:100%} }
  @media(hover:hover){ .now li:hover .cover::after{opacity:0} }
  .cover:focus-visible::after{opacity:0}
  .now .kind{display:block;font-size:.8125rem;font-weight:500;margin-bottom:.35rem}
  .now .work{display:block;color:inherit;text-decoration:none;font-family:var(--serif);font-style:italic;letter-spacing:var(--ls-text);
    font-size:clamp(1.15rem,1.85vw,1.48rem);line-height:1.18}
  .now a.cover,.now .work{transition:color .22s ease}
  .now .work:hover{color:var(--ink-hover)}
  .now .by{display:block;margin-top:.3rem;font-weight:600;font-size:clamp(.9rem,1.1vw,1rem);letter-spacing:-.01em}
  .now .note{display:block;margin-top:.55rem;font-family:var(--serif);font-size:1rem;line-height:1.4;max-width:32ch}

  /* ---------- how I lead ---------- */
  .lead{padding-bottom:clamp(2.4rem,5vw,4rem)}
  .lead ol{list-style:none;margin:1.3rem 0 0;padding:0;display:grid;grid-template-columns:1fr;
    border-top:1px solid var(--rule)}
  .lead li{padding:1.3rem 0 1.6rem;border-bottom:1px solid var(--rule)}
  @media(min-width:48rem){
    .lead ol{grid-template-columns:1fr 1fr;column-gap:clamp(1.4rem,3vw,2.8rem)}
  }
  @media(min-width:60rem){ .lead ol{margin-left:var(--hang)} }
  .lead .num{display:block;font-size:.75rem;font-weight:500;letter-spacing:.075em;margin-bottom:.7rem;
    font-variant-numeric:tabular-nums}
  .lead h3{margin:0;font-family:var(--serif);font-weight:var(--sw);letter-spacing:var(--ls);
    font-size:clamp(1.7rem,3.1vw,2.7rem);line-height:1.08;text-wrap:balance}
  .lead p{margin:.8rem 0 0;font-family:var(--serif);font-size:clamp(1rem,1.3vw,1.15rem);line-height:1.45;
    max-width:40ch;text-wrap:pretty}

  /* ---------- closing line ---------- */
  .close{padding-top:clamp(1.5rem,4vw,3rem);padding-bottom:clamp(3rem,8vw,6.5rem)}
  .closer{margin:0;font-family:var(--serif);font-weight:var(--sw);letter-spacing:var(--ls);line-height:var(--lh);
    font-size:clamp(2.05rem,5.45vw,5.1rem);text-wrap:balance}
  @media(min-width:60rem){ .closer{text-indent:var(--hang)} }
  .closer a.g{white-space:nowrap}
  .closer .arrow{display:inline-block;text-indent:0;transition:transform .22s ease}
  .closer a.g:hover .arrow{transform:translateX(.12em)}

  /* hero phrases that link: no underline, the hover color and preview do the work */
  .lede a.g{color:inherit;text-decoration:none}

  /* closing phrase link */
  .closer a.g{color:inherit;text-decoration:underline;text-decoration-thickness:.045em;text-underline-offset:.12em;
    text-decoration-color:var(--rule);transition:color .22s ease,text-decoration-color .22s ease}
  .closer a.g:hover{color:var(--ink-hover);text-decoration-color:currentColor}

  .foot{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;
    padding-top:1.1rem;padding-bottom:1.6rem;
    font-size:.6875rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase}
  @media(min-width:48rem){.foot{grid-template-columns:repeat(4,1fr)}}
  .foot a{color:inherit;text-decoration:none}
  .foot a:hover{text-decoration:underline}

  /* ---------- hero hover previews ---------- */
  .g[data-peek]{transition:color .22s ease}
  @media(hover:hover) and (pointer:fine){ .g[data-peek]:hover{color:var(--ink-hover)} }
  .peek{
    position:fixed;left:0;top:0;z-index:40;pointer-events:none;
    width:clamp(10rem,15vw,14.5rem);aspect-ratio:3/2;
    background-size:cover;background-position:center;
    opacity:0;transform:translate3d(-9999px,0,0);
    transition:opacity .18s ease;will-change:transform,opacity;
  }
  /* the portrait is upright, so it gets its own proportions */
  .peek.t5{aspect-ratio:5/7;width:clamp(8rem,11vw,10.5rem)}
  .peek.on{opacity:1}
  a:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
  @media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* ============ case pages ============ */
.case-head{position:relative;
  padding-top:clamp(2.2rem,6.5vw,5rem);padding-bottom:clamp(1.6rem,4vw,3rem)}
.case-head .marginal{margin-bottom:1.2rem}
@media(min-width:60rem){
  .case-head .marginal{position:absolute;top:calc(clamp(2.2rem,6.5vw,5rem) + .5em);left:0;margin:0}
  /* a hanging label wraps inside its column; it must never reach the text beside it */
  .statement .marginal,.chapter .marginal,.case-head .marginal{max-width:calc(var(--hang) - 1.8rem)}
}
h1.lede{margin:0}

/* the facts: same hanging column as everything else. Each pair is wrapped so the
   label always sits above its value, whatever the column count. */
.facts{display:grid;grid-template-columns:1fr;gap:.9rem 2.4rem;margin:clamp(1.6rem,3vw,2.4rem) 0 0;padding:0}
@media(min-width:34rem){ .facts{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(min-width:60rem){ .facts{grid-template-columns:repeat(4,minmax(0,1fr));margin-left:var(--hang)} }
.facts > div{min-width:0}
.facts.pair{grid-template-columns:1fr}
@media(min-width:48rem){ .facts.pair{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* statements worth setting apart: a tinted card each, in place */
.cards{display:grid;grid-template-columns:1fr;gap:1rem;margin:0;padding:0}
@media(min-width:48rem){ .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.4rem} }
.cards > div{padding:clamp(1.1rem,2vw,1.6rem);background:var(--tint);
  outline:1px solid var(--rule);outline-offset:-1px}
.cards dt{font-size:.8125rem;font-weight:500;line-height:1.5;margin-bottom:.5rem}
.cards dd{margin:0;font-family:var(--serif);font-size:clamp(1.15rem,1.7vw,1.4rem);
  line-height:1.32;letter-spacing:var(--ls-text);text-wrap:pretty}
.facts dt{font-size:.8125rem;font-weight:500;line-height:1.5}
.facts dd{margin:.1rem 0 0;font-family:var(--serif);font-size:clamp(1.05rem,1.5vw,1.25rem);
  line-height:1.25;letter-spacing:var(--ls-text)}

/* figures: the work itself, always full colour */
.shot{margin:0 0 clamp(2rem,4vw,3.2rem)}
.shot img{display:block;width:100%;height:auto}
.shot figcaption{margin-top:.6rem;font-size:.8125rem;font-weight:500}
.ph{display:flex;align-items:center;justify-content:center;background:var(--tint);
  outline:1px solid var(--rule);outline-offset:-1px;aspect-ratio:3/2;
  font-size:.8125rem;font-weight:500;text-align:center;padding:1rem}
.shot.lead-shot{margin-bottom:clamp(2.4rem,6vw,4.5rem)}
.shot.lead-shot .ph{aspect-ratio:2/1}
@media(min-width:60rem){
  .case-body .shot{margin-left:var(--hang)}
  /* the opening figure is the exception: it runs the full measure of the page */
  .case-body .shot.lead-shot{margin-left:0}
}

/* chapters of running text */
.chapter{position:relative;padding-bottom:clamp(2.4rem,5vw,4rem)}
.chapter .marginal{margin-bottom:1.2rem}
@media(min-width:60rem){
  /* the label aligns to the heading's CAP height, not its line box: .194em is
     Petrona's cap-top at line-height 1.08, .315rem is Inter's at 13px/1.5 */
  .chapter .marginal{position:absolute;left:0;margin:0;
    top:calc(clamp(1.7rem,3.1vw,2.7rem) * .194 - .315rem)}
  .chapter .copy{margin-left:var(--hang)}
}
.chapter h3{margin:0 0 1rem;font-family:var(--serif);font-weight:var(--sw);letter-spacing:var(--ls);
  font-size:clamp(1.7rem,3.1vw,2.7rem);line-height:1.08;text-wrap:balance;max-width:24ch}
.chapter p{margin:0 0 1rem;font-family:var(--serif);font-size:clamp(1.05rem,1.35vw,1.2rem);
  line-height:1.45;max-width:58ch;text-wrap:pretty}
.chapter p:last-child{margin-bottom:0}
.chapter .stand{font-family:var(--serif);font-size:clamp(1.25rem,2vw,1.6rem);line-height:1.3;
  max-width:44ch;margin:0 0 1.4rem}

/* a numbered chapter: the number hangs in the margin like any other label */
.marginal.num{font-variant-numeric:tabular-nums;letter-spacing:.075em}

/* foot of the case: back and next */
.case-nav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem;
  padding:clamp(1.8rem,4vw,3rem) 0 clamp(2.4rem,6vw,4.5rem)}
.case-nav a{font-family:var(--serif);font-size:clamp(1.3rem,2vw,1.7rem);letter-spacing:var(--ls-text);
  text-decoration:none;transition:color .22s ease}
.case-nav a:hover{color:var(--ink-hover)}
.case-nav .arrow{display:inline-block;transition:transform .22s ease}
.case-nav a:hover .arrow{transform:translateX(.12em)}


/* ============ case pages: media groups ============ */
/* a run of figures inside a chapter or a labelled group */
.media{margin:0}
.media + .media{margin-top:var(--col-gap)}
.media img{display:block;width:100%;height:auto}
.media figure{margin:0}
.media figcaption{margin-top:.6rem;font-size:.8125rem;font-weight:500}
/* an upright piece - a poster, a can - shouldn't tower over the prose.
   Works on either figure wrapper: .media for body figures, .shot for a hero. */
.media.portrait img,.shot.portrait img{max-width:28rem}
/* the first figure after a chapter's copy needs air above it */
.media.after-copy{margin-top:var(--block-y)}
/* a chapter that turns to a second subject restarts with section spacing */
.chapter h3.restart{margin-top:var(--section-y)}

.pair,.trio,.quad{display:grid;grid-template-columns:1fr;gap:var(--col-gap)}
@media(min-width:48rem){
  .pair{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trio{grid-template-columns:repeat(3,minmax(0,1fr))}
  .quad{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:60rem){
  .quad{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* a labelled group of images: label in the margin, images in the content column */
.figs{padding-top:var(--block-y)}
.figs.last{padding-bottom:var(--block-y)}
.figs > .marginal{margin:0 0 1rem}
@media(min-width:60rem){
  .figs{display:grid;grid-template-columns:var(--hang) minmax(0,1fr);align-items:start}
  .figs > .marginal{margin:-.315rem 0 0;max-width:calc(var(--hang) - 1.8rem)}
}

/* the summary: label, copy, and an optional image beside it */
.split{display:grid;grid-template-columns:1fr;gap:1.2rem;
  padding:var(--section-y) 0 var(--block-y)}
.split > .marginal{margin:0}
.split .copy p{margin:0 0 .9rem}
.split .copy p:last-child{margin-bottom:0}
@media(min-width:60rem){
  .split{grid-template-columns:var(--hang) minmax(0,1fr) minmax(0,1fr);
    column-gap:0;align-items:start}
  .split > .marginal{grid-column:1;padding-top:.5em;max-width:calc(var(--hang) - 1.8rem)}
  .split .copy{grid-column:2;padding-right:clamp(1.4rem,3vw,2.8rem);margin-left:0}
  .split .media{grid-column:3}
}
