/* ==========================================================================
   Portfolio v2
   Loaded after main.css on the new pages only. Old pages don't load it.

   How the page is put together:
   - Clean and plain, after pauljun.me: no pills, no boxes around text, no
     icon buttons. Everything you can press is a line of text that
     underlines on hover. The current page or filter stays underlined.
   - Sections are told apart by ground: white paper, then a band of warm
     cream paper (the quilt's ground), in turn. No divider lines. Inside a
     warm band a few colour variables are re-valued (see .warm), so everything in
     it adapts.
   - Two sans typefaces, two jobs (Figma's pairing 39). Instrument Sans is
     for headings and anything said in Miki's voice. Geist carries
     information: nav, labels, tags, facts, body, captions.
   ========================================================================== */

:root {
    /* Grounds */
    --v2-ground: #fcfcfa;           /* clean and bright, so work stands out */
    --v2-soft: #f1f3f1;             /* panels and placeholders */
    --v2-warm: #f8eedb;             /* the second ground: warm cream paper, from the quilt reference (lightened 23 Nov 2026) */
    --v2-night: #2a2927;            /* the footer's ground: charcoal, with the rangoli's paper grain over it (Miki, 23 Nov 2026) */
    --v2-faint: #8e918d;            /* large section labels: quiet, but still 3:1 on the ground */
    --v2-dash: rgba(13, 17, 20, 0.28);      /* placeholder outline */

    /* Ink */
    --v2-ink: #0d1114;
    --v2-text: #2a3033;             /* 12:1 on ground */
    --v2-muted: #575c58;            /* 6:1 on ground and on soft (AA) */
    --v2-moss: #2d4f1c;             /* focus rings only */
    --v2-note-bg: #ddcb46;          /* [bracketed notes] to confirm */
    --v2-note-ink: #231d00;

    /* Type */
    --v2-head: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    --v2-sans: "Geist", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --v2-body: max(1.8rem, 18px);
    --v2-small: max(1.5rem, 15px);
    --v2-measure: 60ch;
    /* The type scale: five sizes and no others. Each step is a clear jump (about 1.5 to 1.75 times),
       so the eye can tell levels apart without reading. At a 1280px window: 82 / 56 / 32 / 18 / 15. */
    --v2-t-xl: clamp(4.4rem, 6.4vw, 11rem);       /* the one statement per page: landing line, case study title */
    --v2-t-l:  clamp(3.4rem, 4.4vw, 7.2rem);      /* what divides a page: section names (quiet), chapter titles, figures, the email */
    --v2-t-m:  clamp(2.4rem, 2.5vw, 3.6rem);      /* what you choose between: project headlines, principles, intros */
    /* body (--v2-body, 18px): reading text and captions.   small (--v2-small, 15px): labels, tags, facts, nav. */

    /* Shape and space */
    --v2-radius: 0.6rem;            /* images and panels: barely rounded */
    --v2-pad: clamp(2.4rem, 6vw, 10rem);
    --v2-left: var(--v2-pad);       /* case studies widen this to make room for the scroller */
    --v2-nav: 8rem;                 /* room kept clear under the fixed nav */
    --v2-space-xs: 0.8rem;
    --v2-space-s: 1.6rem;
    --v2-space-m: 2.4rem;
    --v2-space-l: 4.8rem;
    --v2-space-xl: 14rem;

    /* Motion: slow and soft */
    --v2-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --v2-slow: 900ms;
    --v2-quick: 320ms;
}

@view-transition { navigation: auto; }

body.v2 {
    background: var(--v2-ground);
    color: var(--v2-text);
    font-family: var(--v2-sans);
    font-size: var(--v2-body);
    line-height: 1.55;
    letter-spacing: -0.006em;
}

.v2 p { margin: 0 0 var(--v2-space-s); max-width: var(--v2-measure); }
.v2 h1, .v2 h2, .v2 h3 { margin: 0 0 var(--v2-space-s); color: var(--v2-ink); text-wrap: balance; }
ul.plain { margin: 0; }
.v2 ul.plain { list-style: none; padding: 0; }
.v2 img, .v2 video { margin: 0; }

/* Headings and Miki's own words */
.hero-line, .how-list h3, .work h3, .cs-header h1, .page-head h1, .lede, .chapter h2,
.v2 .next-cs a, .num, .footer-email, .v2 .nav-name, .lib-grid h2, .outside p {
    font-family: var(--v2-head);
    font-weight: 500;
    letter-spacing: -0.03em;
}

/* Section names ("How I work", "Selected work", "Outcome"): set large and quiet, so they
   mark the place without competing with the titles under them */
.v2-section > h2, .v2 h2.label {
    margin: 0 0 var(--v2-space-l);
    font-family: var(--v2-head); font-size: var(--v2-t-l); font-weight: 500; line-height: 1.02; letter-spacing: -0.04em;
    color: var(--v2-faint);
}
/* The Library and About titles are page names too: the same quiet gray (Miki, 23 Nov 2026) */
.v2.page-library .page-head h1, .v2.page-about .page-head h1 { color: var(--v2-faint); }
/* Small labels: company and years, "Next" */
.meta { margin: 0 0 var(--v2-space-xs); font-size: var(--v2-small); line-height: 1.4; color: var(--v2-muted); }

/* Links: one colour, underline on hover. A link inside a sentence keeps a
   faint underline so it can be found without hovering. */
