/* =============================================================================
   Portfolio v2 — design system
   -----------------------------------------------------------------------------
   Plain CSS, hand-written. No LESS, nothing to compile.

   This file is the reusable part: tokens, then the shared components every
   case study uses. Anything that only one case study needs goes in that case
   study's own file (e.g. styles/v2/cash-app.css).

   Rule: every value below the TOKENS block should come from a token. If a
   design needs a value that isn't here, add a token rather than a one-off.
   ============================================================================= */


/* ---------------------------------------------------------------- fonts --- */

/* Archivo (sans) loads from Google Fonts in the page <head>. */

@font-face {
	font-family: "Playfair Display";
	font-weight: 700;
	src: url(../../fonts/Playfair_Display/PlayfairDisplay-Bold.ttf);
}
/* Font Awesome 4, for the pull quote's quote mark (the phone nav's icons
   are thin SVG lines instead: --icon-* tokens) */
@font-face {
	font-family: icon;
	src: url(../../fonts/font_awesome/fontawesome-webfont.ttf);
}


/* --------------------------------------------------------------- TOKENS --- */

:root {
	/* colour */
	--color-paper: #FFFFFF;           /* page background */
	--color-ink: #323A45;             /* body text, headings */
	--color-ink-muted: #667282;       /* captions, nav links */
	--color-brand: #3D3560;           /* dark violet: pull quotes, hovers */
	--color-banner: #211B3F;          /* deep purple: the banner only (Vivian, 2026-11-19); other dark accents use --color-brand */
	--color-on-banner: #FFFFFF;
	--color-on-banner-muted: #AEB1C0;
	--color-on-banner-subtle: #8C8AA6; /* quieter still: company / year under the footer images (4.9:1 on the banner) */
	--color-logo: #D1D0D8;            /* light violet */
	--color-rule: #E0E7EF;            /* hairlines, image outlines */
	--color-surface: #F8F9FD;         /* tinted boxes: pull quotes, key facts (old slate-0a) */
	--color-image-bg: #EBEDF3;        /* backdrop behind light diagrams (old bg-slate) */
	--color-accent: #FFD00C;          /* yellow highlight (Roots labels) */
	--color-scrim: rgba(33, 27, 63, 0.4); /* dims the page behind the phone nav sheet (--color-banner at 40%) */

	/* This page's banner colour. Every banner is --color-banner today; a case
	   study that wants its own sets this once on its <body>, e.g.
	   <body style="--page-banner: #1B3F2E">, and the banner and the site nav
	   above it both pick it up. */
	--page-banner: var(--color-banner);

	/* type families */
	--font-sans: "Archivo", system-ui, sans-serif;
	--font-serif: "Playfair Display", Georgia, serif;
	--font-icon: icon;

	/* type sizes */
	--text-label: 12px;
	--text-logo: 20px;                 /* the VZ wordmark in the site nav */
	--text-subnav: 13px;
	--text-caption: 14px;
	--text-nav: 14px;
	--text-body: 16px;
	--text-quote: 18px;               /* pull-quote text */
	--text-h3: 24px;
	--text-h2: 32px;
	--text-lead: 24px;                /* banner question */
	--text-stat: 40px;                /* banner result numbers */
	--text-display: 48px;             /* banner title */

	/* type weights */
	--weight-light: 300;
	--weight-regular: 400;
	--weight-medium: 500;
	--weight-semibold: 600;
	--weight-bold: 700;

	/* line heights */
	--leading-tight: 1.2;
	--leading-snug: 1.4;
	--leading-body: 1.6;
	--leading-nav: 30px;
	--leading-subnav: 26px;

	/* letter spacing */
	--tracking-display: -0.01em;
	--tracking-caps: 0.04em;

	/* spacing scale */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-8: 32px;
	--space-10: 40px;
	--space-12: 48px;
	--space-16: 64px;
	--space-24: 96px;
	--space-20: 80px;
	--space-30: 120px;
	--space-60: 240px;

	/* layout
	   Three content lanes, all starting from the text's left edge:
	   text  — the reading column
	   mid   — images; start with the text, run further right
	   wide  — reaches back left to the nav's edge */
	--gutter: var(--space-5);
	--nav-row-height: 60px;           /* the white site-nav row; the VZ square fills it */
	--nav-width: 236px;               /* widest nav link, bold + dot, measured in Archivo */
	--measure-text: 500px;
	--label-column: 9em;              /* small caps labels in pull quotes + key facts */
	--measure-mid: 770px;             /* widest a mid image gets */
	--banner-image-height: 640px;     /* cropped banner + footer images */
	--panorama-height: 480px;         /* very wide images in a gallery: shown at this height, scroll sideways */
	--gallery-image-height: 350px;    /* .equal_height gallery: every image shown at this height */
	--pair-aspect-sum: 2.84;          /* .equal_height Old / New pair: the two images' width-to-height
	                                     ratios added together (here 800/468 + 712/628). The pair's
	                                     height is worked out from this so the two always fill the
	                                     column exactly, at any width, without being squashed.
	                                     Re-measure if either image is re-exported. */
	--embed-aspect: 100 / 69;         /* an embedded Figma prototype: an iframe has no size of its
	                                     own, so it takes this width-to-height. 69% is the old
	                                     Findmine page's value. */
	/* Full-width layout used by the banner and the More Work footer. Its
	   columns line up with the page between them:
	   | margin |   side    | gap |  text  | ->mid | spare | margin |
	            ^ nav starts        ^ paragraphs start                 */
	--full-width-columns:
		[edge-start] var(--gutter)
		[side-start] calc(var(--nav-width) + var(--lane-offset))
		[side-end] var(--gutter)
		[text-start] minmax(0, var(--measure-text))
		[text-end] minmax(0, calc(var(--measure-mid) - var(--measure-text)))
		[mid-end] minmax(0, 1fr)
		[content-end] var(--gutter)
		[edge-end];
	--text-offset-max: 308px;         /* gap between nav and text, big screens */
	/* The actual gap: shrinks on smaller laptops so the text never gets
	   squeezed. It starts shrinking below a 1440px-wide window
	   (1440 - 1132 = 308), leaving the wider images room on the right. */
	--lane-offset: clamp(var(--gutter), 100vw - 1132px, var(--text-offset-max));

	/* strokes */
	--stroke-hairline: 1px;

	/* Icons, drawn as SVG where Font Awesome falls short (Vivian picked
	   these over FA's options). Each is a stencil: the element shows its
	   own text colour through it, so `color` sets the icon's colour.

	   Sharp, all of them — flat line ends, square corners, a pointed tip
	   — and neither hairline nor heavy (Vivian, 2026-11-19).

	   Phone nav: align-left (the menu button), close (the same button,
	   open) and chevron-down (the section rows in the open menu), 2 on a
	   24-unit grid, about 1.7px at --icon-size; change them together.
	   Homepage case-study titles: grid / arrow-right, weighted to the
	   bold type beside them. */
	--icon-size: var(--space-5);
	--icon-align-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='butt' stroke-linejoin='miter'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E");
	--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='butt' stroke-linejoin='miter'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
	--icon-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 3h7.5v7.5H3zM13.5 3H21v7.5h-7.5zM3 13.5h7.5V21H3zM13.5 13.5H21V21h-7.5z'/%3E%3C/svg%3E");
	--icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='butt' stroke-linejoin='miter'%3E%3Cpath d='M2 12h18M13 5l7 7-7 7'/%3E%3C/svg%3E");
	--icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='butt' stroke-linejoin='miter'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

	/* motion */
	--duration-fast: 0.2s;

	/* .hover_lift — the label that follows the pointer over an image that
	   links somewhere. See the component near the foot of this file. */
	--hover-label-pad: 2px 6px;       /* how far the dark bleeds past the words */
	--hover-ticker-gap: 12px;         /* clear air between one copy of the words and the next */
	--hover-ticker-duration: 2.6s;    /* how long one copy takes to cross */

	/* breakpoints — CSS variables can't be used inside @media, so these
	   are written out by hand below. Keep them in sync:
	   --breakpoint-nav: 1000px    (nav becomes a sheet from the bottom; below this
	                                the empty space moves to the left)
	   --breakpoint-phone: 640px   (two-column rows finally stack) */
}


