/* Clean redesign (branch www-clean): one typeface, Askew thin, on a 12-column grid with 32px edges. */
@font-face{
  font-family: "Askew";
  src: url("/fonts/askew-regular.woff2?v=f9179609") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root{
  --bg: #f6f6f4;
  --text: #111;
  --link-color: #3604FE;  /* script.js picks one of four at random per visit */
  --edge: 32px;
  --gap: 16px;
}

/* Inter and Newsreader, self-hosted: Latin subset, only the weights the site uses (Inter 400–500, Newsreader 400) */
@font-face{ font-family: "Inter"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face{ font-family: "Newsreader"; src: url("/fonts/newsreader-var.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

*{ box-sizing: border-box; letter-spacing: 0; }  /* every font at its own spacing, everywhere */

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;  /* test; was "Inter Tight", before that "Askew" */
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--link-color); }

.grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));  /* equal columns, content never widens one */
  column-gap: var(--gap);
  padding: 0 var(--edge);
}

/* Header, intro, caption row, 16:9 slideshow, then Experience and Contact */
main.grid{ padding-bottom: var(--edge); }

/* Info and footer: same light page as above */
.info{ padding-bottom: var(--edge); }  /* main's bottom padding is the only gap above */

/* Header: name at the left edge, nav from the middle (column 7), Labs at the right edge */
.site-header{ position: sticky; top: 0; z-index: 10; padding-top: var(--edge); padding-bottom: 16px; background: var(--bg); align-items: baseline; font-size: 14px; }
.site-header .name{ grid-column: 1 / 7; font-family: "Newsreader", Georgia, serif; font-size: 16px; }  /* same as the serif labels */
.site-header nav{ grid-column: 7 / 12; display: flex; gap: 16px; }
.site-header .labs{ grid-column: 12 / 13; justify-self: end; }
.nav-labs, .menu-toggle{ display: none; }  /* phone only */

/* Phone menu button: a thin plus that turns into a cross */
.menu-toggle{
  position: relative; z-index: 11;
  width: 24px; height: 24px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
}
.menu-toggle::before, .menu-toggle::after{
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1px; background: currentColor;
  transition: transform .3s ease;
}
.menu-toggle::after{ transform: rotate(90deg); }
.menu-open .menu-toggle::before{ transform: rotate(45deg); }
.menu-open .menu-toggle::after{ transform: rotate(135deg); }

/* Intro: from the middle column, a few lines */
.intro{
  grid-column: 7 / -1;
  margin: clamp(64px, 9vw, 128px) 0 clamp(64px, 9vw, 128px);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}