.v2 a { color: inherit; text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.v2 a:hover, .v2 a:focus-visible { text-decoration: underline; opacity: 1; }
.v2 p a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.v2 p a:hover { text-decoration-color: currentColor; }
.more { font-weight: 500; color: var(--v2-ink); }

.arrow { display: inline-block; transition: transform var(--v2-quick) var(--v2-ease); }
.v2 a:hover .arrow, .v2 a:focus-visible .arrow, .work:hover .arrow, .work:focus-within .arrow { transform: translateX(0.25em); }

/* Over a link, the ordinary cursor gives way to a large arrow pieced from rangoli shapes (drawn by js/v2.js) */
.has-rangoli-cursor a[href], .has-rangoli-cursor a[href] * { cursor: none; }
.rangoli-cursor {
    position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;
    opacity: 0; transition: opacity 120ms var(--v2-ease);
}
.rangoli-cursor.is-on { opacity: 1; }
.rangoli-cursor svg { display: block; transform-origin: 0 0; transform: scale(0.6); transition: transform 180ms var(--v2-ease); }
.rangoli-cursor.is-on svg { transform: none; }
@media (prefers-reduced-motion: reduce) { .rangoli-cursor svg { transform: none; transition: none; } }

/* ---- Accessibility ---------------------------------------------------- */

.v2 :focus-visible { outline: 3px solid var(--v2-moss); outline-offset: 4px; border-radius: 2px; }

.skip-link {
    position: absolute; left: var(--v2-space-s); top: -10rem; z-index: 200;
    padding: 1rem 1.6rem; border-radius: var(--v2-radius);
    background: var(--v2-ink); color: var(--v2-ground) !important;
    font-size: var(--v2-small);
}
.skip-link:focus { top: var(--v2-space-s); }

/* ---- Nav: a plain row of text ------------------------------------------ */

.v2 .navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 2rem;
    padding: 2rem var(--v2-pad);
    background: color-mix(in srgb, var(--v2-ground) 88%, transparent) !important;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    transition: background-color var(--v2-quick) var(--v2-ease);
}
.v2 .navbar a { color: var(--v2-ink); transition: color var(--v2-quick) var(--v2-ease); }
.v2 .navbar a:hover { opacity: 1; text-decoration: underline; }
.v2 .nav-name { font-size: var(--v2-body); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.v2 .nav-links { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 2.8rem; font-size: var(--v2-small); font-weight: 400; line-height: 1.3; }
.v2 .nav-links a { white-space: nowrap; }
.v2 .nav-links a[aria-current="page"] { text-decoration: underline; }
.nav-toggle { display: none; }      /* phones only: see the 768px block */


/* ---- Placeholders ------------------------------------------------------
   Swap for a real image by replacing the .ph line with the <img> in the
   comment above it. The <img> takes the same ar-* class.                */

.ph {
    display: grid; place-items: center; width: 100%;
    padding: var(--v2-space-m);
    background: var(--v2-soft);
    border: 1px dashed var(--v2-dash);
    border-radius: var(--v2-radius);
    color: var(--v2-text);
    font-size: var(--v2-small); line-height: 1.45; text-align: center; text-wrap: balance;
}
.ph-small { padding: var(--v2-space-xs); font-size: var(--v2-small); }

.ar-16x9  { aspect-ratio: 16 / 9; }
.ar-16x10 { aspect-ratio: 16 / 10; }
.ar-21x9  { aspect-ratio: 21 / 9; }
.ar-4x5   { aspect-ratio: 4 / 5; }
.ar-1x1   { aspect-ratio: 1 / 1; }
img[class*="ar-"], video[class*="ar-"] { width: 100%; object-fit: cover; border-radius: var(--v2-radius); }

/* [Bracketed notes] still to confirm: obviously not final copy */
mark.todo {
    background: var(--v2-note-bg); color: var(--v2-note-ink);
    padding: 0.1em 0.35em; border-radius: 0.3em;
    font-family: var(--v2-sans); font-size: 0.88em; font-style: normal; font-weight: 400; letter-spacing: 0;
    box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---- Sections and grounds -----------------------------------------------
   A section opens with a small quiet label. A band is a section on the
   warm ground, edge to edge.                                             */

.v2-section { position: relative; z-index: 1; margin-top: var(--v2-space-xl); padding: 0 var(--v2-pad); }
.band { padding-top: var(--v2-space-xl); padding-bottom: var(--v2-space-xl); }
.band + .band { margin-top: 0; }

/* The warm ground. Like switching a variable mode: the few colours that depend on the ground are re-valued. */
.warm {
    --v2-muted: #5d5545;            /* 6:1 on warm */
    --v2-faint: #8b7c62;            /* 3:1 on warm */
    --v2-soft: rgba(90, 60, 10, 0.07); --v2-dash: rgba(60, 40, 10, 0.34);
    background: var(--v2-warm);
}

/* ---- Home: landing ------------------------------------------------------
   Words only, on the plain ground. Nothing moves here.                   */

.v2-hero {                                   /* only as tall as its words, so the work below is close */
    padding: calc(var(--v2-nav) + clamp(4rem, 9vh, 10rem)) var(--v2-pad) 0;
}
.hero-text { max-width: 120rem; }
.v2 .hero-text p { max-width: none; }
/* The name is not shown here (it is in the nav); it stays as the page's heading for screen readers */
.v2-hero h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.v2 .hero-line {
    max-width: 17ch; margin: 0 0 var(--v2-space-l);
    font-size: var(--v2-t-xl); line-height: 0.98; letter-spacing: -0.045em;
    color: var(--v2-faint); text-wrap: balance;                /* quiet grey; the four words that carry the idea are in ink */
}
.hero-line .key { color: var(--v2-ink); }
.v2 .hero-role { margin-bottom: var(--v2-space-xs); color: var(--v2-text); }
.v2 .hero-links { margin: 0; color: var(--v2-ink); }
.v2-hero + .v2-section { margin-top: clamp(6rem, 11vh, 11rem); }

/* ---- Landing: the rangoli beside the statement (js/rosette.js) ------------ */

.v2-hero.has-rosette { display: grid; grid-template-columns: minmax(0, 1fr) clamp(24rem, 30vw, 50rem); gap: var(--v2-space-l); align-items: center; }
.has-rosette .hero-text { grid-column: 1; grid-row: 1; }
.has-rosette .hero-line { max-width: 16ch; }
.rosette-wrap { grid-column: 2; grid-row: 1; }
.rosette { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; }
.rosette canvas, .rosette-static canvas { display: block; width: 100%; height: 100%; will-change: transform; }
.rosette, .rosette-static { color: var(--v2-ink); }                  /* its dots and lines take this colour */
.rosette-static { display: block; aspect-ratio: 1; cursor: pointer; }
.rosette, .rosette-static { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }   /* a tap shows the ripple, not a grey flash, and answers at once */
.how-mark { width: 9.6rem; margin: 0 0 var(--v2-space-m) -0.5rem; }
@media (max-width: 768px) {
    .v2-hero.has-rosette { grid-template-columns: 1fr; gap: var(--v2-space-m); }
    .rosette-wrap { grid-column: 1; grid-row: 2; max-width: 30rem; }
}

/* ---- Home: how I work -------------------------------------------------- */

.how-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--v2-space-l); }
.how-list h3 { margin-bottom: var(--v2-space-s); font-size: var(--v2-t-m); line-height: 1.12; letter-spacing: -0.03em; }
.how-list p { margin: 0; }

/* ---- Home: selected work (one large image-first row each) ------------- */

.works { display: grid; gap: var(--v2-space-xl); }
.work {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--v2-space-l); align-items: center;
}
.work:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.work:nth-child(even) .work-media { order: 2; }
.work-media { overflow: hidden; border-radius: var(--v2-radius); }
.work-media > * { border-radius: 0 !important; transition: transform var(--v2-slow) var(--v2-ease); }
.work:hover .work-media > *, .work:focus-within .work-media > * { transform: scale(1.03); }
.work h3 { margin-bottom: var(--v2-space-s); font-size: var(--v2-t-m); line-height: 1.12; letter-spacing: -0.03em; }
.v2 a.work-link { text-decoration: none; }
a.work-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }      /* the whole row is the link */
.work .arrow { opacity: 0; transform: translateX(-0.3em); transition: transform var(--v2-quick) var(--v2-ease), opacity var(--v2-quick) var(--v2-ease); }
.v2 .work:hover .arrow, .v2 .work:focus-within .arrow { opacity: 1; transform: none; }
.work .meta { margin-bottom: var(--v2-space-xs); color: var(--v2-ink); }

/* ---- Tags, facts, numbers: plain text, told apart by a middle dot ------ */

.tag-list, .facts { display: flex; flex-wrap: wrap; font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.tag-list li:not(:last-child)::after, .facts li:not(:last-child)::after { content: "·"; margin: 0 0.6em; }
.facts { color: var(--v2-ink); }
.chapter .tag-list { margin: 0 0 var(--v2-space-l); }
.lib-grid .tag-list { margin-top: 0.4rem; }

.num { display: block; font-size: var(--v2-t-l); line-height: 1; letter-spacing: -0.05em; color: inherit; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--v2-space-m); margin-bottom: var(--v2-space-m) !important; }
.stats li { max-width: 20ch; }
.stats .num { margin-bottom: var(--v2-space-s); }

/* ---- Library thumbnails (home strip and library page) ----------------- */