/* ---------------------------------------------------------------- reset --- */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	/* The site nav sits at the very top of the document, out of the flow.
	   This padding is the space it occupies, so nothing hides underneath
	   it and nothing jumps when it pins. */
	padding-top: var(--nav-row-height);
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-sans);
	font-size: var(--text-body);
	font-weight: var(--weight-light);
	line-height: var(--leading-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
	text-decoration: none;
}
ul {
	list-style: none;
}
b, strong {
	font-weight: var(--weight-semibold);
}
.no_scroll {
	overflow: hidden;
}


/* ------------------------------------------------------------- site nav --- */

/* The white row at the very top of every page: the VZ square flush in the
   corner, then the three section links. The links start at the paragraph
   column, so they line up with the body text of a case study — that's why
   the row borrows --full-width-columns, the same columns the banner and the
   More Work footer use.

   How it moves (js/site-nav.js does the switching, this file does the look):

     no class    the row sits at the top of the DOCUMENT and scrolls away
                 with everything else, like any other content
     .is_pinned  the row is stuck to the top of the WINDOW instead
     .is_hidden  ...and slid up out of sight

   Scrolling down hides it; scrolling up slides it back. body's padding-top
   holds its space open the whole time, so the page never jumps. */
.site_nav {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	/* above a .full-width image (2) and the nav column (1), below the
	   phone drawer (10) and its button (11) */
	z-index: 5;
	height: var(--nav-row-height);
	background: var(--color-paper);
	display: grid;
	grid-template-columns: var(--full-width-columns);
	align-items: center;
}
.site_nav.is_pinned {
	position: fixed;
	transition: transform var(--duration-fast) ease;
}

/* On a page with a banner, the row takes the banner's colour while it sits
   in its home spot right above it, so the two read as one block. Once it
   pins (you scrolled back up, looking for it) it is white again.

   The fade lives on this state only, so it runs one way: pinned → home
   fades back into the banner colour; home → pinned switches instantly,
   while the row is still out of sight above the window. */
body:has(.banner) .site_nav:not(.is_pinned) {
	background: var(--page-banner);
	transition: background-color var(--duration-fast) ease;
}
body:has(.banner) .site_nav:not(.is_pinned) .site_links a {
	color: var(--color-on-banner);
}
body:has(.banner) .site_nav:not(.is_pinned) .site_links a:hover {
	color: var(--color-on-banner-muted);
}
.site_nav.is_hidden {
	transform: translateY(-100%);
}

/* How much room anything pinned to the top of the window has to leave for
   the nav row: nothing while it is away, its full height while it is
   showing. js/site-nav.js puts `nav_shown` on <html>. Sticky things read
   this so they slide down in step with the row instead of hiding under it. */
:root {
	--nav-offset: 0px;
}
:root.nav_shown {
	--nav-offset: var(--nav-row-height);
}

/* The VZ mark: a filled square in the very corner, outside the columns. */
.site_logo {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--nav-row-height);
	height: var(--nav-row-height);
	display: grid;
	place-items: center;
	background: var(--color-banner);
	color: var(--color-on-banner);
	font-size: var(--text-logo);
	font-weight: var(--weight-bold);
	line-height: 1;
	transition: background-color var(--duration-fast);
}
.site_logo:hover {
	background: var(--color-brand);
}

.site_links {
	grid-column: text-start / content-end;
	display: flex;
	gap: var(--space-8);
}
.site_links a {
	color: var(--color-ink);
	white-space: nowrap;
	transition: color var(--duration-fast);
}
.site_links a:hover {
	color: var(--color-brand);
}


/* --------------------------------------------------------- page layout --- */

/* Two columns: the nav, then everything else. The banner spans both.
   The nav column has the same margin on both sides of its links. */
.body_wrapper {
	display: grid;
	grid-template-columns: calc(var(--gutter) + var(--nav-width) + var(--gutter)) minmax(0, 1fr);
	grid-template-areas:
		"banner banner"
		"nav    main";
	/* The page sits above the More Work footer and is opaque, so the
	   footer only shows once the page has scrolled up off it. */
	position: relative;
	z-index: 1;
	background: var(--color-paper);
}
.body_wrapper > .banner { grid-area: banner; }
.body_wrapper > .left_panel { grid-area: nav; }
.body_wrapper > .main_panel {
	grid-area: main;
	padding-right: var(--gutter);
}


/* --------------------------------------------------------------- banner --- */

/* The banner uses the full-width columns (see --full-width-columns):
   side  — Year, the question headline, the small left image
   text  — title, Company, the summary paragraphs, the big image
   Each row is a "subgrid": it borrows these same columns, so its pieces
   drop straight into place. */
.banner {
	position: relative;
	background: var(--page-banner);
	color: var(--color-on-banner);
	padding: var(--space-60) 0 var(--space-24); /* generous foot, like the dark section */
	display: grid;
	grid-template-columns: var(--full-width-columns);
	row-gap: var(--space-8);
}
.banner_meta,
.banner_images,
.banner_intro {
	display: grid;
	grid-template-columns: subgrid;
}

/* title */
.banner_section {
	grid-column: text-start / mid-end;
}
.banner_section h1 {
	font-size: var(--text-display);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-display);
}

/* Year · Company */
.banner_meta {
	grid-column: side-start / content-end;
}
.banner_section + .banner_meta {
	margin-top: var(--space-8); /* added to the row gap: 64px under the title */
}
.banner_meta .meta_item {
	display: flex;
	gap: var(--space-2);
}
.banner_meta .meta_item.side { grid-column: side; }
.banner_meta .meta_item.main { grid-column: text-start / mid-end; }
.banner_meta dt {
	color: var(--color-on-banner-muted);
}
.banner_meta dd {
	font-weight: var(--weight-bold);
}
.banner_meta + .banner_images {
	margin-top: calc(var(--space-3) - var(--space-8)); /* sits close under Company/Year */
}

/* two images cropped to one height: a small one on the left, running off
   the screen's left edge, and the big one from the paragraph column off
   the right edge */
.banner_images {
	grid-column: edge-start / edge-end;
	column-gap: 0;
}
.banner_images .image_container {
	height: var(--banner-image-height);
	overflow: hidden;
}
.banner_images .image_container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.banner_images .image_container.side {
	grid-column: edge-start / side-end;
}
.banner_images .image_container.side img {
	object-position: right top; /* show the corner nearest the big image */
}
.banner_images .image_container.main {
	grid-column: text-start / edge-end;
}
.banner_images .image_container.main img {
	object-position: left top;
}

/* .screen_pair: two whole screens at the banner image height instead of
   one cropped image, with no backdrop. Each pair lines up against the
   20px gap between the slots; where it's wider than its slot, it runs off
   the screen edge, as a single image does. (Roots' phones, Ontera's iPad
   screens; first made on Roots as .phone_pair.) */
.banner_images .image_container.screen_pair {
	display: flex;
	gap: var(--space-5); /* the 20px between the side and main images */
}
.banner_images .image_container.side.screen_pair {
	justify-content: flex-end;
}
.banner_images .screen_pair img {
	width: auto;
	height: 100%;
	flex-shrink: 0;
}

/* line, then the question on the left and the summary on the right */
.banner_intro {
	grid-column: side-start / content-end;
	border-top: var(--stroke-hairline) solid var(--color-on-banner);
	padding-top: var(--space-8);
}
.banner_question {
	grid-column: side;
	padding-right: var(--space-8);
	font-size: var(--text-lead);
	font-weight: var(--weight-bold);
	line-height: var(--leading-snug);
}
/* spans to the right margin so its sub-section line can reach it;
   paragraphs keep to the text width */
.banner_summary {
	grid-column: text-start / content-end;
}
.banner_summary .line {
	background: var(--color-on-banner);
	margin-top: var(--space-24);
}
.banner_summary .line + p {
	margin-top: var(--space-6);
}
.banner_summary p {
	max-width: var(--measure-text);
	color: var(--color-on-banner-muted);
}
.banner_summary p + p {
	margin-top: var(--space-5);
}
.banner_summary b {
	color: var(--color-on-banner);
}

/* the key facts (Role, Team, ...) when they sit in the banner: no tinted
   box, banner colours, a white line above it */