/* Caption row above the image, on the same columns as the header */
.caption{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding-bottom: 12px;
  font-size: 14px;
}
.caption > *{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caption{ align-items: baseline; }
.caption > :nth-child(1){ grid-column: 1 / 7; font-family: "Newsreader", Georgia, serif; font-size: 16px; }  /* test: same as the field headings */
.caption > :nth-child(2){ grid-column: 7 / 10; }
.caption .arrow{ grid-column: 10 / 13; justify-self: end; }

/* Big slideshow, edge to edge within the margins (script.js fills .tile-show) */
.stage{ grid-column: 1 / -1; }

.tile-show{
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,.04);
}
.tile-show .tile-layer{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: transform;
}
.tile-show .tile-layer.is-active{
  opacity: 1;
  animation: projector-in 2.4s linear both;
}
@keyframes projector-in{
  0%{ transform: translate3d(0, 4%, 0) scale(1); animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  10%{ transform: translate3d(0, -.5%, 0) scale(1.004); animation-timing-function: ease-out; }
  17%{ transform: translate3d(0, 0, 0) scale(1.007); animation-timing-function: linear; }
  100%{ transform: translate3d(0, 0, 0) scale(1.05); }
}
.tile-show::after{
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.tile-show.is-flashing::after{ animation: projector-flash .45s ease-out both; }
@keyframes projector-flash{
  0%{ opacity: .85; }
  35%{ opacity: .25; }
  100%{ opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .footer-track{ animation: none !important; }
  .tile-show .tile-layer.is-active,
  .tile-show.is-flashing::after{ animation: none; }
}

/* Info: text and images alternate in four 3-column slots: text, image, text, image; contact as footer */
.info{ font-size: 13px; line-height: 1.35; row-gap: 48px; }  /* rows follow their content, so long text breaks the even grid */
.field h2{ margin: 0 0 12px; font-family: "Newsreader", Georgia, serif; font-size: 16px; font-weight: 400; line-height: 1.2; }  /* test: same serif as the intro */
.field p{ margin: 0; }
.field p + p{ margin-top: 1em; }
.exp-head{ display: block; margin-bottom: .35em; }
.exp-head strong{ font-weight: 500; }  /* a touch heavier, not full bold */
.field:nth-of-type(1){ grid-column: 1 / 4; grid-row: 1; }
.field:nth-of-type(2){ grid-column: 7 / 10; grid-row: 1; }
.field:nth-of-type(3){ grid-column: 1 / 4; grid-row: 2; }
.field:nth-of-type(4){ grid-column: 7 / 10; grid-row: 2; }
.ph{ grid-row: 1 / 3; align-self: start; aspect-ratio: 3 / 4; background: rgba(0,0,0,.06); }
.ph{ position: relative; overflow: hidden; }
.ph picture{ display: contents; }
.ph img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }  /* fills whatever shape the slot has */
.ph-1{ grid-column: 4 / 7; align-self: stretch; aspect-ratio: auto; }  /* grows so its bottom meets the longest text and the right image */
.ph-1::before{ content: ""; display: block; padding-top: 133.333%; }  /* minimum 3:4 without widening past its 3 columns */
.ph-2{ grid-column: 10 / 13; grid-row: 1 / 3; height: 33.333%; aspect-ratio: auto; align-self: end; }  /* aspect auto: else the 3:4 from .ph shrinks its width */  /* a third of the left image's height (same grid area), on the bottom line */
.ph-3{ grid-column: 11 / 13; grid-row: 1; aspect-ratio: 4 / 5; }  /* small, top right, flush to the margin: a counterweight to the wide one below */
.site-footer{ grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin-top: clamp(48px, 6vw, 96px); }
.footer-track{ display: contents; }  /* desktop: its children sit on the footer's subgrid */
.footer-track > :nth-child(1){ grid-column: 1 / 7; }
.footer-track > :nth-child(2){ grid-column: 7 / 10; }
.footer-track > :nth-child(3){ grid-column: 10 / 12; }
.footer-track > :nth-child(4){ grid-column: 12 / 13; justify-self: end; white-space: nowrap; }
.footer-track[aria-hidden]{ display: none; }  /* marquee copy, phones only */

/* Phone: edges and gaps shrink, nav drops under the name, text full width */
@media (max-width: 720px){
  :root{ --edge: 16px; --gap: 12px; }
  .site-header{ align-items: center; }
  .site-header .name{ grid-column: 1 / 11; position: relative; z-index: 11; }
  .site-header .labs{ display: none; }
  .menu-toggle{ display: block; grid-column: 12 / 13; justify-self: end; }
  .nav-labs{ display: block; }
  /* Menu: full-screen sheet, big serif links set from the bottom */
  .site-header nav{
    position: fixed; inset: 0; z-index: 10;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 0;
    padding: var(--edge);
    background: var(--bg);
    font-family: "Newsreader", Georgia, serif; font-size: 48px; line-height: 1.1;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .menu-open .site-header nav{ opacity: 1; visibility: visible; }
  .menu-open{ overflow: hidden; }
  .intro{ grid-column: 1 / -1; }
  .caption > :nth-child(1){ grid-column: 1 / 7; }
  .caption .arrow{ grid-column: 7 / 13; }
  .caption > :nth-child(2){ display: none; }
  .info{ row-gap: 40px; grid-template-rows: none; }
  .ph-2{ height: auto; aspect-ratio: 3 / 2; }
  .field:nth-of-type(n){ grid-column: 1 / -1; grid-row: auto; }
  .ph{ grid-row: auto; margin-top: 0; }
  /* Pictures spread between the fields: Experience, tall left, Capabilities, small right,
     Worked with, wide, Selected awards (start page order; change if fields are added) */
  .info:has(.ph) .field:nth-of-type(1){ grid-row: 1; }
  .info:has(.ph) .field:nth-of-type(2){ grid-row: 3; }
  .info:has(.ph) .field:nth-of-type(3){ grid-row: 5; }
  .info:has(.ph) .field:nth-of-type(4){ grid-row: 7; }
  .ph-1{ grid-column: 1 / 7; grid-row: 2; }
  .ph-3{ grid-column: 9 / 13; grid-row: 4; align-self: start; }
  .ph-2{ grid-column: 1 / -1; grid-row: 6; }
  /* Footer as a marquee: one line in the serif, edge to edge, two copies looping */
  .site-footer{
    display: flex; overflow: hidden;
    margin-left: calc(-1 * var(--edge)); margin-right: calc(-1 * var(--edge));
    font-family: "Newsreader", Georgia, serif; font-size: 28px; line-height: 1.2;
    padding-bottom: 32px;  /* with the 16px page edge: 48px under the line */
  }
  .footer-track, .footer-track[aria-hidden]{
    display: flex; flex-shrink: 0; gap: 1.2em; padding-right: 1.2em; white-space: nowrap;
    animation: marquee 24s linear infinite;
  }
  .site-footer:active .footer-track{ animation-play-state: paused; }  /* hold still while tapping a link */
  @keyframes marquee{ to{ transform: translateX(-100%); } }
}

/* Section labels in capitals */
.field h2, .caption > :nth-child(1){ text-transform: uppercase; }
.site-header .name::before{ content: "⌬"; display: inline-block; font-size: 18px; line-height: 1; vertical-align: .8px; margin-right: 7px; }  /* a pixel taller than the text glyph; raised so its middle sits mid cap height */

/* Full-width statement between the slideshow and the info fields */
.statement{ padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(64px, 9vw, 128px); }
.statement p{
  grid-column: 1 / -1;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(32px, 5vw, 80px);
  line-height: 1.05;
}

/* Current page in the nav (not in the phone menu) */
@media (min-width: 721px){ .site-header nav a[aria-current="page"]{ text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; } }

/* About: portrait as the big image, two text columns, then four info fields side by side */
.portrait{ margin: 0; }
.portrait img{ display: block; width: 100%; height: auto; background: rgba(0,0,0,.04); }
/* Portrait on the left half; the second half of the text beside it, on its bottom line */
.stage.portrait{ grid-column: 1 / 7; }
.about-text{ grid-column: 7 / -1; align-self: end; margin: 0 0 -.322em; font-family: "Newsreader", Georgia, serif; font-size: clamp(24px, 2.5vw, 38px); font-weight: 400; line-height: 1.1; }
main:has(.portrait){ padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(64px, 9vw, 128px); }
@media (max-width: 720px){
  .stage.portrait, .about-text{ grid-column: 1 / -1; }
  .about-text{ margin: 48px 0 0; }
}
@media (min-width: 721px){
  .about-info .field:nth-of-type(1){ grid-column: 1 / 4; grid-row: 1; }
  .about-info .field:nth-of-type(2){ grid-column: 4 / 7; grid-row: 1; }
  .about-info .field:nth-of-type(3){ grid-column: 7 / 10; grid-row: 1; }
  .about-info .field:nth-of-type(4){ grid-column: 10 / 13; grid-row: 1; }
}

/* script.js text mode (press T) belongs to the old design: hide its image labels */
.text-mode-alt{ display: none; }

/* Contact: a tall slideshow on the left half, the details on the right, on its bottom line */
.contact{ padding-top: clamp(64px, 9vw, 128px); align-items: end; }
.contact-stage{ grid-column: 1 / 7; }
.contact-stage .tile-show{ aspect-ratio: 1 / 1; }  /* square: the details stay above the fold at 1440×900 */
.contact-info{ grid-column: 7 / -1; }
.contact-info h1{ margin: 0 0 clamp(32px, 4vw, 64px); font-family: "Newsreader", Georgia, serif; font-size: clamp(32px, 5vw, 80px); font-weight: 400; line-height: 1.05; }
.contact-info dl{ margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gap); }
.contact-info dl > div{ display: contents; }
.contact-info dt{ grid-column: 1 / 3; padding: 10px 0; border-top: 1px solid rgba(0,0,0,.15); font-size: 13px; text-transform: uppercase; }
.contact-info dd{ grid-column: 3 / -1; margin: 0; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.15); font-size: 18px; }
@media (max-width: 720px){
  .contact-stage, .contact-info{ grid-column: 1 / -1; }
  .contact-info{ order: -1; margin-bottom: 40px; }
}

/* Work: start-page intro, then a presentation grid: four equal tiles left,
   one big tile right spanning both rows; one-line captions, all on shared lines */
.work-grid{ --gap: 32px; row-gap: 32px; padding-bottom: var(--edge); }
.work-grid .intro{ margin-bottom: clamp(32px, 6vw, 96px); }  /* same intro as the start page; the row gap adds the rest */
.tile{ display: flex; flex-direction: column; }
.tile picture{ display: block; }
.tile img{ display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: rgba(0,0,0,.06); }
.tile-cap{ display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 13px; line-height: 1.35; white-space: nowrap; }  /* name left, years right: the role is on the case page */
a.tile:hover{ color: inherit; }
a.tile:hover .tile-cap > :first-child{ text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }  /* the name, like the current page in the nav; a coming-soon tile is no link */
.tile-s1{ grid-column: 1 / 4; grid-row: 2; }
.tile-s2{ grid-column: 4 / 7; grid-row: 2; }
.tile-s3{ grid-column: 1 / 4; grid-row: 3; }
.tile-s4{ grid-column: 4 / 7; grid-row: 3; }
.tile-big{ grid-column: 7 / 13; grid-row: 2 / 4; }
.tile-big picture{ flex: 1; }
.tile-big img{ height: 100%; aspect-ratio: auto; }  /* fills both rows, so its bottom meets the lower small tiles */
@media (max-width: 720px){
  .work-grid{ --gap: 12px; row-gap: 24px; }
  .tile[class*="tile-"]{ grid-row: auto; }
  .tile-big{ grid-column: 1 / -1; }
  .tile-big img{ aspect-ratio: 16 / 10; }
  .tile-s1, .tile-s3{ grid-column: 1 / 7; }
  .tile-s2, .tile-s4{ grid-column: 7 / -1; }
}

/* Type: a calm list. Each name in its own font at one size and its resting weight,
   then the facts on the same row, on hairlines */
.type-list{ --line: rgba(0,0,0,.15); }
.type-list .face-nav{ grid-column: 1 / -1; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.type-list .face-link{ display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: baseline; padding: 20px 0 24px; border-top: 1px solid var(--line); color: var(--text); }
.type-list .face-link:last-child{ border-bottom: 0; }
.type-list .face-name{ grid-column: 1 / 7; width: auto; font-size: clamp(36px, 4.5vw, 64px); line-height: 1; }
.type-list .face-meta{ display: contents; }
.type-list .face-meta > :nth-child(1){ grid-column: 7 / 9; font-family: "Inter", system-ui, sans-serif; font-size: 14px; }
.type-list .face-meta > :nth-child(2){ grid-column: 9 / 12; font-family: "Inter", system-ui, sans-serif; font-size: 14px; }
.type-list .face-cta{ grid-column: 12 / 13; justify-self: end; margin: 0; font-family: "Inter", system-ui, sans-serif; font-size: 14px; }
.type-list .face-link:hover .face-name{ color: var(--link-color); }
@media (max-width: 720px){
  .type-list .face-name{ grid-column: 1 / -1; margin-bottom: 12px; }
  .type-list .face-meta > :nth-child(1){ grid-column: 1 / 8; }
  .type-list .face-meta > :nth-child(2){ display: none; }
  .type-list .face-cta{ grid-column: 8 / 13; }
}

/* Almost Swiss for the Type list (the old styles.css loaded it; downloaded only where used) */
@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-thin.woff2?v=d6e352f9") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-extralight.woff2?v=31f129dc") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-extrabold.woff2?v=4301a2f9") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-black.woff2?v=bb0951ce") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-light.woff2?v=c9c95108") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-regular.woff2?v=ccb7e9c7") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-medium.woff2?v=d4176e8d") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-semibold.woff2?v=9816146e") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: "Almost Swiss";
  src: url("fonts/almost-swiss-bold.woff2?v=77eeed45") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Typeface pages (type-<slug>.html): the old specimen widgets from type.css, on the light page */