.lib-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--v2-space-m); margin-bottom: var(--v2-space-l); }   /* four at a time: fewer, larger */
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--v2-space-l) var(--v2-space-m); }
.v2 .lib-strip a, .v2 .lib-grid a { display: block; text-decoration: none; color: var(--v2-ink); }
.more, .v2 a.more { color: var(--v2-ink); }
.thumb { overflow: hidden; border-radius: var(--v2-radius); margin-bottom: 1rem; }
.lib-grid .thumb { margin-bottom: var(--v2-space-s); }
.thumb video { display: block; width: 100%; object-fit: cover; }
.thumb > * { border-radius: 0 !important; transition: transform var(--v2-slow) var(--v2-ease); }
.lib-strip a:hover .thumb > *, .lib-grid a:hover .thumb > *,
.lib-strip a:focus-visible .thumb > *, .lib-grid a:focus-visible .thumb > * { transform: scale(1.05); }
.v2 .lib-strip + p { margin-top: var(--v2-space-m); }      /* air between the row and "See all" */
.lib-strip span { display: block; font-size: var(--v2-body); line-height: 1.35; }
.lib-grid h2 { margin: 0 0 var(--v2-space-xs); font-size: var(--v2-t-m); line-height: 1.12; letter-spacing: -0.03em; }   /* same as the homepage card titles (Miki, 23 Nov 2026) */
.lib-grid p { margin: 0; font-size: var(--v2-small); color: var(--v2-text); }
.lib-grid [hidden] { display: none; }

/* Library filter: a row of words; the one in use is dark and underlined */
/* Library filters as pills (Miki, 23 Nov 2026): an outline for each, filled ink for the one that is on */
.chips { display: flex; flex-wrap: wrap; gap: var(--v2-space-xs); margin: var(--v2-space-l) 0; font-size: var(--v2-small); }
.v2 .chips a {
    display: inline-block; padding: 0.7rem 1.6rem; border: 1px solid var(--v2-dash); border-radius: 999px;
    color: var(--v2-text); line-height: 1.3; text-decoration: none;
    transition: background-color var(--v2-quick) var(--v2-ease), border-color var(--v2-quick) var(--v2-ease), color var(--v2-quick) var(--v2-ease);
}
.v2 .chips a:hover { border-color: var(--v2-ink); text-decoration: none; }
.v2 .chips a[aria-current="true"] { background: var(--v2-ink); border-color: var(--v2-ink); color: var(--v2-ground); }

/* ---- Home: outside work ------------------------------------------------- */

/* ---- Involvements: paper, patent, talks, three plain columns ------------- */
.involve-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--v2-space-l); }
.v2 .involve-list .kind { margin: 0 0 var(--v2-space-m); font-size: var(--v2-small); color: var(--v2-muted); }
.v2 .involve-list h3 { margin: 0 0 var(--v2-space-xs); font-family: var(--v2-head); font-size: var(--v2-t-m); font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
.v2 .involve-list .where { margin: 0; font-size: var(--v2-small); line-height: 1.45; color: var(--v2-muted); }
.v2 .involve-list .where + h3 { margin-top: var(--v2-space-l); }      /* two talks in one column: clear air between them */

.outside-grid { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: var(--v2-space-s); margin-bottom: var(--v2-space-l); }
.outside-grid > * { height: clamp(18rem, 26vw, 38rem); }
.outside-grid img { width: 100%; object-fit: cover; border-radius: var(--v2-radius); }
.v2 .outside p { max-width: 30ch; margin: 0; font-size: var(--v2-t-m); font-weight: 400; line-height: 1.2; letter-spacing: -0.03em; color: var(--v2-ink); }

/* ---- Footer: the dark ground, the email set large, a rangoli at its edge -- */

/* The dark ground, another variable mode: light ink on near-black. Used by the footer only. */
.dark {
    --v2-ink: #f7f2e8;              /* 16:1 on night */
    --v2-text: #e9e2d4;
    --v2-muted: #bdb3a1;            /* 8:1 on night */
    --v2-faint: #8f8676;            /* 4.5:1 on night */
    --v2-moss: #d9d16a;             /* focus ring: the favicon's yellow, which shows on dark */
    /* grain.png is the rangoli's grain (same recipe as js/rosette.js): light and dark specks over the colour.
       Drawn at half size so each speck is one screen pixel on high-density displays, as on the rangoli canvas. */
    background: url("../img/v2/grain.png") 0 0 / 128px 128px repeat, var(--v2-night);
    color: var(--v2-text);
}
.v2 .dark a { color: var(--v2-ink); }

.site-footer {
    position: relative; z-index: 1; overflow: hidden;
    margin-top: var(--v2-space-xl); padding: var(--v2-space-xl) var(--v2-pad) var(--v2-space-l);
    font-size: var(--v2-small);
}
.band + .site-footer, main:has(> .band:last-child) + .site-footer { margin-top: 0; }
.v2 .site-footer p { position: relative; margin: 0; max-width: none; }
.v2 .footer-email { margin-bottom: var(--v2-space-s); font-size: var(--v2-t-l); line-height: 1.02; letter-spacing: -0.04em; overflow-wrap: anywhere; color: var(--v2-ink); }
.v2 .footer-email a { text-decoration: none; }
.v2 .footer-email a:hover, .v2 .footer-email a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.v2 .footer-links { color: var(--v2-ink); }
.v2 .footer-links a { text-decoration: none; }
.v2 .footer-links a:hover { text-decoration: underline; }
.footer-rosette { position: absolute; right: -9rem; top: 50%; width: clamp(24rem, 34vw, 46rem); transform: translateY(-50%); opacity: 0.9; }

/* ---- Case study ---------------------------------------------------------
   The left edge is kept wide: it holds the scroller.                     */

.page-case-study { --v2-left: clamp(19rem, 19vw, 28rem); }

.cs-header { padding: calc(var(--v2-nav) + clamp(3rem, 7vh, 8rem)) var(--v2-pad) var(--v2-space-l) var(--v2-left); }
.cs-header h1, .page-head h1 { max-width: 22ch; margin: 0 0 var(--v2-space-m); font-size: var(--v2-t-xl); line-height: 0.98; letter-spacing: -0.045em; }
.cs-hero { margin: 0; padding: 0 var(--v2-pad) 0 var(--v2-left); }
.cs-body { position: relative; z-index: 1; padding: 0 var(--v2-pad) 0 var(--v2-left); }

.lede { max-width: 32ch !important; margin-bottom: var(--v2-space-m) !important; font-size: var(--v2-t-m); font-weight: 400 !important; line-height: 1.2; letter-spacing: -0.03em; color: var(--v2-ink); }
.cs-intro { margin-top: var(--v2-space-xl); }

.chapter { margin-top: var(--v2-space-xl); scroll-margin-top: 11rem; }
/* every second chapter sits on the warm ground, edge to edge */
.chapter.warm { margin-left: calc(-1 * var(--v2-left)); margin-right: calc(-1 * var(--v2-pad)); padding: var(--v2-space-xl) var(--v2-pad) var(--v2-space-xl) var(--v2-left); scroll-margin-top: 0; }
.chapter.warm + .chapter { margin-top: var(--v2-space-xl); }
.chapter h2 { max-width: 22ch; margin-bottom: var(--v2-space-m); font-size: var(--v2-t-l); line-height: 1.02; letter-spacing: -0.04em; }
.chapter figure { margin: 0 0 var(--v2-space-l); }
.v2 .chapter > p { margin-bottom: var(--v2-space-m); }
.chapter figcaption { margin-top: var(--v2-space-s); max-width: var(--v2-measure); font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.chapter > :last-child { margin-bottom: 0; }

.outcome { padding: var(--v2-space-l); border-radius: var(--v2-radius); background: var(--v2-soft); }
.v2 .outcome h2.label { max-width: none; }
.outcome .stats li { color: var(--v2-muted); font-size: var(--v2-small); line-height: 1.4; }
.outcome .num { color: var(--v2-ink); }
.closing-note { color: var(--v2-muted); font-size: var(--v2-small); }
.v2 .cs-closing { margin: var(--v2-space-l) 0 0; }                                  /* the last line of the case study, clear of the band above */

.next-cs { position: relative; z-index: 1; margin-top: var(--v2-space-xl); padding: 0 var(--v2-pad) 0 var(--v2-left); }
.next-cs .meta { margin-bottom: var(--v2-space-s); }
.v2 .next-cs a { display: block; max-width: 26ch; font-size: var(--v2-t-m); line-height: 1.12; letter-spacing: -0.03em; color: var(--v2-ink); text-wrap: balance; }

/* Chapter list for visitors without JavaScript; with it, the scroller below takes over */
.cs-index { margin: var(--v2-space-l) 0 0; font-size: var(--v2-small); }
.cs-index ol { margin: 0; padding-left: 1.2em; }
.js .cs-index { display: none; }

/* Scroller: a ruler of ticks down the left edge. Long ticks are chapters
   (click to jump), the small window shows where you are, and the name of
   the chapter in view sits beside it.                                    */

.minimap {                                   /* drawn in white and blended by difference, so it stays dark on either paper */
    --v2-ink: #fff; --v2-muted: #fff; mix-blend-mode: difference;
    position: fixed; left: 2.8rem; top: 50%; z-index: 90;
    transform: translateY(-50%);
    opacity: 0; pointer-events: none;
    transition: opacity var(--v2-quick) var(--v2-ease);
}
.minimap.is-on { opacity: 1; pointer-events: auto; }
.minimap-track { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.minimap-track i { display: block; width: 1.2rem; height: 1px; background: rgba(255, 255, 255, 0.5); }
.v2 .minimap-track a { position: relative; display: block; width: 2.6rem; height: 1px; background: var(--v2-ink); transition: width var(--v2-quick) var(--v2-ease); }
.v2 .minimap-track a:hover, .v2 .minimap-track a[aria-current="true"] { width: 3.4rem; }
.minimap-track a::after { content: ""; position: absolute; inset: -4px -6px; }      /* easier to click */
.minimap-window {
    position: absolute; left: -0.6rem; top: 0; width: 4.6rem;
    border: 1px solid var(--v2-ink); border-radius: 2px;
    pointer-events: none;
}
.minimap-label {
    position: absolute; left: 5.2rem; top: 0;
    width: calc(var(--v2-left) - 10.4rem);
    font-size: var(--v2-small); line-height: 1.3; color: var(--v2-muted);
    transition: transform var(--v2-quick) var(--v2-ease), opacity var(--v2-quick) var(--v2-ease);
}
.minimap-label:empty { opacity: 0; }

.ar-3x2 { aspect-ratio: 3 / 2; }
.chapter figure a { display: block; }
.chapter.also { margin-top: var(--v2-space-l); }

/* ---- About ----------------------------------------------------------------- */

.about-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--v2-space-l); align-items: start; margin-top: var(--v2-space-l); }
.about-intro img { width: 100%; border-radius: var(--v2-radius); }
.v2 .about-intro .lede { max-width: none !important; }
.about-head.warm { padding-bottom: var(--v2-space-xl); }       /* About opens on the warm ground; Outside of design sits on white; then the dark footer */
.about-head.warm + .v2-section { margin-top: 0; }
.v2.page-about .navbar, .v2.page-library .navbar { background: transparent !important; }   /* no white strip above the warm opening; the blur alone keeps the links readable over both grounds */
.about-links { color: var(--v2-ink); }
.about-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-xl) var(--v2-space-l); }
.about-list img, .about-list video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--v2-radius); margin-bottom: var(--v2-space-m); }
.about-list h3 { margin-bottom: var(--v2-space-xs); font-family: var(--v2-head); font-size: var(--v2-t-m); font-weight: 500; line-height: 1.12; letter-spacing: -0.03em; }
.about-list p { margin-bottom: var(--v2-space-xs); }
/* the two players share one box the same shape as the photos, so headings line up across the row */
.songs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-s); aspect-ratio: 16 / 10; margin-bottom: var(--v2-space-m); }
.songs iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 12px; }