.banner .project_context_box {
	background: none;
	padding: 0;
	margin-top: var(--space-6);
	max-width: var(--measure-mid);
}
.banner .project_context_box li b {
	color: var(--color-on-banner-muted);
}
.banner .project_context_box li span {
	color: var(--color-on-banner);
}

/* the three result numbers */
.stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-6) var(--space-12);
	margin-top: var(--space-8);
}
.stats li {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}
.stat_value {
	font-size: var(--text-stat);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	color: var(--color-on-banner);
}
.stat_label {
	color: var(--color-on-banner-muted);
}


/* ------------------------------------------------------ More Work footer --- */

/* Same purple and same full-width columns as the banner. Cards use the
   banner's two image widths:
   .work_card.previous — small, from the screen's left edge to the gap
   .work_card.next     — big, from the paragraph edge off the right
   The first case study has only a next card; the left stays empty.
   Below 1000px only the next card shows (Vivian, 2026-11-19).
   Each card: title (left) and company (right) on one line, image below. */
/* Peek, then scroll. Near the end of the page the footer waits, pinned
   underneath the page, with only its top strip (--footer-peek: the "More
   Work" title, the Previous / Next labels and the top of the case study
   images) lined up with the bottom of the window. Scrolling lifts the page
   off that strip first, so it's uncovered from the bottom up: image tops,
   then labels, then the title. Once the strip is fully showing, the footer
   lets go and scrolls up normally with the page.
   How: it's "sticky" to the window's bottom edge, but with a negative
   offset that parks everything except the top strip below the screen.
   That needs a known height, so the footer is exactly one window tall
   (capped), and the case study image grows to fill whatever room is left. */
.more_work {
	--footer-height: min(960px, 100svh);
	--footer-title-gap: var(--space-30); /* between "More Work" and the cards */
	/* everything above the images, plus a 240px slice of them. Capped at
	   the footer's height so a short window never over-parks it. */
	--footer-peek: min(var(--footer-height), calc(
		var(--space-10)                                   /* top padding */
		+ var(--text-display) * var(--leading-tight)      /* title */
		+ var(--footer-title-gap)
		+ var(--text-body) * var(--leading-body)          /* label line */
		+ var(--space-4)                                  /* label to image */
		+ var(--space-60)                                 /* image slice */
	));
	position: sticky;
	bottom: calc(var(--footer-peek) - var(--footer-height));
	z-index: 0;
	height: var(--footer-height);
	background: var(--color-banner);
	color: var(--color-on-banner);
}
.more_work_inner {
	height: 100%;
	padding: var(--space-10) 0 0; /* no foot: the images run to the bottom edge */
	display: grid;
	grid-template-columns: var(--full-width-columns);
	grid-template-rows: auto minmax(0, 1fr);
	row-gap: var(--footer-title-gap);
}


.more_work_title {
	grid-column: side-start / content-end;
	/* same as the banner title */
	font-size: var(--text-display);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-display);
}
.work_cards {
	grid-column: edge-start / edge-end;
	display: grid;
	grid-template-columns: subgrid;
	/* Two rows the cards share, like columns in a table: the text row is
	   as tall as whichever card's text is taller, so both images start on
	   the same line. The image row fills the footer's leftover height and
	   never grows past it, so a tall image is cropped instead of pushing
	   out of the footer. */
	grid-template-rows: auto minmax(0, 1fr);
	row-gap: var(--space-4);
	min-height: 0;
}

.work_card {
	grid-row: span 2;
	display: grid;
	grid-template-rows: subgrid; /* text and image sit on the shared rows */
}
.work_card.previous {
	grid-column: edge-start / side-end; /* image runs off the left edge, like the banner's */
}
.work_card.next {
	grid-column: text-start / edge-end;  /* image runs off the right edge */
}

/* title left, company right, on one line while there's room for both;
   the company drops onto its own line when there isn't */
.work_card_text {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	align-self: start; /* shorter text sits at the top of the shared row */
	gap: var(--space-1) var(--space-4);
}
.work_card.previous .work_card_text {
	padding-left: var(--gutter);
}
.work_card.next .work_card_text {
	padding-right: var(--gutter);
}
.work_card_title {
	font-size: var(--text-body);
	font-weight: var(--weight-bold);
	transition: color var(--duration-fast);
}
.work_card:hover .work_card_title {
	color: var(--color-on-banner-muted);
}
/* "Next" / "Previous" — same treatment as the "Company" label */
.work_card_label {
	font-weight: var(--weight-light);
	color: var(--color-on-banner-muted);
	margin-right: var(--space-2);
}
.work_card .meta_item {
	display: flex;
	flex-wrap: wrap; /* the company name drops below its label in a narrow card */
	gap: 0 var(--space-2);
}
.work_card .meta_item dt {
	color: var(--color-on-banner-muted);
}
.work_card .meta_item dd {
	font-weight: var(--weight-bold);
}

/* the image fills the rest of the footer's height (the shared image row) */
.work_card .image_container {
	min-height: 0;
	overflow: hidden;
}
.work_card .image_container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left top;
}
.work_card.previous .image_container img {
	object-position: right top;
}


/* ----------------------------------------------------------- left nav --- */

/* The nav column scrolls with the page until the banner is gone, then
   sticks. Section links sit in the middle, All Projects / Next at the foot. */
.left_panel .navigation_wrapper {
	position: sticky;
	z-index: 1; /* in front of the section lines */
	top: 0;
	height: 100vh;
	display: grid;
	grid-template-rows: 1fr auto 1fr;
	padding: var(--space-10) 0 var(--space-10) var(--gutter);
}
.page_navigation {
	grid-row: 2;
}
/* A white backing hugging the links, so section lines pass behind the
   words instead of through them. The negative margin keeps the words where
   they were while the backing extends a little past them. */
.page_navigation {
	justify-self: start;
	background: var(--color-paper);
	padding: var(--space-2) var(--space-3);
	margin-left: calc(-1 * var(--space-3));
}

.page_navigation .section_title,
.page_navigation .sub_sections li {
	white-space: nowrap; /* keeps the active dot on the same line */
}
.page_navigation .section_title {
	display: block;
	font-size: var(--text-nav);
	line-height: var(--leading-nav);
	color: var(--color-ink);
	cursor: pointer;
	transition: color var(--duration-fast);
}
.page_navigation .section_title.project_title {
	display: none; /* the title is already in the banner */
}
/* sub-links sit in a drawer that's closed until its section is active */
.page_navigation .sub_sections_drawer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--duration-fast);
}
.page_navigation .sub_sections {
	overflow: hidden;
	padding-left: var(--space-3);
}
.page_navigation .section.active .sub_sections_drawer,
.page_navigation .nav_drawer.slide .sub_sections_drawer {
	grid-template-rows: 1fr;
}
.page_navigation .sub_sections li {
	font-size: var(--text-subnav);
	line-height: var(--leading-subnav);
	color: var(--color-ink-muted);
	cursor: pointer;
	transition: color var(--duration-fast);
}
.page_navigation .section_title:hover,
.page_navigation .sub_sections li:hover {
	color: var(--color-brand);
}
/* the nav script adds .active to whichever heading is on screen */
.page_navigation .section_title.active,
.page_navigation .sub_sections li.active {
	font-weight: var(--weight-medium);
	color: var(--color-ink);
}
.page_navigation .section_title.active::after,
.page_navigation .sub_sections li.active::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: var(--space-2);
	background: var(--color-brand); /* a dark violet square (Vivian, 2026-11-19; was a yellow dot) */
	vertical-align: middle;
}

/* mobile-only control: hidden until the breakpoint below. (The old
   Previous / All Projects / Next row, #mobile_bottom_nav, is gone from v2:
   the More Work footer does that job at every width.) */
#mobile_nav {
	display: none;
}


/* ------------------------------------------------------ content lanes --- */

/* Every content <section> is a grid with named lanes. Children sit in the
   text lane by default; images opt into the wider lanes.

   nav |  offset  |  text  |  room to extend right  |
       |          |<-------------- mid ------------>|
       |<------------------- wide ----------------->|                    */