.type-face{ --muted: var(--text); --line: rgba(0,0,0,.15); --card: rgba(0,0,0,.04); padding: 0 var(--edge); }
.type-face .face-link{ padding: clamp(24px, 3vw, 48px) 0 clamp(16px, 2vw, 28px); border-top: 0; }
.type-face .face-name{ font-size: clamp(40px, 12vw, 200px); line-height: 1.1; }  /* room for the descenders above the rule */
.type-face .face-pager{ display: flex; justify-content: space-between; }

/* Typeface page top: the name, then one ruled row: kind, six facts, the light/dark switch */
.type-face .type-hero{ display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: baseline; padding: 16px 0 0; margin-bottom: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); overflow: visible; }
.type-face .type-kicker{ grid-column: 1 / 3; margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 16px; color: var(--text); }
.type-face .type-facts{ grid-column: 3 / 12; display: flex; justify-content: space-between; gap: var(--gap); white-space: nowrap; font-family: "Inter", system-ui, sans-serif; font-size: 13px; line-height: 1.35; }
.type-face .type-facts dt{ color: var(--muted); }
.theme-toggle{ grid-column: 12 / 13; justify-self: end; padding: 0; border: 0; background: none; color: var(--text); font: 13px/1.35 "Inter", system-ui, sans-serif; cursor: pointer; }
.theme-toggle::before{ content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .45em; border: 1px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); vertical-align: -.05em; }
.theme-toggle:hover{ color: var(--link-color); }
@media (max-width: 720px){
  .type-face .type-kicker{ grid-column: 1 / 9; }
  .theme-toggle{ grid-column: 9 / 13; grid-row: 1; }
  .type-face .type-facts{ grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; margin-top: 16px; white-space: normal; }
}