/* ---- Case study visual: the interaction system (chapter 1 of the training suite) ----
   Three plates, drawn and driven by js/interaction.js:
     1. the VR clip beside a drawing of the rule it follows, in step
     2. when the system gives a hint and when it stays quiet
     3. every action as an abstract tile, looping through the four states, beside the controller clips
     4. two wayfinding clips: the out-of-view hint and gaze-activated teleportation
   The four state colours are the product's own (yellow, dark, blue, green), so they sit apart from the site's palette.
   Everything is scoped under .ix so nothing here can leak into the rest of the site.               */

.ix { margin: var(--v2-space-l) 0; }
.ix {--discover: #f5b800; --educate: #24313a; --feedback: #1273e6; --success: #10b877; --off: #c9ccc8; }
.ix .plate {margin-top: var(--v2-space-l); }
.ix .plate > h3 {margin: 0 0 var(--v2-space-xs); font: 500 var(--v2-t-m)/1.12 var(--v2-head); letter-spacing: -0.03em; color: var(--v2-ink); }
.ix .plate > p {margin: 0 0 var(--v2-space-m); color: var(--v2-text); }
.ix .controls {display: flex; gap: 2rem; margin-top: var(--v2-space-s); font-size: var(--v2-small); }
.ix .textbtn {padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--v2-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(13, 17, 20, 0.35); }
.ix .textbtn:hover {text-decoration-color: currentColor; }
.ix .duo {display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--v2-space-s); }
.ix .duo video {display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--v2-radius); background: #dfe2de; }
.ix .mirror {position: relative; border-radius: var(--v2-radius); background: var(--v2-soft); overflow: hidden; min-height: 26rem; }
.ix .mirror .stage {position: absolute; inset: 0 0 9.5rem 0; }
.ix .obj {position: absolute; left: 62%; top: 46%; width: 9rem; height: 9rem; margin: -4.5rem 0 0 -4.5rem; border-radius: 1.4rem; background: #fff; border: 0.5rem solid var(--off); transition: border-color 380ms var(--v2-ease), box-shadow 380ms var(--v2-ease); }
.ix .hand {position: absolute; left: 0; top: 0; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; border-radius: 50%; background: var(--v2-ink); transition: transform 700ms var(--v2-ease); transform: translate(var(--hx, 20%), var(--hy, 78%)); }
.ix .stage .hand {left: 0; top: 0; }
.ix .reach {position: absolute; left: 62%; top: 46%; width: 21rem; height: 21rem; margin: -10.5rem 0 0 -10.5rem; border-radius: 50%; border: 1px dashed rgba(13, 17, 20, 0.3); opacity: 0; transition: opacity 380ms var(--v2-ease); }
.ix .hint {position: absolute; left: 62%; top: 46%; transform: translate(-50%, -9.6rem) scale(0.9); padding: 0.7rem 1.4rem; border-radius: 0.8rem; background: var(--educate); color: #fff; font-size: var(--v2-small); font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity 300ms var(--v2-ease), transform 300ms var(--v2-ease); }
.ix .timer {position: absolute; left: 62%; top: 46%; width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem; border-radius: 50%; background: conic-gradient(var(--feedback) calc(var(--hold, 0) * 1turn), rgba(18, 115, 230, 0.16) 0); opacity: 0; transition: opacity 300ms var(--v2-ease); }
.ix .timer::after {content: ""; position: absolute; inset: 0.6rem; border-radius: 50%; background: #fff; }
.ix .beam {position: absolute; left: 18%; top: 30%; width: 44%; height: 44%; border: 0.35rem solid var(--bad, #e2483d); border-color: var(--beamc, #e2483d) transparent transparent transparent; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: 0; transition: opacity 300ms var(--v2-ease), border-color 300ms var(--v2-ease); }
.ix .land {position: absolute; left: 62%; top: 80%; width: 6rem; height: 2rem; margin: -1rem 0 0 -3rem; border-radius: 50%; border: 0.35rem solid var(--beamc, #e2483d); opacity: 0; transition: opacity 300ms var(--v2-ease), border-color 300ms var(--v2-ease); }
.ix .say {position: absolute; left: 2rem; right: 2rem; bottom: 1.8rem; }
.ix .say b {display: block; font: 500 var(--v2-t-m)/1.1 var(--v2-head); letter-spacing: -0.03em; color: var(--v2-ink); }
.ix .say span {display: block; margin-top: 0.4rem; font-size: var(--v2-small); line-height: 1.4; color: var(--v2-muted); min-height: 2.8em; }
.ix .mirror[data-phase="move"] .beam, .ix .mirror[data-phase="move"] .land {opacity: 1; }
.ix .mirror[data-phase="move"] .obj {opacity: 0.35; }
.ix .mirror[data-phase="discover"] .obj, .ix .mirror[data-phase="educate"] .obj {border-color: var(--discover); }
.ix .mirror[data-phase="discover"] .obj {animation: flash 900ms ease-in-out infinite alternate; }
.ix .mirror[data-phase="educate"] .hint {opacity: 1; transform: translate(-50%, -9.6rem); }
.ix .mirror[data-phase="educate"] .reach, .ix .mirror[data-phase="feedback"] .reach {opacity: 1; }
.ix .mirror[data-phase="feedback"] .obj, .ix .mirror[data-phase="hold"] .obj {border-color: var(--feedback); }
.ix .mirror[data-phase="hold"] .timer {opacity: 1; }
.ix .mirror[data-phase="success"] .obj {border-color: var(--success); box-shadow: 0 0 0 0.9rem rgba(16, 184, 119, 0.18); }
@keyframes flash { from { border-color: var(--discover); } to { border-color: #fde7a0; } }
.ix .rail {display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6rem; margin: var(--v2-space-s) 0 0; padding: 0; list-style: none; }
.ix .rail button {display: block; width: 100%; padding: 1.2rem 0 0; border: 0; border-top: 0.4rem solid var(--off); background: none; cursor: pointer; text-align: left; font: 500 var(--v2-small)/1.3 var(--v2-sans); color: var(--v2-muted); transition: border-color 300ms var(--v2-ease), color 300ms var(--v2-ease); }
.ix .rail button small {display: block; font-weight: 400; font-size: 1.3rem; }
.ix .rail li[data-on="true"] button {color: var(--v2-ink); border-top-color: var(--c); }
.ix .cases {display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v2-space-s); margin: 0; padding: 0; list-style: none; }
.ix .case {border-radius: var(--v2-radius); background: var(--v2-soft); padding: 1.6rem 1.6rem 2rem; }
.ix .mini {position: relative; height: 13rem; margin-bottom: 1.2rem; }
.ix .mini .o {position: absolute; left: 50%; top: 58%; width: 5.6rem; height: 5.6rem; margin: -2.8rem 0 0 -2.8rem; border-radius: 1rem; background: #fff; border: 0.4rem solid var(--discover); }
.ix .mini .h {position: absolute; left: 50%; top: 58%; transform: translate(-50%, -6rem); padding: 0.4rem 1rem; border-radius: 0.6rem; background: var(--educate); color: #fff; font-size: 1.3rem; font-weight: 500; white-space: nowrap; opacity: 0; }
.ix .mini .p {position: absolute; left: 50%; top: 58%; width: 1.8rem; height: 1.8rem; margin: -0.9rem 0 0 -0.9rem; border-radius: 50%; background: var(--v2-ink); }
.ix .mini .w {position: absolute; left: 50%; top: 58%; width: 8.4rem; height: 8.4rem; margin: -4.2rem 0 0 -4.2rem; border-radius: 50%; border: 0.3rem solid transparent; border-top-color: var(--v2-ink); opacity: 0; }
.ix .case b {display: block; font-weight: 500; color: var(--v2-ink); line-height: 1.3; }
.ix .case span {display: block; margin-top: 0.4rem; font-size: var(--v2-small); line-height: 1.4; color: var(--v2-muted); }
.ix .case .p {animation: 6s var(--v2-ease) infinite; }
.ix .case .h {animation: 6s var(--v2-ease) infinite; }
.ix .case .w {animation: 6s linear infinite; }
.ix .case .o {animation: 6s var(--v2-ease) infinite; }
.ix .c-first .p {animation-name: come; }
.ix .c-first .h {animation-name: hint-soon; }
.ix .c-known .p {animation-name: come; }
.ix .c-known .w {animation-name: wait; }
.ix .c-known .h {animation-name: hint-late; }
.ix .c-other .o {border-color: #f2dfa6; }
.ix .c-other .p {animation-name: come; }
.ix .c-other .w {animation-name: wait; }
.ix .c-other .h {animation-name: hint-late; }
.ix .c-icon .o, .ix .c-icon .p, .ix .c-icon .h, .ix .c-icon .w {display: none; }
.ix .dot {position: absolute; top: 50%; width: 3.4rem; height: 3.4rem; margin-top: -1.7rem; border-radius: 50%; }
.ix .dot.task {left: 24%; background: var(--discover); animation: 6s var(--v2-ease) infinite press; }
.ix .dot.rest {left: 58%; background: var(--feedback); }
@keyframes come { 0%, 8% { transform: translate(-7rem, 5rem); } 30%, 88% { transform: translate(-2.6rem, 2.2rem); } 100% { transform: translate(-7rem, 5rem); } }
@keyframes hint-soon { 0%, 28% { opacity: 0; } 36%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes hint-late { 0%, 62% { opacity: 0; } 70%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes wait { 0%, 30% { opacity: 0; transform: rotate(0); } 34% { opacity: 1; transform: rotate(0); } 62% { opacity: 1; transform: rotate(360deg); } 66%, 100% { opacity: 0; transform: rotate(360deg); } }
@keyframes press { 0%, 40% { background: var(--discover); box-shadow: 0 0 0 0 rgba(245, 184, 0, 0.3); } 50%, 62% { background: var(--discover); box-shadow: 0 0 0 0.9rem rgba(245, 184, 0, 0.3); } 70%, 92% { background: var(--feedback); box-shadow: 0 0 0 0 rgba(245, 184, 0, 0); } 100% { background: var(--discover); } }
.ix .families {display: grid; gap: var(--v2-space-l); }
.ix .family {display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--v2-space-m); align-items: start; }
.ix .family video {display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--v2-radius); background: #e9e7e1; }
.ix .family h3 {margin: 1.2rem 0 0.2rem; font: 500 var(--v2-body)/1.3 var(--v2-sans); color: var(--v2-ink); }
.ix .family .what {margin: 0; font-size: var(--v2-small); color: var(--v2-muted); }
.ix .tiles {display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.ix .tile {position: relative; aspect-ratio: 1; border-radius: var(--v2-radius); background: var(--v2-soft); padding: 1.2rem; display: flex; align-items: flex-end; font-size: var(--v2-small); font-weight: 500; color: var(--v2-ink); line-height: 1.2; }
.ix .g {position: absolute; left: 50%; top: 44%; width: 4.2rem; height: 4.2rem; margin: -2.1rem 0 0 -2.1rem; border-radius: 0.8rem; background: #fff; border: 0.35rem solid var(--c, var(--discover)); transition: border-color 320ms var(--v2-ease), background-color 320ms var(--v2-ease); }
.ix .tile[data-g="ring"] .g {border-style: dashed; border-radius: 50%; background: none; }
.ix .tile[data-g="dot"] .g {border-radius: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; background: var(--c, var(--discover)); }
.ix .tile[data-g="beam"] .g {width: 2.6rem; height: 5.4rem; margin: -3rem 0 0 -1.3rem; border: 0; border-radius: 0 0 1.3rem 1.3rem / 0 0 0.6rem 0.6rem; background: linear-gradient(to bottom, transparent, var(--c, var(--discover))); }
.ix .tile[data-g="arc"] .g {border-radius: 50% 50% 0 0 / 100% 100% 0 0; height: 2.4rem; margin-top: -1.2rem; border-bottom-width: 0; }
.ix .tile[data-g^="chev"] .g::after {content: "\203A\203A\203A"; position: absolute; font-size: 2rem; line-height: 1; letter-spacing: -0.1em; color: var(--c, var(--discover)); transition: color 320ms var(--v2-ease); }
.ix .tile[data-g="chev-r"] .g::after {left: 100%; top: 50%; transform: translate(0.6rem, -55%); }
.ix .tile[data-g="chev-l"] .g::after {right: 100%; top: 50%; transform: translate(-0.6rem, -55%) scaleX(-1); }
.ix .tile[data-g="chev-u"] .g::after {left: 50%; bottom: 100%; transform: translate(-50%, -0.2rem) rotate(-90deg); }
.ix .tile[data-g="chev-d"] .g::after {left: 50%; top: 100%; transform: translate(-50%, 0.2rem) rotate(90deg); }
.ix .tile .hintdot {position: absolute; left: 50%; top: 44%; width: 3.4rem; height: 1.2rem; margin: -4.6rem 0 0 -1.7rem; border-radius: 0.4rem; background: var(--educate); opacity: 0; transform: translateY(0.4rem); transition: opacity 320ms var(--v2-ease), transform 320ms var(--v2-ease); }
.ix .tile[data-stage="1"] .hintdot {opacity: 1; transform: none; }
.ix .tile[data-stage="2"] {--c: var(--feedback); }
.ix .tile[data-stage="3"] {--c: var(--success); }
.ix .key {display: flex; flex-wrap: wrap; gap: 0.6rem 2.4rem; margin: 0 0 var(--v2-space-m); padding: 0; list-style: none; font-size: var(--v2-small); color: var(--v2-muted); }
.ix .key i {display: inline-block; width: 1.2rem; height: 1.2rem; margin-right: 0.6rem; border-radius: 0.3rem; vertical-align: -0.1rem; }
@media (max-width: 900px) {
    .ix .family {grid-template-columns: 1fr; }
}
.ix.paused .case *, .ix.paused .mirror .obj {animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    .ix .case *, .ix .mirror .obj {animation: none !important; }
    .ix .case .h {opacity: 1; }
}
@media (max-width: 900px) {
    .ix .duo {grid-template-columns: 1fr; }
    .ix .cases {grid-template-columns: 1fr 1fr; }
    .ix .rail {grid-template-columns: repeat(3, 1fr); }
}

.ix .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-s); }
.ix .pair figure { margin: 0; }
.ix .pair video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--v2-radius); background: #dfe2de; }
.ix .pair figcaption { margin-top: 1.2rem; max-width: 44ch; font-size: var(--v2-small); line-height: 1.45; color: var(--v2-muted); }
.ix .pair figcaption b { display: block; margin-bottom: 0.2rem; font-size: var(--v2-body); font-weight: 500; color: var(--v2-ink); }
@media (max-width: 900px) { .ix .pair { grid-template-columns: 1fr; } }

/* Two clips side by side inside a chapter figure, with their own Pause control */
.clip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-s); }
.clip-pair.three { grid-template-columns: repeat(3, 1fr); }
.clip-pair video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--v2-radius); background: #dfe2de; }
/* Clips stacked at full width, each with its own line of caption */
.clip-stack { display: grid; gap: var(--v2-space-l); }
.clip-stack video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--v2-radius); background: #dfe2de; }
.clip-stack + figcaption { margin-top: var(--v2-space-m); }
.v2 .clip-stack .cap { margin: var(--v2-space-s) 0 0; max-width: var(--v2-measure); font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.v2 .clip-controls { margin: var(--v2-space-s) 0 0; font-size: var(--v2-small); }
.clip-pause { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--v2-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(13, 17, 20, 0.35); }
.clip-pause:hover { text-decoration-color: currentColor; }
@media (max-width: 768px) { .clip-pair, .clip-pair.three { grid-template-columns: 1fr; } }

/* A stepped gallery: one frame at a time, with a row of labels that says where you are and jumps to each */
.stepper .frames { position: relative; aspect-ratio: 1600 / 899; overflow: hidden; border-radius: var(--v2-radius); background: #24313a; }
.stepper .frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms var(--v2-ease); }
.stepper .frames img.on { opacity: 1; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: var(--v2-space-s) 0 0; padding: 0; list-style: none; }
.steps button { display: block; width: 100%; padding: 1.2rem 0 0; border: 0; border-top: 0.4rem solid rgba(13, 17, 20, 0.16); background: none; cursor: pointer; text-align: left; font: 500 var(--v2-small)/1.3 var(--v2-sans); color: var(--v2-muted); transition: border-color 300ms var(--v2-ease), color 300ms var(--v2-ease); }
.steps button small { display: block; margin-top: 0.2rem; font-weight: 400; font-size: 1.3rem; line-height: 1.35; }
.steps li[data-on="true"] button { color: var(--v2-ink); border-top-color: var(--v2-ink); }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr 1fr; } }

/* The dashboard, drawn in code: one question followed down four levels (chapter 3 of the training suite).
   Colours are the product's: navy, blue and grey for progress; green, red and grey for answers.
   Everything grows from zero when its level comes on, so each level reads as data arriving.          */
.dash .frames { aspect-ratio: 16 / 9; background: var(--v2-soft); font-size: clamp(1.1rem, 1.25vw, 1.7rem); color: var(--v2-ink); --navy: #0b2f6b; --blue: #1f6fe5; --grey: #b3bac4; }
.dash .lvl { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 1.6em; padding: 2.4em 2.6em; opacity: 0; transform: scale(1.04); transition: opacity 600ms var(--v2-ease), transform 900ms var(--v2-ease); pointer-events: none; }
.dash .lvl.on { opacity: 1; transform: none; }
.v2 .dash .crumb { margin: 0; max-width: none; font: 500 1.5em/1.2 var(--v2-head); letter-spacing: -0.02em; }
.dash .crumb span { margin-left: 0.6em; font: 400 0.62em/1 var(--v2-sans); letter-spacing: 0; color: var(--v2-muted); }
.dash small { display: block; font-size: 0.82em; line-height: 1.3; color: var(--v2-muted); }
.dash em { display: block; margin-top: 0.7em; font-style: normal; font-size: 0.74em; line-height: 1.3; color: var(--v2-ink); }
.dash em span { margin-left: 0.9em; color: var(--v2-muted); }
.dash .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8em; }
.dash .kpis > div, .dash .course, .dash .rows, .dash .qa > div { border-radius: 0.5em; background: #fff; padding: 1em 1.1em; }
.dash .kpis b { display: block; margin-top: 0.3em; font: 500 1.9em/1 var(--v2-head); letter-spacing: -0.03em; }
.dash .courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8em; }
.dash .course small { margin-bottom: 0.8em; color: var(--v2-ink); font-weight: 500; }
.dash .pick { box-shadow: inset 0 0 0 0.16em var(--v2-ink); }                      /* the one we follow down to the next level */
.dash .split { display: flex; height: 1.1em; border-radius: 0.25em; overflow: hidden; background: #e7e9ec; }
.dash .split u { display: block; width: 0; background: var(--navy); transition: width 1100ms var(--v2-ease) 350ms; }
.dash .split u:nth-child(2) { background: var(--blue); } .dash .split u:nth-child(3) { background: var(--grey); }
.dash .split.q u { background: #2fbf5b; } .dash .split.q u:nth-child(2) { background: #f0503f; } .dash .split.q u:nth-child(3) { background: #7c8792; }
.dash .lvl.on .split u { width: var(--w); }
.dash .lvl.on .split.post u { transition-delay: 1300ms; }                           /* the "after" bar answers the "before" bar */
.dash .bars { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2em; align-items: end; border-radius: 0.5em; background: #fff; padding: 1.4em 1.6em 1em; }
.dash .bars > div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.dash .bars i { display: block; height: 0; border-radius: 0.25em 0.25em 0 0; background: #5aa9c9; transition: height 1100ms var(--v2-ease) 350ms; }
.dash .lvl.on .bars i { height: var(--h); }
.dash .bars small { margin-top: 0.7em; }
.dash .rows { display: grid; padding: 0.4em 1.1em; }
.dash .rows > div { display: grid; grid-template-columns: 2.2fr 1fr 2fr; align-items: center; gap: 1em; padding: 0.62em 0.6em; border-radius: 0.35em; font-size: 0.9em; }
.dash .rows .head { font-size: 0.78em; color: var(--v2-muted); }
.dash .rows span:last-child { display: flex; align-items: center; gap: 0.7em; }
.dash .rows span i { display: block; flex: none; width: 0; max-width: 60%; height: 0.55em; border-radius: 0.3em; background: var(--blue); transition: width 1000ms var(--v2-ease) 350ms; }
.dash .lvl.on .rows span i { width: calc(var(--w) * 0.6); }
.dash .qa { display: grid; gap: 0.8em; }
.dash .qa small { margin-bottom: 0.8em; color: var(--v2-ink); font-weight: 500; }
.dash .qa .split { height: 1.6em; }
.dash .sample { position: absolute; right: 1.4em; bottom: 1.1em; font-size: 0.74em; color: var(--v2-muted); }
@media (max-width: 768px) { .dash .frames { aspect-ratio: 2 / 3; font-size: 1.3rem; } .dash .kpis { grid-template-columns: 1fr 1fr; } .dash .courses { grid-template-columns: 1fr; } .dash .rows > div { grid-template-columns: 2fr 1fr 1.4fr; } }
@media (prefers-reduced-motion: reduce) { .dash .lvl { transform: none; } }

/* ---- Stubs and library page -------------------------------------------- */

.page-head { padding: calc(var(--v2-nav) + clamp(3rem, 7vh, 8rem)) var(--v2-pad) 0; }
.stub { min-height: 50vh; }
.lib-body { padding: 0 var(--v2-pad); }
/* Library opens on the warm ground (title, intro, filters); the projects sit on white (Miki, 23 Nov 2026) */
.lib-head.warm { padding-bottom: var(--v2-space-l); }
.lib-head .chips { margin-bottom: 0; }
.lib-head.warm + .lib-body { padding-top: var(--v2-space-l); }

/* ---- Motion: content rises in softly, like mist clearing ---------------
   Only when JavaScript is running (.js on <html>) and motion is welcome,
   so the page is never left hidden.                                      */

@media (prefers-reduced-motion: no-preference) {
    .js [data-rise] {
        opacity: 0;
        transform: translateY(1.4rem);
        filter: blur(6px);
        transition:
            opacity var(--v2-slow) var(--v2-ease),
            transform var(--v2-slow) var(--v2-ease),
            filter var(--v2-slow) var(--v2-ease);
        transition-delay: calc(var(--i, 0) * 90ms);
    }
    .js [data-rise].is-in { opacity: 1; transform: none; filter: none; }

    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 420ms; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .v2 *, .v2 *::before, .v2 *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
    .work-media > *, .thumb > * { transform: none !important; }
}

/* ---- Smaller screens ---------------------------------------------------- */

@media (max-width: 1100px) {
    .lib-strip { grid-template-columns: repeat(4, 1fr); }
    .v2 .nav-links { gap: 2.2rem; }
}

@media (max-width: 768px) {
    :root { --v2-space-xl: 9rem; --v2-space-l: 3.6rem; --v2-nav: 7rem; }
    .page-case-study { --v2-left: var(--v2-pad); }
    .minimap { display: none; }                         /* no room for a side ruler on a phone */

    .v2 .navbar { padding: 1.6rem var(--v2-pad); gap: 1.2rem; align-items: center; }
    .v2 .nav-name { position: relative; z-index: 2; white-space: nowrap; }
    /* Phone menu: a plain "Menu" word opens a full-screen cream panel with the links set large */
    .js .nav-toggle {
        display: block; position: relative; z-index: 2; margin: -1rem -1rem -1rem 0; padding: 1rem;
        border: 0; background: none; font: 500 var(--v2-small)/1.3 var(--v2-sans); color: var(--v2-ink); cursor: pointer;
    }
    .js .v2 .nav-links {
        display: none; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 1;
        flex-direction: column; align-items: flex-start; gap: var(--v2-space-s);
        padding: calc(var(--v2-nav) + var(--v2-space-l)) var(--v2-pad) var(--v2-space-l);
        background: var(--v2-warm); overflow-y: auto;
    }
    .js .v2 .nav-links a { font-family: var(--v2-head); font-size: var(--v2-t-l) !important; font-weight: 500; line-height: 1.1; letter-spacing: -0.04em; }
    .js .v2 .nav-links a.nav-email { margin-top: auto; font-family: var(--v2-sans); font-size: var(--v2-small) !important; letter-spacing: 0; }
    .js .v2 .navbar.is-open { background: var(--v2-warm) !important; }
    .js .v2 .navbar.is-open .nav-links { display: flex; }
    .js body.menu-open { overflow: hidden; }
    /* without JavaScript the links stay a single row, as before */
    html:not(.js) .v2 .nav-links { gap: 1.8rem; }
    html:not(.js) .v2 .nav-links a.nav-email { display: none; }
    html:not(.js) .nav-extra { display: none; }
    /* footer: the rangoli sits above the email as a small mark, so it never covers it */
    .footer-rosette { position: static; transform: none; width: 14rem; margin: 0 0 var(--v2-space-m) -0.6rem; opacity: 0.9; }

    .how-list { grid-template-columns: 1fr; gap: var(--v2-space-l); }
    .involve-list { grid-template-columns: 1fr; gap: var(--v2-space-l); }
    .work, .work:nth-child(even) { grid-template-columns: 1fr; gap: var(--v2-space-m); }
    .work:nth-child(even) .work-media { order: 0; }
    .stats { grid-template-columns: 1fr; gap: var(--v2-space-l); }
    .stats li { max-width: none; }
    .lib-strip { grid-template-columns: repeat(2, 1fr); }
    .lib-grid { grid-template-columns: 1fr; }
    .about-intro, .about-list, .songs { grid-template-columns: 1fr; }
    .songs { aspect-ratio: auto; }
    .songs iframe { height: 352px; }
    .outside-grid { grid-template-columns: 1fr 1fr; }
    .outside-grid > :first-child { grid-column: 1 / -1; }
    .outcome { padding: var(--v2-space-m); }
    /* main.css forces heading sizes on phones with !important, so these must answer in kind */
    .cs-header h1, .page-head h1 { font-size: var(--v2-t-xl) !important; }
    .v2-section > h2, .v2 h2.label, .chapter h2 { font-size: var(--v2-t-l) !important; }
    .lib-grid h2 { font-size: var(--v2-t-m) !important; }
}

/* ---- Earlier projects set as case studies (Broadcast first) --------------- */
.cs-hero.duo { display: flex; gap: var(--v2-space-s); align-items: flex-start; }
.cs-hero.duo > div { flex-basis: 0; min-width: 0; }
.cs-hero.duo video, .chapter figure > video, .chapter figure > img, .pic-pair img { display: block; width: 100%; height: auto; border-radius: var(--v2-radius); }
.pic-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-s); align-items: start; }
.chapter figure.mid { max-width: 96rem; }                      /* small clips and near-square diagrams: not stretched to the full column */
.v2 .chapter h3.sub { margin: var(--v2-space-l) 0 var(--v2-space-m); font-family: var(--v2-head); font-size: var(--v2-body) !important; font-weight: 600; letter-spacing: -0.01em; }
.v2 .chapter .pull { max-width: 24ch; margin: var(--v2-space-l) 0; font-family: var(--v2-head); font-size: var(--v2-t-m); line-height: 1.15; letter-spacing: -0.03em; color: var(--v2-muted); }
.v2 .chapter blockquote.pull { padding: 0; border: 0; }
.v2 .chapter blockquote.pull p { max-width: none; margin: 0 0 var(--v2-space-s); font: inherit; color: inherit; }
.v2 .chapter blockquote.pull footer { font-family: var(--v2-sans); font-size: var(--v2-small); letter-spacing: 0; }
.credits { margin-top: var(--v2-space-m) !important; max-width: var(--v2-measure); font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.credits li { margin-bottom: var(--v2-space-xs); }
.credits b { margin-right: 0.5em; font-weight: 500; color: var(--v2-ink); }
.v2 .credits a { color: var(--v2-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.lede b { font-weight: 500; }
@media (max-width: 768px) {
    .cs-hero.duo { flex-direction: column; }
    .cs-hero.duo > div { flex-basis: auto; width: 100%; }
    .pic-pair { grid-template-columns: 1fr; }
}

/* Older pages converted to case studies by rule (casestudy() in the generator) */
.pic-grid { display: grid; gap: var(--v2-space-s); align-items: start; }
.pic-grid.n1 { grid-template-columns: 1fr; } .pic-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.pic-grid.n3 { grid-template-columns: repeat(3, 1fr); } .pic-grid.n4 { grid-template-columns: repeat(4, 1fr); }
.pic-grid img, .pic-grid video, .chapter figure > a > img, .cs-intro figure > img, .cs-intro figure > video { display: block; width: 100%; height: auto; border-radius: var(--v2-radius); }
.cs-intro figure { margin: var(--v2-space-m) 0; }
.chapter figure .embed, .cs-hero .embed, .cs-intro .embed { border-radius: var(--v2-radius); overflow: hidden; }
.chapter figure .gallery { margin: 0; }
.chapter figure > video, .cs-intro figure > video { max-width: var(--mw, 100%); }
.earlier-body video, .earlier-body img { max-width: 100%; height: auto; }
.embed > iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.chapter.untagged h2 { margin-bottom: var(--v2-space-l); }
.chapter figcaption, .chapter p, .chapter li { overflow-wrap: anywhere; }   /* long pasted URLs in old captions can wrap on phones */
.v2 .chapter p.cap { font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.v2 .chapter .cs-list, .v2 .cs-intro .cs-list { max-width: var(--v2-measure); margin: 0 0 var(--v2-space-m); padding-left: 1.2em; font-size: var(--v2-body); line-height: 1.6; }
.v2 .cs-list li { margin-bottom: var(--v2-space-xs); }
.v2 .chapter a:not(.image-link), .v2 .cs-intro p a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.v2 .chapter .earlier-body h1 { font-size: var(--v2-t-m) !important; line-height: 1.12; letter-spacing: -0.03em; max-width: 26ch; }
.v2 .chapter .earlier-body h2 { font-size: var(--v2-body) !important; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.chapter .earlier-body .row:last-child { margin-bottom: 0; }
.chapter > .earlier-body + .earlier-body, .chapter > figure + .earlier-body, .chapter > p + .earlier-body { margin-top: var(--v2-space-l); }
.old-credits small { font-size: inherit; }
.old-credits img { width: 6rem !important; display: block; margin: var(--v2-space-xs) 0; }
@media (max-width: 768px) {
    .pic-grid.n2 { grid-template-columns: 1fr; }
    .pic-grid.n3, .pic-grid.n4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Earlier project pages: the old pages' content, re-housed ------------ */
/* Their words, images and column grid (css/main.css .row / .col-N) are kept; only the type and colour change. */
.v2 .earlier-head .lede { max-width: 30ch !important; }
.earlier-head + .cs-hero { margin-top: var(--v2-space-l); }
.earlier-head + .earlier { margin-top: var(--v2-space-l); }
.earlier-body { font-size: var(--v2-body); line-height: 1.6; color: var(--v2-soft-ink, var(--v2-ink)); }
.v2 .earlier-body h1 { margin: 0; max-width: 24ch; font-family: var(--v2-head); font-size: var(--v2-t-l) !important; font-weight: 500; line-height: 1.04; letter-spacing: -0.04em; color: var(--v2-ink); }
.v2 .earlier-body h2 { margin: 0; max-width: none; font-family: var(--v2-head); font-size: var(--v2-t-m) !important; font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; color: var(--v2-ink); }
.v2 .earlier-body h2 b, .v2 .earlier-body h1 b { font-weight: 600; }
.v2 .earlier-body h2.label { margin: var(--v2-space-xl) 0 var(--v2-space-l); font-size: var(--v2-t-l) !important; line-height: 1.02; letter-spacing: -0.04em; color: var(--v2-faint); text-align: left; }
.v2 .earlier-body small { font-size: var(--v2-small); line-height: 1.5; color: var(--v2-muted); }
.v2 .earlier-body small b { color: var(--v2-ink); font-weight: 500; }
.v2 .earlier-body b { font-weight: 600; }
.v2 .earlier-body a:not(.image-link) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.earlier-body img, .earlier-body video, .earlier-body iframe { border-radius: var(--v2-radius); }
.earlier-body .row { margin-bottom: var(--v2-space-m); flex-wrap: wrap; }     /* a few old rows add up to more than 12 columns */
.earlier-body { overflow-wrap: anywhere; }
.earlier-body small { max-width: 100%; }
.v2-section.earlier { overflow-x: clip; }
.earlier-body p { max-width: none; }

/* ---- Captions at body size (Miki, 23 Nov 2026) ------------------------------
   Captions under pictures and clips read at the body size (18px), still in the muted colour.
   Labels, tags, facts, nav and filters stay small. */
.v2 .about-list .meta,
.v2 .chapter figcaption, .v2 .chapter p.cap, .v2 .clip-stack .cap,
.v2 .ix .pair figcaption, .v2 .earlier-body small {
    font-size: var(--v2-body);
    line-height: 1.5;
}
/* On About, the line under each "Outside of design" story is part of the story: same colour as the text above it */
.v2 .about-list .meta { color: var(--v2-text); }

/* ---- Links in running text are bold (Miki, 23 Nov 2026) ---------------------
   Every underlined link inside sentences, captions and credits. The nav, footer, filters,
   cards and section links keep their own look. */
.v2 p a, .v2 .credits a, .v2 .chapter a:not(.image-link), .v2 .cs-intro p a, .v2 .earlier-body a:not(.image-link) {
    font-weight: 600;
}
.v2 .site-footer p a, .v2 .next-cs a, .v2 .chapter .tag-list a { font-weight: inherit; }