.main_panel > section {
	display: grid;
	grid-template-columns:
		[wide-start] var(--lane-offset)
		[text-start mid-start] min(var(--measure-text), 100% - var(--lane-offset))
		[text-end] minmax(0, 1fr)
		[mid-end wide-end];
	padding-block: var(--space-10);
}
.main_panel > section:first-child {
	padding-top: var(--space-20);
}
/* extra room before the footer */
.main_panel > section:last-of-type {
	padding-bottom: var(--space-20);
}
.main_panel > section > * {
	grid-column: text;
}
.main_panel > section > .image_container,
.main_panel > section > .figure,
.main_panel > section > .container,
.main_panel > section > .side_by_side,
.main_panel > section > .pullout_container,
.main_panel > section > .project_context_box {
	grid-column: mid;
	max-width: var(--measure-mid);
}
.main_panel > section > .image_container.wide,
.main_panel > section > .scroll_wrapper {
	grid-column: wide;
	max-width: none;
}
/* .full-width: runs margin to margin across the whole screen, reaching
   back over the nav column. It sits on a higher layer than the nav, so it
   slides over the nav links as you scroll. Its caption stays lined up
   with the paragraphs. */
.main_panel > section > .image_container.full-width {
	grid-column: wide-start / wide-end;
	max-width: none;
	margin-left: calc(-1 * (var(--nav-width) + var(--gutter)));
	position: relative;
	z-index: 2; /* above the nav (z-index 1) */
}
.main_panel > section > .image_container.full-width .caption {
	margin-left: calc(var(--nav-width) + var(--gutter) + var(--lane-offset));
}
.main_panel > section > .image_container.img-small {
	grid-column: text;
}


/* ------------------------------------------------------ vertical rhythm --- */

/* Default gap between any two things in a section */
.main_panel > section > * + * {
	margin-top: var(--space-5);
}
/* Key facts get a little more air on both sides */
.main_panel > section > .project_context_box,
.main_panel > section > .project_context_box + * {
	margin-top: var(--space-8);
}
/* Images, galleries and tab blocks get the most */
.main_panel > section > .image_container,
.main_panel > section > .scroll_wrapper,
.main_panel > section > .container,
.main_panel > section > .side_by_side,
.main_panel > section > .tabs_container,
.main_panel > section > .pullout_container,
.main_panel > section > .indented_list,
.main_panel > section > .image_container + *,
.main_panel > section > .scroll_wrapper + *,
.main_panel > section > .container + *,
.main_panel > section > .side_by_side + *,
.main_panel > section > .tabs_container + *,
.main_panel > section > .pullout_container + *,
.main_panel > section > .indented_list + * {
	margin-top: var(--space-16);
}
.main_panel > section > h2 + * {
	margin-top: var(--space-6);
}
/* an h4 straight in a section names the block under it, so it needs more
   air above it than between two paragraphs and less below */
.main_panel > section > h4 {
	margin-top: var(--space-10);
}
.main_panel > section > h4 + * {
	margin-top: var(--space-3);
}
.main_panel > section > h3 {
	margin-top: var(--space-12);
}
.main_panel > section > .line + h3 {
	margin-top: var(--space-6);
}
/* the first thing in a section sits straight under the section's top
   padding: the margins above are gaps between siblings, and a section
   opening on an image was getting 64px on top of the padding */
.main_panel > section > :first-child {
	margin-top: 0;
}


/* ------------------------------------------------------------ headings --- */

/* Each section header sits under a line, like a chapter divider, running
   across the whole screen with the same margin on both sides.
   The header box spans the wide lane (so its right edge is the screen's
   right margin); padding pulls the words back into the image column.
   The line is drawn as a separate layer (::before) that reaches further
   left, past the nav column, to the screen's left margin. */
.main_panel > section > h2 {
	grid-column: wide;
	position: relative;
	padding-top: var(--space-4);
	padding-left: var(--lane-offset);
	padding-right: max(0px, 100% - var(--lane-offset) - var(--measure-mid));
}
.main_panel > section > h2::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: calc(-1 * (var(--nav-width) + var(--gutter)));
	height: var(--stroke-hairline);
	background: var(--color-ink);
}
/* No line where a section change is already obvious: the first section
   (it follows the banner), the dark section, and whatever follows the dark
   section. The line only has to separate two plain white sections.
   section.no_line drops it by hand, e.g. after a section of only images. */
.main_panel > section:first-child > h2,
.main_panel > section.dark > h2,
.main_panel > section.dark + section > h2,
.main_panel > section.no_line > h2 {
	padding-top: 0;
}
.main_panel > section:first-child > h2::before,
.main_panel > section.dark > h2::before,
.main_panel > section.dark + section > h2::before,
.main_panel > section.no_line > h2::before {
	display: none;
}
.main_panel > section > h3 {
	grid-column: mid;
	max-width: var(--measure-mid);
}
.main_panel h2 {
	font-size: var(--text-h2);
	font-weight: var(--weight-bold);
	line-height: var(--leading-snug);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--color-ink);
}
.main_panel h3 {
	font-size: var(--text-h3);
	font-weight: var(--weight-medium);
	line-height: var(--leading-snug);
	color: var(--color-ink);
}
.main_panel h4 {
	font-size: var(--text-body);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-snug);
	color: var(--color-ink);
}


/* ---------------------------------------------------------- components --- */

/* divider between sub-sections: starts at the text, runs to the screen's
   right margin. Its big top margin beats the spacing rules above, whatever
   comes before it (paragraph, image or pull quote). */
.main_panel > section > .line {
	grid-column: text-start / wide-end;
	margin-top: var(--space-24);
}
.line {
	height: var(--stroke-hairline);
	background: var(--color-ink);
}

/* image + optional caption */
.image_container img {
	width: 100%;
}
/* Images are bare by default. A frame is opt-in, and goes on the frame
   (.image_container or .container), never on the <img> itself:
     .outlined  a faint outline, for white screenshots that would melt
                into the white page
     .bg-slate  a tinted backdrop, for light diagrams (below)
   (Vivian, 2026-09-25: the outline used to be the default, and half the
   images on the three case studies needed .no-outline to remove it.) */
.main_panel .image_container.outlined img,
.main_panel .image_container.outlined video,
.main_panel .container.outlined > img {
	border: var(--stroke-hairline) solid var(--color-rule);
}
/* videos sit in an .image_container and behave like images */
.image_container video {
	display: block;
	width: 100%;
}
/* so does an embedded Figma prototype (an <iframe>), at --embed-aspect */
.image_container iframe {
	display: block;
	width: 100%;
	aspect-ratio: var(--embed-aspect);
	border: 0;
}
/* .bg-slate: for light diagrams that need a backdrop. The padding sits
   inside the image's box, so the backdrop frames the image and the caption
   stays outside it. The backdrop is the lighter surface tint and the
   padding is a thin margin, not a mount (Vivian, 2026-09-24: it was
   --color-image-bg at 40/64px and read as a picture frame). */
.main_panel .image_container.bg-slate img {
	background: var(--color-surface);
	padding: var(--space-4);
}
/* a small tinted image gets a thinner margin, so the backdrop stays in
   proportion to the smaller picture (Vivian, 2026-09-25) */
.main_panel .image_container.img-small.bg-slate img {
	padding: var(--space-2);
}
/* Captions are italic on every page (Vivian, 2026-11-19: tried on Chips
   Inventory, then "this should be a shared style"). */
.caption {
	margin-top: var(--space-2);
	font-size: var(--text-caption);
	font-style: italic;
	line-height: var(--leading-snug);
	color: var(--color-ink-muted);
	max-width: var(--measure-text);
}

/* A bulleted list in body copy. The reset strips bullets from every list,
   which is right for the navs, stats and key facts; this puts them back
   where the list is reading text. Same indent and spacing as the What's
   final columns on Ratings & Reviews. */
.bullets {
	list-style: disc;
	padding-left: var(--space-5);
}
.bullets li + li {
	margin-top: var(--space-1);
}
/* ol.bullets: the same list, numbered — for steps the copy or an image
   refers to by number (Chips Inventory: the wafer-to-device steps match
   the numbers printed on the photo above them). Use start="3" to carry
   the count on across a paragraph. */
ol.bullets {
	list-style: decimal;
}

/* .indented_list — a stack of short titled blocks (a need, a lesson, a
   principle), each a <div> with an h3 and paragraphs. Indented 96px from
   the paragraph edge, no ground, the text running on to the image
   column's right edge. Born on Roots (What I needed, Lessons Learned;
   Vivian asked for an indent "like 100px"), made a component on
   2026-10-09 so any case study can use it. */