/* Dark mode (typeface pages, switched by .theme-toggle; script.js remembers it per visitor) */
:root[data-theme="dark"]{ --bg: #0b0b0d;  /* the black of the Quarks film */ --text: rgba(242, 241, 236, .92); }
:root[data-theme="dark"] .type-face{ --muted: var(--text); --line: rgba(242, 241, 236, .16); --card: rgba(242, 241, 236, .05); }
:root[data-theme="dark"] .info{ --line: rgba(242, 241, 236, .16); }
.type-face .license-mail{ font-family: var(--face), "Inter", system-ui, sans-serif; color: var(--text); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }  /* the download link in the typeface itself, text colour (the blue is too dark on black) */
.type-face .license-mail:hover{ color: var(--link-color); }

/* Labs: one lab per row, its live animation on the left half, name, text and a ruled list on the right */
.labs-list{ --line: rgba(0,0,0,.15); --wash: rgba(0,0,0,.04); row-gap: clamp(48px, 6vw, 96px); padding-bottom: var(--edge); }
:root[data-theme="dark"] .labs-list{ --line: rgba(242, 241, 236, .16); --wash: transparent; }  /* Labs is a dark page */
.labs-list .intro{ margin-bottom: 0; }
.lab{ grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: end; background: var(--bg); }  /* anim.js reads this background */
.lab .x-media{ grid-column: 1 / 7; display: block; position: relative; }
.lab .x-media canvas{ display: block; width: 100%; aspect-ratio: 16 / 9; color: var(--text); background: var(--wash); }
.lab-info{ grid-column: 7 / -1; }
.lab-info h2{ margin: 0 0 16px; font-family: "Newsreader", Georgia, serif; font-size: clamp(28px, 3vw, 44px); font-weight: 400; line-height: 1.05; }
.lab-info h2 a:hover{ color: var(--link-color); }
.lab-info p{ max-width: 52ch; margin: 0 0 24px; font-size: 15px; line-height: 1.4; }
.lab .x-details{ margin: 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.lab .x-details .row{ display: grid; grid-template-columns: 1fr 2fr; column-gap: var(--gap); padding: 8px 0; border-bottom: 1px solid var(--line); }
.lab .x-details dd{ margin: 0; }
.lab .x-details a:hover{ color: var(--link-color); }
.x-grade-label{ position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 5%; text-align: center; color: #fff; font-family: "Newsreader", Georgia, serif; font-size: clamp(28px, 4vw, 64px); line-height: 1; pointer-events: none; }
@media (max-width: 720px){
  .lab .x-media, .lab-info{ grid-column: 1 / -1; }
  .lab-info{ margin-top: 16px; }
}

/* All text in the text colour: no grey anywhere */

/* Pics: a mixed masonry, 32px between everything; pictures keep their own format */
.visually-hidden{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pics{ padding-top: clamp(48px, 6vw, 96px); padding-bottom: var(--edge); }
.pics-grid{ grid-column: 1 / -1; columns: 4; column-gap: 32px; }
.pic{ break-inside: avoid; margin: 0 0 32px; }
.pic img, .pic video{ display: block; width: 100%; height: auto; }
.pic-ph{ background: rgba(0,0,0,.06); }
:root[data-theme="dark"] .pic-ph{ background: rgba(242, 241, 236, .07); }  /* Pics is a dark page */
@media (max-width: 1000px){ .pics-grid{ columns: 3; } }
@media (max-width: 720px){ .pics-grid{ columns: 2; column-gap: 12px; } .pic{ margin-bottom: 12px; } }

/* Case pages: name and text like the About intro, the facts as fields, the work in a 32px grid */
.case-name, .case-text{
  margin: clamp(64px, 9vw, 128px) 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}
.case-name{ grid-column: 1 / 7; }
.case-text{ grid-column: 7 / -1; text-wrap: pretty; }
.case-info{ grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 32px; margin-bottom: clamp(48px, 6vw, 96px); font-size: 13px; line-height: 1.35; }
.case-info .field:nth-of-type(n){ grid-column: span 3; grid-row: auto; }
.case-info .field a{ color: var(--text); text-decoration: none; }
.case-info .field a:hover{ color: var(--link-color); }

.media{ grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.media picture{ display: contents; }
.media picture > source{ display: none; }
.media img, .media video{ display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.media .full{ grid-column: 1 / -1; aspect-ratio: auto; object-fit: contain; }
.media .half{ grid-column: span 6; }
.media .third{ grid-column: span 4; aspect-ratio: auto; }
.media .half.natural{ aspect-ratio: auto; }
.media .focus-low{ object-position: 50% 80%; }
.media .contain{ object-fit: contain; background-color: #040100; }
.media .tile-show, .media .sound-wrap{ grid-column: 1 / -1; position: relative; }
img[data-lqip], video[data-lqip]{ background-size: cover; background-position: center; background-repeat: no-repeat; }
.js [data-lqip]:not(.is-loaded){ image-rendering: pixelated; }
[data-lqip].is-loaded{ background-image: none !important; }

/* Film controls: ▶ and ♪ in a small box, bottom right */
.video-controls{ position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.sound-toggle{ padding: 4px 9px; border: 0; font: inherit; font-size: 15px; line-height: 1.2; color: var(--text); background: var(--bg); cursor: pointer; }
.sound-toggle:hover{ color: var(--link-color); }
.sound-toggle.is-muted{ text-decoration: line-through; }
.play-toggle.is-playing::before{ content: ""; display: inline-block; width: 10px; height: 11px; margin: 0 1px; border: solid currentColor; border-width: 0 3px; box-sizing: border-box; }

/* The other cases: one ruled row, big serif */
.case-pager{ position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin-top: clamp(64px, 9vw, 128px); padding: clamp(24px, 3vw, 48px) 0; border-top: 1px solid var(--text); font-family: "Newsreader", Georgia, serif; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.1; }
.case-pager a{ color: var(--text); text-decoration: none; }
.case-pager a:hover{ color: var(--link-color); }
.case-pager .prev{ grid-column: 1 / 7; }
.case-pager .next{ grid-column: 7 / -1; text-align: right; }
.case-pager::after{ content: ""; position: absolute; top: 0; bottom: clamp(24px, 3vw, 48px); left: 50%; border-left: 1px solid var(--text); }  /* vertical rule from the top rule down to the foot of the names (bottom = the pager's bottom padding) */

@media (max-width: 800px){
  .case-name, .case-text{ grid-column: 1 / -1; }
  .case-name{ margin-bottom: 0; }
  .case-text{ margin-top: 24px; }
  .case-info .field:nth-of-type(n){ grid-column: span 6; }
  .media{ gap: 12px; }
  .media .half, .media .third{ grid-column: 1 / -1; }
  .case-pager{ font-size: 28px; }
}

/* 404: small, in the middle of the page; 240px leaves room for header and footer without scrolling */
.nf{ grid-column: 1 / -1; display: grid; place-items: center; min-height: calc(100svh - 240px); margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 16px; font-weight: 400; }