.main_panel > section > .indented_list {
	grid-column: mid;
	max-width: var(--measure-mid);
}
.indented_list {
	display: grid;
	gap: var(--space-12);
}
.indented_list > * {
	padding-left: var(--space-24);
}
.indented_list > * > * + * {
	margin-top: var(--space-5);
}
/* a small bold title, a step up from the body text */
.main_panel .indented_list h3 {
	font-size: var(--text-quote);
	font-weight: var(--weight-bold);
}
.indented_list h3 + * {
	margin-top: var(--space-6);
}

/* A link inside body copy. The reset strips every link on the site, which
   is right for the nav and the cards, but a source citation in a paragraph
   has to look clickable. */
.main_panel p a {
	text-decoration: underline;
	text-decoration-color: var(--color-ink-muted);
	text-underline-offset: 0.2em;
	transition: color var(--duration-fast);
}
.main_panel p a:hover {
	color: var(--color-brand);
	text-decoration-color: currentColor;
}

/* .to-right-edge: starts at the text like any image, but keeps going to the
   screen's right margin instead of stopping at the image column. */
.main_panel > section > .image_container.to-right-edge,
.tabs_container .content > .image_container.to-right-edge {
	max-width: none;
}

/* Sideways-scrolling gallery. It spans the wide lane, but the padding lines
   the first image up with the text; scrolling slides the images left to the
   nav. The negative right margin lets it run to the very edge of the page. */
.scroll_wrapper {
	overflow-x: auto;
	scrollbar-width: none; /* hidden; still scrolls by swipe / shift+wheel */
	padding-left: var(--lane-offset);
	margin-right: calc(-1 * var(--gutter));
}
.scroll_container {
	display: flex;
	gap: var(--space-6);
	width: max-content;
	padding-right: var(--gutter);
}
.scroll_container .image_container {
	width: min(var(--measure-mid), 80vw);
	flex-shrink: 0;
}

/* A tinted image inside a gallery paints its backdrop on the CONTAINER, not
   on the image. The flex row already stretches every container to a common
   height, so two backdrops end on the same line even when one image is
   shorter than the other — which is what you want when they sit side by
   side. On its own in a section the backdrop still hugs the image.
   Note the caption would fall inside the tint here; these have none. */
.scroll_container > .image_container.bg-slate {
	background: var(--color-surface);
	padding: var(--space-4);
}
.main_panel .scroll_container > .image_container.bg-slate img {
	background: none;
	padding: 0;
}

/* .zoom-2x: shown at twice the image column, so fine detail stays readable;
   the gallery it sits in scrolls sideways to reach the rest. */
.scroll_container .image_container.zoom-2x {
	width: calc(var(--measure-mid) * 2);
}
/* .zoom-phone: ordinary image width on a desktop; on a phone it grows past
   the screen so detail stays readable and the strip scrolls sideways. */
.scroll_container .image_container.zoom-phone {
	width: min(var(--measure-mid), 85vw); /* never past the right margin */
}

/* .equal_height: every image in the gallery is shown at the same height,
   each keeping its own proportions, so the row lines up. */
.scroll_wrapper.equal_height .scroll_container .image_container {
	width: auto;
}
.scroll_wrapper.equal_height .image_container img {
	width: auto;
	height: var(--gallery-image-height);
}

/* .panorama: one very wide image (a strip of explorations). Shown at a
   fixed height at its natural proportions, so it runs off the right edge
   and scrolls sideways instead of shrinking to image width. */
.scroll_container .image_container.panorama {
	width: auto;
}
.scroll_container .image_container.panorama img {
	width: auto;
	height: var(--panorama-height);
}

.scroll_wrapper::-webkit-scrollbar {
	display: none;
}

/* Pull quote — quotes, findings and design problems all use this. No tinted
   box: a hairline above and below, the small label ("Principle #1") in the
   label column, and the line itself big beside it. Where there's a credit,
   a large gap separates it from the quote. */
.pullout_container {
	padding-block: var(--space-4);
	border-top: var(--stroke-hairline) solid var(--color-ink);
	border-bottom: var(--stroke-hairline) solid var(--color-ink);
	display: grid;
	grid-template-columns: var(--label-column) 1fr;
	gap: var(--space-4);
	align-items: start;
}
/* The small caps label. Born in the pull quote, but it is just "the label
   that names the thing under it", so it is usable anywhere — the paired
   columns in Final vision use it too. */
.pullout_label {
	font-size: var(--text-label);
	font-weight: var(--weight-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--color-ink-muted);
}
.pullout_container .pullout_label {
	padding-top: var(--space-2); /* optically level with the big first line */
}
.pullout_container p:not(.pullout_label):not(.pullout_credit):not(.pullout_footnote) {
	font-size: var(--text-quote);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-snug);
	color: var(--color-ink);
	text-wrap: pretty; /* avoids a lone word on the last line */
}

/* who said it, under a quote: in the text column, with a gap above it */
.pullout_container .pullout_credit {
	grid-column: 2;
	margin-top: var(--space-12);
	font-size: var(--text-body);
	font-weight: var(--weight-regular);
	color: var(--color-ink);
}

/* an asterisked note under a quote, explaining a term inside it. Sits in
   the same column as the quote, close under whatever it follows. */
.pullout_container .pullout_footnote {
	grid-column: 2;
	margin-top: var(--space-3);
}

/* .narrow: the block keeps to the paragraph column instead of the image
   column — the label rides inside that width */
.main_panel > section > .pullout_container.narrow {
	grid-column: text;
	max-width: var(--measure-text);
}

/* an actual quote mark instead of the word, for quotes from people */
.pullout_container .pullout_label.quote_icon {
	padding-top: 0;
	font-size: var(--text-h3);
	line-height: 1;
	color: var(--color-ink-muted);
}
.pullout_container .pullout_label.quote_icon::before {
	content: "\f10d"; /* Font Awesome 4: quote-left */
	font-family: var(--font-icon);
	font-weight: var(--weight-regular);
}

/* image + text row (.container): image on one side, a small heading and
   paragraphs on the other, image width overall. Either order works; the
   HTML decides which side the image is on. First pass: Vivian will
   fine-tune how it looks. */
.container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-8);
	align-items: start;
}
.container > img {
	width: 100%;
}
.text_container > * + * {
	margin-top: var(--space-3);
}

/* two images in a row (Old / New). The caption sits above each image as
   its label. */
.side_by_side {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-6);
	align-items: start;
}
.side_by_side .image_container .caption {
	margin-top: 0;
	margin-bottom: var(--space-2);
}
/* .caption_below: the pair isn't Old / New, it's two things being compared,
   so the caption is a description under each image rather than a label
   above it. */
.side_by_side.caption_below .image_container .caption {
	margin-top: var(--space-2);
	margin-bottom: 0;
}

/* .equal_height: both images at the same height, each keeping its own
   proportions, the columns taking the width each image needs. */
.side_by_side.equal_height {
	grid-template-columns: auto auto;
	justify-content: start;
}
.side_by_side.equal_height .image_container img {
	width: auto;
	/* the height that makes both images, plus the gap, fill the column */
	height: calc((min(var(--measure-mid), 100vw - var(--gutter) * 2) - var(--space-6)) / var(--pair-aspect-sum));
	max-width: none; /* the global img cap would squash it against the fixed height */
}
/* .narrow: the pair fits inside the paragraph column instead of the image
   column, for small diagrams that don't need the width */
.main_panel > section > .side_by_side.narrow {
	grid-column: text;
	max-width: var(--measure-text);
}

/* .no-stack: the row keeps its two columns on a phone instead of stacking.
   For a row whose picture only makes sense read against the words beside
   it. The gap tightens, since 32px is a lot of a 460px-wide screen. */
.container.no-stack {
	grid-template-columns: 1fr 1fr;
}

/* .stacked: text above its image instead of beside it */
.container.stacked {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-5);
}

/* Tabs: alternative blocks of content behind a row of labels, the active
   one underlined. Driven by js/tabs.js, which pairs a .tab's id ending in
   _button with the .content whose id ends in _content. */
.tabs_container {
	display: block;
}
.tabs {
	display: flex;
	flex-wrap: nowrap;           /* a long row scrolls sideways instead of
	                                wrapping onto a second line */
	overflow-x: auto;
	scrollbar-width: none;
	gap: var(--space-6);
	max-width: var(--measure-mid);
	border-bottom: var(--stroke-hairline) solid var(--color-ink);
}
.tabs::-webkit-scrollbar {
	display: none;
}
.tab {
	white-space: nowrap;
}
.tab {
	padding-bottom: var(--space-3);
	margin-bottom: calc(-1 * var(--stroke-hairline));
	border-bottom: 2px solid transparent;
	font-size: var(--text-body);
	color: var(--color-ink-muted);
	cursor: pointer;
	transition: color var(--duration-fast);
}
.tab:hover {
	color: var(--color-ink);
}
.tab.active {
	font-weight: var(--weight-semibold);
	color: var(--color-ink);
	border-bottom-color: var(--color-ink);
}
.tabs_container .content {
	margin-top: var(--space-8);
}
.tabs_container .content.hide {
	display: none;
}
.tabs_container .content > * {
	max-width: var(--measure-mid);
}
/* reading text inside a panel keeps the paragraph column, like everywhere
   else on the page — only the pictures take the image column */
.tabs_container .content > p,
.tabs_container .content > .bullets {
	max-width: var(--measure-text);
}
.tabs_container .content > * + * {
	margin-top: var(--space-8); /* matches the gap between the tabs and the first row */
}
.main_panel > section > .tabs_container {
	grid-column: mid;
}

/* .narrow: the tab row and its panels keep to the paragraph column instead
   of the image column, for a block whose pictures read fine small. */
.main_panel > section > .tabs_container.narrow {
	grid-column: text;
}
.tabs_container.narrow .tabs,
.tabs_container.narrow .content > * {
	max-width: var(--measure-text);
}

/* .no-rule: the rule that spans the whole tab row is dropped; the active
   tab keeps its underline. For a row that names sections of a section
   rather than swapping one picture for another, where a rule running the
   full width would read as a second divider under the heading.

   The labels are a step up from body text, since they stand in for the
   sub-headings they replaced, but they stay below the headings around
   them (Vivian, 2026-09-25). Everything else — muted until active,
   semibold and underlined when active — is the ordinary tab. */
.tabs_container.no-rule > .tabs {
	border-bottom: none;
}
.tabs_container.no-rule > .tabs > .tab {
	font-size: var(--text-quote);
}

/* A tab block inside a sideways-scrolling gallery, so two of them sit side
   by side and the strip scrolls. Same width as an image in that gallery. */
.scroll_container > .tabs_container {
	width: min(var(--measure-mid), 80vw);
	flex-shrink: 0;
}

/* key facts (Role, Team, ...) as a two-column list in a tinted box */
.project_context_box {
	background: var(--color-surface);
	padding: var(--space-3) var(--space-4);
}
.project_context_box li {
	display: grid;
	grid-template-columns: var(--label-column) 1fr;
	gap: var(--space-4);
	padding-block: var(--space-1);
}
.project_context_box li b {
	font-size: var(--text-label);
	font-weight: var(--weight-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	line-height: var(--leading-body);
	padding-top: var(--space-1); /* optically aligns the small label with the body line */
	color: var(--color-ink);
}


/* -------------------------------------------------------- image hover --- */

/* .hover_lift — put it on the box that wraps an <img>, normally the <a>
   that is the link, and js/image-hover.js does the rest. Used by the
   homepage's case-study screenshots, the Roots screenshot in Personal
   Projects, and the case study images in the More Work footer.

   Hovering shows a small label beside the pointer saying where a click
   goes. The image itself stays still (Vivian, 2026-11-19: it used to draw
   back and drift away from the pointer, and she did not like the
   movement).

   Only where there is a real pointer: nothing to hover with on a
   touchscreen. The script bails out there, so no label is ever built. */

/* The label that rides along with the pointer. Styled like a swipe of
   highlighter rather than a button: the dark sits tight around the words,
   square corners, no shadow. It is decoration, so the script creates it
   and it never takes a click. One label serves the whole page. */
.cursor_label {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 20;   /* above everything that pins: nav row, left nav, sticky titles */
	pointer-events: none;
	padding: var(--hover-label-pad);
	background: var(--color-banner);
	color: var(--color-on-banner);
	font-size: var(--text-caption);
	font-weight: var(--weight-regular);
	line-height: var(--leading-tight);
	white-space: nowrap;
	overflow: hidden;
	opacity: 0;
	transition: opacity var(--duration-fast);
}
.cursor_label.is_shown {
	opacity: 1;
}

/* The words crawl leftwards through the label, each copy followed by the
   next, like a news ticker. The label is held to exactly one copy's width,
   so a copy is always leaving on the left as another arrives on the right.

   --ticker-step is the distance from one copy to the next, measured by
   js/image-hover.js: sliding the row by exactly that much lands on a
   picture identical to where it started, so the loop has no seam. */
.cursor_ticker {
	display: flex;
	width: max-content;
	animation: cursor_ticker var(--hover-ticker-duration) linear infinite;
	animation-play-state: paused;   /* nothing to animate while it is hidden */
}
.cursor_label.is_shown .cursor_ticker {
	animation-play-state: running;
}
.cursor_word {
	margin-right: var(--hover-ticker-gap);
}
@keyframes cursor_ticker {
	to { transform: translateX(calc(-1 * var(--ticker-step, 0px))); }
}
@media (prefers-reduced-motion: reduce) {
	.cursor_ticker {
		animation: none;
	}
}


/* ---------------------------------------------------- dark section --- */

/* A whole section in the banner's purple, bleeding past the nav to both
   screen edges. The negative margin reaches the edges; the padding puts the
   content lanes back where they were, so nothing shifts sideways.
   js keeps the nav's links white while this section is behind them. */
.main_panel > section.dark {
	margin-left: calc(-1 * (var(--nav-width) + var(--gutter) * 2));
	margin-right: calc(-1 * var(--gutter));
	padding-left: calc(var(--nav-width) + var(--gutter) * 2);
	padding-right: var(--gutter);
	background: var(--color-banner);
	color: var(--color-on-banner);
	padding-bottom: var(--space-24); /* the purple needs room under the content */
}
.main_panel > section.dark h2,
.main_panel > section.dark h3,
.main_panel > section.dark h4,
.main_panel > section.dark .tab.active {
	color: var(--color-on-banner);
}
.main_panel > section.dark .caption,
.main_panel > section.dark .tab {
	color: var(--color-on-banner-muted);
}
.main_panel > section.dark .tab:hover {
	color: var(--color-on-banner);
}
.main_panel > section.dark .tabs {
	border-bottom-color: var(--color-on-banner-muted);
}
.main_panel > section.dark .tab.active {
	border-bottom-color: var(--color-on-banner);
}
/* sub-section dividers and pull-quote rules are drawn in ink, which is
   invisible on the purple: both flip to white here, and so does a link. */
.main_panel > section.dark .line {
	background: var(--color-on-banner);
}
.main_panel > section.dark .pullout_container {
	border-top-color: var(--color-on-banner);
	border-bottom-color: var(--color-on-banner);
}
.main_panel > section.dark .pullout_label {
	color: var(--color-on-banner-muted);
}
.main_panel > section.dark .pullout_container p:not(.pullout_label):not(.pullout_credit),
.main_panel > section.dark .pullout_container .pullout_credit {
	color: var(--color-on-banner);
}
.main_panel > section.dark p a {
	text-decoration-color: var(--color-on-banner-muted);
}
.main_panel > section.dark p a:hover {
	color: var(--color-on-banner);
}
/* the nav sits on the dark section: links go white, no white backing */
.left_panel.on_dark .page_navigation {
	background: none;
}
.left_panel.on_dark .page_navigation .section_title,
.left_panel.on_dark .page_navigation .section_title.active {
	color: var(--color-on-banner);
}
.left_panel.on_dark .page_navigation .sub_sections li {
	color: var(--color-on-banner-muted);
}
.left_panel.on_dark .page_navigation .sub_sections li.active {
	color: var(--color-on-banner);
}
/* the violet square would vanish on the purple section, so it goes white */
.left_panel.on_dark .page_navigation .section_title.active::after,
.left_panel.on_dark .page_navigation .sub_sections li.active::after {
	background: var(--color-on-banner);
}


/* -------------------------------------------------- tinted section --- */

/* section.tinted — a TRIAL (Findmine, 2026-09-28), moved here when Roots
   became its second page. A whole section on the lightest slate, screen
   edge to screen edge: the same bleed as section.dark. A page can pick a
   deeper ground with --section-tint. The page's nav script adds .on_tint
   to #left_panel while the section is behind the links. */
.main_panel > section.tinted {
	margin-left: calc(-1 * (var(--nav-width) + var(--gutter) * 2));
	margin-right: calc(-1 * var(--gutter));
	padding-left: calc(var(--nav-width) + var(--gutter) * 2);
	padding-right: var(--gutter);
	padding-bottom: var(--space-24); /* same room under the content as the dark section */
	background: var(--section-tint, var(--color-surface));
}
/* The colour change already marks the boundary, so no line above this
   heading or the next one (the rule the dark section follows). */
.main_panel > section.tinted > h2,
.main_panel > section.tinted + section > h2 {
	padding-top: 0;
}
.main_panel > section.tinted > h2::before,
.main_panel > section.tinted + section > h2::before {
	display: none;
}
/* the nav's white backing would show as a white box on the tint */
.left_panel.on_tint .page_navigation {
	background: none;
}


/* ============================================================== mobile === */

@media (max-width: 1000px) {
	:root {
		/* No nav column here, so the slack sits on the left instead of the
		   right: the content keeps the image column's width and stays pinned
		   to the right margin, and the left inset shrinks as the window
		   narrows until it's just the margin. Everything stays left-aligned
		   with each other. */
		--lane-offset: max(var(--gutter), calc(100vw - var(--gutter) - var(--measure-mid)));
		--text-h2: 24px; /* 32px uppercase is too big on a phone */
		--text-display: 36px;
		--text-stat: 32px;
		--banner-image-height: 320px; /* a 640px-tall crop of a wide screenshot is a sliver on a phone */
		--panorama-height: 320px;
	}
	/* no nav column on phones: the dark and tinted sections just span the margins */
	.main_panel > section.dark,
	.main_panel > section.tinted {
		margin-left: calc(-1 * var(--gutter));
		padding-left: var(--gutter);
	}
	/* no nav column here: full-width images just span the margins, whatever
	   the left inset is; their caption stays with the text */
	.main_panel > section > .image_container.full-width {
		grid-column: wide-start / wide-end;
		margin-left: var(--gutter);
	}
	.main_panel > section > .image_container.full-width .caption {
		margin-left: calc(var(--lane-offset) - var(--gutter));
	}
	/* no nav column here: the header line starts at the left margin
	   (the h2 box already starts at the screen's left edge) */
	.main_panel > section > h2::before {
		left: var(--gutter);
	}
	/* the sheet is already white, so no backing box behind the links there,
	   and the list spans the sheet so drawer chevrons reach its right edge */
	.page_navigation {
		justify-self: stretch;
		background: none;
		padding: 0;
		margin-left: 0;
	}

	/* The paragraph column now starts at the left margin, which is where
	   the VZ square is, so the links can't use the columns any more: they
	   simply follow the square across the row. */
	.site_nav {
		display: flex;
		align-items: center;
		/* clear the square; where there's room, line up with the body's
		   text inset instead, so the links still share its left edge */
		padding-left: max(calc(var(--nav-row-height) + var(--space-6)), var(--lane-offset));
		padding-right: var(--gutter);
	}
	/* if the three links outgrow the row they scroll sideways rather than
	   wrap, the same as a tab row. The scrolling is on the links, not the
	   row, so the row's hairline and the VZ square stay put. */
	.site_links {
		flex: 1;
		min-width: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.site_links::-webkit-scrollbar {
		display: none;
	}
	/* one column; the nav becomes a sheet that slides up from the bottom */
	.body_wrapper {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"banner"
			"main";
	}

	/* The banner and footer mirror the body here: their text column starts
	   at the same left inset as the body's text, and the slack is on the
	   left. No nav column to line up with any more, so the side column is
	   just that inset. */
	:root {
		--full-width-columns:
			[edge-start] var(--gutter)
			[side-start] max(0px, calc(var(--lane-offset) - var(--gutter)))
			[side-end text-start] minmax(0, var(--measure-text))
			[text-end] minmax(0, 1fr)
			[mid-end content-end] var(--gutter)
			[edge-end];
	}
	/* The key facts follow the paragraphs, not the image column. Down here
	   the banner mirrors the body, and at 640-1000 the box was running up
	   to 270px past the text beside it. */
	.banner .project_context_box {
		max-width: var(--measure-text);
	}
	/* Year and Company sit together at the text edge */
	.banner_meta {
		display: flex;
		gap: var(--space-8);
		grid-column: text-start / content-end;
	}
	/* the question moves above the summary, both at the text edge */
	.banner_intro {
		row-gap: var(--space-6);
	}
	.banner_question {
		grid-column: text-start / mid-end;
		padding-right: 0;
	}
	/* the two banner images keep their small / big pair, off both edges */
	.banner_images {
		grid-template-columns: 1fr 2fr;
		column-gap: var(--gutter);
	}
	.banner_images .image_container.side {
		grid-column: 1;
	}
	.banner_images .image_container.main {
		grid-column: 2;
	}
	.banner {
		padding-top: var(--space-30);
	}
	/* only the next case study here; previous is desktop only (Vivian) */
	.work_card.previous {
		display: none;
	}
	/* the card takes the full width: the project name (left) and company
	   (right, regular weight, quieter colour), then the image running edge
	   to edge, filling the footer's leftover height */
	.work_cards {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr);
	}
	.work_card.next {
		grid-column: 1;
		grid-row: auto;
		grid-template-rows: auto minmax(0, 1fr);
		row-gap: var(--space-4);
	}
	/* the name runs the full width like a paragraph, and the company tucks
	   in at the right end of its last line (Vivian). The company is
	   "floated" right after the name's last word, so it lands on that line
	   when there's room, and only drops to its own line when there isn't. */
	.work_card.next .work_card_text {
		display: flow-root; /* holds the floated company inside the text box */
		padding: 0 var(--gutter);
	}
	.work_card_title {
		display: inline;
	}
	.work_card .meta_item {
		float: right;
		margin-left: var(--space-4); /* never closer than this to the name */
	}
	.work_card .meta_item dd {
		font-weight: var(--weight-regular);
		color: var(--color-on-banner-subtle); /* white, then muted, were too loud */
	}
	/* no "Next" / "Company" labels here: just the names */
	.work_card_label,
	.work_card .meta_item dt {
		display: none;
	}
	/* Shorter than desktop: at this height most of the screenshot shows
	   without cropping too much off its sides */
	.more_work {
		--footer-height: min(520px, 100svh);
		--footer-title-gap: var(--space-12);
	}
	/* The menu button, bottom right. It's the last thing inside
	   .body_wrapper and "sticky" to the window's bottom edge across the
	   whole page, so it floats in the corner while you read, then rides
	   up with the page when the More Work footer is uncovered instead of
	   sitting over it. The bottom margin makes that hand-off seamless:
	   its resting spot is exactly where it floats. */
	#mobile_nav {
		display: block;
		position: sticky;
		z-index: 11; /* above the sheet, so it can be its close button */
		bottom: var(--gutter);
		grid-column: 1 / -1;
		grid-row: 1 / -1;
		align-self: end;
		justify-self: end;
		margin: 0 var(--gutter) var(--gutter) 0;
		width: var(--nav-row-height);   /* the VZ square's size, so the two match (Vivian, 2026-11-19) */
		height: var(--nav-row-height);
		background: var(--color-paper);
		color: var(--color-brand);
		box-shadow: 0 0 0 var(--stroke-hairline) var(--color-brand);
		cursor: pointer;
		opacity: 0;
		visibility: hidden;
		transition: background-color var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast), opacity var(--duration-fast), visibility var(--duration-fast);
	}
	/* Hidden over the banner (Vivian, 2026-11-20): js/js.js adds .is_shown
	   once the banner's bottom edge has scrolled up past the button's top.
	   Open, it's the sheet's close button, so it always shows. */
	#mobile_nav.is_shown,
	#mobile_nav.is_open {
		opacity: 1;
		visibility: visible;
	}
	/* over a dark section (section.dark) the colours flip: white icon and
	   line on the purple. js/js.js checks what's behind the button as the
	   page scrolls. Open, it sits on the white sheet, so it keeps its light
	   colours. */
	#mobile_nav.on_dark:not(.is_open) {
		background: var(--color-banner);
		color: var(--color-on-banner);
		box-shadow: 0 0 0 var(--stroke-hairline) var(--color-on-banner);
	}
	#mobile_nav::before {
		content: "";
		display: block;
		width: var(--icon-size);
		height: var(--icon-size);
		margin: calc((var(--nav-row-height) - var(--icon-size)) / 2);
		background: currentColor;
		-webkit-mask: var(--icon-align-left) center / contain no-repeat;
		mask: var(--icon-align-left) center / contain no-repeat;
	}
	/* open: the same corner, pinned to the window, and the icon becomes an X */
	#mobile_nav.is_open {
		position: fixed;
		right: var(--gutter);
		margin: 0;
	}
	#mobile_nav.is_open::before {
		-webkit-mask-image: var(--icon-close);
		mask-image: var(--icon-close);
	}

	/* The layer behind the open sheet: catches a tap on the page, which
	   closes the sheet (js/js.js), and dims the page with --color-scrim.
	   It lives on .body_wrapper because the page is its own
	   layer stack (z-index 1). The site nav row sits above the page, so it
	   gets its own copy of the layer (below): it stays where it is, dimmed
	   with everything else. (Sending the row behind the page hid it: the
	   page is opaque white.) */
	.body_wrapper::after,
	.site_nav::after {
		content: "";
		position: fixed;
		z-index: 9;
		inset: 0;
		background: var(--color-scrim);
		opacity: 0;
		pointer-events: none;
		transition: opacity var(--duration-fast);
	}
	.site_nav::after {
		position: absolute; /* the row's own box, wherever the row is */
	}
	body.sheet_open .body_wrapper::after,
	body.sheet_open .site_nav::after {
		opacity: 1;
		pointer-events: auto;
	}

	/* The page nav becomes an overflow sheet: full width, white, a line
	   along its top, sliding up from the bottom. Same side margins as the
	   page. Tall nav lists scroll inside it. */
	.left_panel {
		position: fixed;
		z-index: 10;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: calc(100svh - var(--space-24)); /* always some page left to tap */
		display: flex;
		flex-direction: column;
		background: var(--color-paper);
		border-top: var(--stroke-hairline) solid var(--color-brand);
		transform: translateY(100%);
		transition: transform var(--duration-fast);
	}
	.left_panel.slide {
		transform: none;
	}
	.left_panel .navigation_wrapper {
		position: static;
		height: auto;
		min-height: 0;
		overflow-y: auto;
		display: block;
		/* the foot clears the X button in the corner */
		padding: var(--space-4) var(--gutter) calc(var(--space-12) + var(--gutter) * 2);
	}
	.page_navigation .section_title.project_title {
		display: block;
		font-weight: var(--weight-bold);
	}
	.page_navigation .section_title,
	.page_navigation .sub_sections li {
		font-size: var(--text-body);
		line-height: 2.6;
	}
	/* a section with sub-items: the whole row opens its drawer, and a
	   chevron on the right edge shows which way it's going */
	.page_navigation .nav_drawer > .section_title {
		position: relative;
		padding-right: var(--space-8);
	}
	.page_navigation .nav_drawer > .section_title::before {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0; /* the row's height; the icon centres in it */
		width: var(--icon-size);
		background: var(--color-ink);
		-webkit-mask: var(--icon-chevron-down) center / contain no-repeat;
		mask: var(--icon-chevron-down) center / contain no-repeat;
		transition: transform var(--duration-fast);
	}
	.page_navigation .nav_drawer.slide > .section_title::before {
		transform: rotate(180deg);
	}
	/* Here a drawer opens only when tapped (js/js.js opens the current
	   section's on the way up), so reading past a section doesn't hold
	   its drawer open after you've closed it. */
	.page_navigation .section.active .sub_sections_drawer {
		grid-template-rows: 0fr;
	}
	.page_navigation .nav_drawer.slide .sub_sections_drawer {
		grid-template-rows: 1fr;
	}
	/* the sheet is white whatever is behind the desktop nav's spot, so the
	   dark-section colours (set by each page's script) don't apply */
	.left_panel.on_dark .page_navigation .section_title,
	.left_panel.on_dark .page_navigation .section_title.active,
	.left_panel.on_dark .page_navigation .sub_sections li.active {
		color: var(--color-ink);
	}
	.left_panel.on_dark .page_navigation .sub_sections li {
		color: var(--color-ink-muted);
	}
	.left_panel.on_dark .page_navigation .section_title.active::after,
	.left_panel.on_dark .page_navigation .sub_sections li.active::after {
		background: var(--color-brand);
	}
}


/* ============================================================== phone === */

/* Only here does the layout give up its second column. Between this and
   1000px the two-column rows survive; they just get narrower. */
@media (max-width: 640px) {
	:root {
		--nav-row-height: 48px;   /* a 60px square is heavy on a phone */
	}
	/* everything in the row tightens up so the three links keep to one line
	   for as long as possible; past that the row scrolls sideways */
	.site_nav {
		padding-left: max(calc(var(--nav-row-height) + var(--space-4)), var(--lane-offset));
	}
	.site_links {
		gap: var(--space-3);
	}
	.site_links a {
		font-size: var(--text-caption);
	}

	/* image + text rows stack. Old / New pairs stay side by side and big:
	   each image is most of the screen, so the pair scrolls sideways. */
	.container:not(.no-stack) {
		grid-template-columns: minmax(0, 1fr);
		justify-content: stretch;
	}
	.container.no-stack {
		gap: var(--space-5);
	}
	.side_by_side,
	.side_by_side.equal_height {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 70vw;
		column-gap: var(--space-3);
		justify-content: start;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.side_by_side::-webkit-scrollbar {
		display: none;
	}
	.side_by_side .image_container img {
		width: 100%;
		height: auto;
	}
	/* the pair keeps its level heights here too: each column takes the width
	   its image needs at that height, and the row scrolls */
	.side_by_side.equal_height {
		grid-auto-columns: auto;
	}
	.side_by_side.equal_height .image_container img {
		width: auto;
		height: 50vw;
		max-width: none;
	}

	/* a caption belongs to the paragraph column, even under an image that
	   runs wider than the screen */
	.caption {
		max-width: calc(100vw - var(--gutter) * 2);
	}

	/* the banner image shows whole instead of being cropped to a strip */
	.banner_images .image_container {
		height: auto;
		overflow: visible;
	}
	.banner_images .image_container img {
		height: auto;
	}
	/* a screen pair: both screens whole, sharing the width */
	.banner_images .screen_pair img {
		flex: 1;
		min-width: 0;
	}

	/* wide strips: the first panel fills most of the screen and the next one
	   peeks in from the right, so it reads as scrollable */
	.scroll_container .image_container.zoom-2x,
	.scroll_container .image_container.zoom-phone {
		width: 180vw;
	}

	/* no indent on a phone: flush with the paragraphs (Vivian, on Roots) */
	.indented_list > * {
		padding-left: 0;
	}
	/* a narrow pair has no reason to stay in the text column once stacked */
	.main_panel > section > .side_by_side.narrow {
		max-width: none;
	}

	/* the label sits above the line in a narrow column */
	.pullout_container {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-3);
	}
	.pullout_container .pullout_label {
		padding-top: 0;
	}
	.pullout_container .pullout_credit {
		grid-column: 1;
		margin-top: var(--space-16);
	}
	.pullout_container .pullout_footnote {
		grid-column: 1;
	}

	/* the banner finally gives up its columns */
	:root {
		--full-width-columns:
			[edge-start] var(--gutter)
			[side-start text-start] minmax(0, 1fr)
			[side-end text-end mid-end content-end] var(--gutter)
			[edge-end];
	}
	.banner_meta,
	.banner_intro {
		display: flex;
		flex-direction: column;
		gap: var(--space-4);
	}
	.banner_images {
		grid-template-columns: minmax(0, 1fr);
	}
	.banner_images .image_container.main {
		grid-column: 1; /* back to the single column */
	}
	.banner_images .image_container.side,
	.banner_images .image_container.side.screen_pair {
		display: none;
	}

}
