/* metacase.css — the v2 homepage. A shared 3D stage (fixed canvas, behind the content)
 * draws the scenes; this sheet lays the page over it on one alignment system:
 *   --mc-gutter   the left edge every title, caption, rail and card row starts from
 *   --mc-pin-top  where pinned scenes begin (under the header and the section nav)
 * Scoped to body.mc-home. Load after v2.css and arena.css. */

@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root, [data-theme="dark"] {
  --mc-violet: oklch(74% 0.13 295);
  --mc-green: oklch(78% 0.13 155);
  --mc-rose: oklch(74% 0.14 15);
  --mc-blue: oklch(74% 0.12 250);
  --mc-glass: color-mix(in oklab, var(--surface-1) 78%, transparent);
  --mc-line: color-mix(in oklab, var(--text-primary) 15%, transparent);
}
[data-theme="light"] {
  --mc-violet: oklch(52% 0.15 295);
  --mc-green: oklch(52% 0.13 155);
  --mc-rose: oklch(56% 0.16 15);
  --mc-blue: oklch(52% 0.13 250);
  --mc-glass: color-mix(in oklab, var(--surface-1) 88%, transparent);
  --mc-line: color-mix(in oklab, var(--text-primary) 14%, transparent);
}
:root {
  --mc-gutter: max(24px, calc((100vw - var(--content-max)) / 2 + 24px));
  --mc-pin-top: calc(var(--mc-hh, 64px) + 48px);
  --mc-gap: 24px;
}

/* ---------- Base: the page is transparent so the stage shows through ---------- */
html:has(body.mc-home) { background: var(--bg-canvas); }
.mc-home * { box-sizing: border-box; }
html .mc-home { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.mc-home { margin: 0; overflow-x: clip; background: transparent; color: var(--text-primary); font: 400 17px/1.6 var(--font-sans); }
html[lang="zh-CN"] body.mc-home { line-height: 1.75; }
:where(.mc-home) :where(h1, h2, h3) { margin: 0; text-wrap: balance; }
:where(.mc-home) :where(p, figure, ol, ul) { margin: 0; }
:where(.mc-home) p { text-wrap: pretty; }
.mc-home a { color: inherit; }
.mc-home ::selection { background: var(--track-1-soft); }
.mc-home :focus-visible { outline: 2px solid var(--track-1); outline-offset: 3px; border-radius: 6px; }
.mc-home em { font-style: normal; }
.mc-stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; display: block; }
/* the courier's frame: the whole window, invisible itself; the stage draws the travelling book into it */
.mc-courier { position: fixed; inset: 0; pointer-events: none; visibility: hidden; }
.mc-home .mc-stage-top { z-index: 30; } /* above the page text, below the section nav (40) and header (50) */
.mc-home main, .mc-home .v2-footer { position: relative; z-index: 1; }
.mc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Type scale ---------- */
.mc-label { display: flex; align-items: center; gap: 10px; color: var(--text-tertiary); }
.mc-label > span { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--mc-line); color: var(--text-primary); font-size: 11px; }
.mc-label b { font-weight: 400; }
.mc-home h2 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 650; }
.mc-home h2 > span, .mc-home h2 > em { display: block; }
.mc-home h2 > em, .mc-title > em { padding-bottom: .12em; margin-bottom: -.12em; }
.mc-home h2 em, .mc-title em { background: linear-gradient(100deg, var(--track-1), var(--mc-violet) 50%, var(--track-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="zh-CN"] .mc-home h2 { letter-spacing: -0.01em; line-height: 1.18; }
.mc-sub { margin-top: 20px; max-width: 38em; color: var(--text-secondary); font-size: 18px; }
.mc-head { display: grid; gap: 16px; margin-bottom: 56px; }
.mc-section { position: relative; padding: clamp(104px, 13vh, 152px) 0; }

.js .mc-r { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease-emphasized), translate .9s var(--ease-emphasized); transition-delay: calc(var(--i, 0) * 80ms); }
.js .mc-r.in { opacity: 1; translate: 0 0; }
.js .mc-in { opacity: 0; translate: 0 22px; animation: mc-in 1s var(--ease-emphasized) var(--d, 0s) forwards; }
@keyframes mc-in { to { opacity: 1; translate: 0 0; } }

/* ---------- Hero: copy over the archipelago ---------- */
.mc-hero { position: relative; min-height: min(calc(100svh - var(--mc-hh, 64px)), 1040px); display: grid; grid-template-rows: 1fr auto; padding-top: 112px; overflow: hidden; }
/* short desktop screens: keep the actions and the host crests inside the first screen */
@media (min-width: 861px) and (max-height: 860px) { .mc-hero { padding-top: 72px; } .mc-hero .mc-lead { margin-top: 28px; } }
.mc-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, var(--bg-canvas) 0%, color-mix(in oklab, var(--bg-canvas) 78%, transparent) 30%, transparent 56%), linear-gradient(0deg, var(--bg-canvas) 0%, transparent 18%); }
.mc-hero-inner { position: relative; z-index: 2; align-self: center; width: 100%; }
.mc-eyebrow { color: var(--track-1); display: flex; align-items: center; gap: 14px; }
.mc-eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.mc-title { margin-top: 24px; font-size: clamp(56px, 7.6vw, 128px); line-height: .96; letter-spacing: -0.042em; font-weight: 700; max-width: 8.6em; }
.mc-title > span, .mc-title > em { display: block; }
html[lang="zh-CN"] .mc-title { letter-spacing: -0.02em; line-height: 1.12; max-width: 7.2em; }
.mc-tagline { margin-top: 24px; max-width: 30em; color: var(--text-primary); font-size: clamp(20px, 1.8vw, 26px); line-height: 1.4; }
.mc-tagline + .mc-lead { margin-top: 16px; }
.mc-lead { margin-top: 36px; max-width: min(30em, 44vw); color: var(--text-secondary); font-size: clamp(17px, 1.35vw, 19px); }
.mc-lead b { color: var(--text-primary); font-weight: 600; }
.mc-lead-more { margin-top: 14px; max-width: min(33em, 44vw); color: var(--text-tertiary); font-size: clamp(15px, 1.1vw, 16.5px); line-height: 1.6; }
/* the hero names the Challenge in both languages in Chinese */
.mc-zh-only { display: none; }
html[lang^="zh"] .mc-zh-only { display: inline; }
.mc-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mc-cta .btn { height: 52px; padding: 0 10px 0 22px; border-radius: 999px; }
.mc-home .btn-primary { box-shadow: 0 10px 40px -10px var(--track-1); }
.mc-host { margin-top: 24px; color: var(--text-tertiary); }
/* The host and partner universities under the actions: the three crests at one height,
   borderless (source bytes unchanged: a window shows NTU's shield, SUFE's transparent mark is
   shown in its official red-on-white seal on a white disc; see assets/institutions/ATTRIBUTION.txt), sized to stay in the first screen. */
.mc-hosts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 24px; }
.mc-hosts .mc-host { margin-top: 0; }
.mc-host-crests { display: flex; align-items: center; gap: clamp(8px, 1.4vw, 16px); }
.mc-host-crests a { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 12px; transition: transform var(--duration-fast) var(--ease-standard); }
.mc-host-crests a:hover { transform: translateY(-2px); }
.mc-host-crests a:focus-visible { outline: 2px solid var(--track-1); outline-offset: 4px; }
.mc-host-crests img { width: auto; height: 56px; max-width: 64px; object-fit: contain; }
.mc-host-crests .ntu-crest { display: block; width: 44px; height: 56px; overflow: hidden; }
.mc-host-crests .ntu-crest img { max-width: none; }
.mc-host-crests .sufe-crest { display: grid; place-items: center; width: 56px; height: 56px; padding: 2px; border-radius: 50%; overflow: hidden; background: #fff; }
.mc-host-crests .sufe-crest img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
.mc-hero-key { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 28px; padding-bottom: 28px; color: var(--text-tertiary); font: 400 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.mc-hero-key span { display: inline-flex; align-items: center; gap: 10px; }
.mc-hero-key i { display: inline-block; flex: none; }
.k-wing { width: 20px; height: 12px; border-top: 3px solid var(--track-1); background: repeating-linear-gradient(90deg, var(--track-1) 0 2px, transparent 2px 4px, var(--track-2) 4px 6px, transparent 6px 8px, var(--mc-violet) 8px 10px, transparent 10px 12px); opacity: .9; }
.k-book { width: 6px; height: 14px; border-radius: 1px; background: var(--track-2); box-shadow: 8px 2px 0 -1px var(--mc-violet), -8px 1px 0 -1px var(--track-1); margin: 0 8px; }
.k-thread { width: 22px; height: 9px; border-top: 2px solid var(--mc-violet); border-radius: 50% 50% 0 0; box-shadow: 0 -4px 10px -4px var(--mc-violet); }

/* ---------- Tags placed on 3D objects ---------- */
.mc-tags { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.mc-tags span { position: absolute; left: 0; top: 0; translate: -50% -100%; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 8px; white-space: nowrap; opacity: 0;
  border-radius: 8px; background: var(--mc-glass); border: 1px solid var(--mc-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 12px var(--font-sans); color: var(--text-primary); transition: opacity .3s, border-color .3s; }
.mc-tags span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.mc-tags span::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: linear-gradient(var(--mc-line), transparent); }
.mc-tags b { font-weight: 600; }
.mc-tags i { font: 400 10px var(--font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--tc); }
.mc-tags span.on { border-color: color-mix(in oklab, var(--tc) 70%, transparent); }
.mc-tags span.mc-tag-stack { display: grid; grid-template-columns: 8px auto; gap: 2px 8px; }
.mc-tags span.mc-tag-stack i { grid-column: 2; }

/* ---------- Section nav ---------- */
.mc-subnav { position: sticky; top: var(--mc-hh, 64px); z-index: 40; border-bottom: 1px solid var(--border-hairline);
  background: color-mix(in oklab, var(--bg-canvas) 80%, transparent); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.mc-subnav .wrap { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.mc-subnav .wrap::-webkit-scrollbar { display: none; }
.mc-subnav a { font-size: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text-tertiary); white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard); }
.mc-subnav a:first-child { margin-left: -12px; }
.mc-subnav a .n { font-size: 11px; }
.mc-subnav a:hover { color: var(--text-primary); background: var(--surface-2); }
.mc-subnav a.active { color: var(--text-primary); }
.mc-subnav a.active .n { color: var(--track-1); }
.mc-subnav-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--track-1), var(--mc-violet), var(--track-2)); }

/* ---------- Pinned scenes: one frame for every chapter ---------- */
.mc-scene { position: relative; height: var(--len, 360vh); }
.mc-anchor { position: absolute; left: 0; top: 76%; width: 1px; height: 1px; }
.mc-scene-pin { position: sticky; top: var(--mc-pin-top); height: calc(100svh - var(--mc-pin-top)); min-height: 520px; overflow: hidden; }
.mc-scene-pin::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-canvas) 72%, transparent) 0%, transparent 26%, transparent 58%, color-mix(in oklab, var(--bg-canvas) 70%, transparent) 76%, color-mix(in oklab, var(--bg-canvas) 94%, transparent) 100%); }
.mc-scene-head { position: absolute; top: 36px; left: 0; right: 0; z-index: 2; pointer-events: none; }
.mc-scene-head > * { pointer-events: auto; }
.mc-home .mc-scene-head h2 { margin-top: 16px; font-size: clamp(30px, 3.3vw, 50px); max-width: 15em; }
.mc-scene-head .mc-sub { margin-top: 12px; font-size: 16px; max-width: 30em; }
.mc-scene-foot { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2; }

/* captions: one at a time, on the gutter, above the rail */
.mc-captions { position: absolute; left: 0; right: 0; bottom: 100px; z-index: 2; list-style: none; padding-top: 0; padding-bottom: 0; pointer-events: none; }
.mc-captions li { position: absolute; left: var(--space-4); bottom: 0; max-width: 560px; display: grid; gap: 8px; opacity: 0; translate: 0 12px; transition: opacity .5s var(--ease-standard), translate .6s var(--ease-emphasized); }
.mc-captions li.current { opacity: 1; translate: 0 0; }
.mc-captions b { font-weight: 400; color: var(--track-1); font-size: 12px; }
.mc-captions span { font-size: 17px; line-height: 1.55; color: var(--text-primary); text-wrap: pretty; }
.mc-captions .mc-caption-statement span { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; background: linear-gradient(100deg, var(--track-1), var(--mc-violet) 50%, var(--track-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mc-captions .mc-caption-statement { max-width: 640px; }
.mc-captions small { font-size: 16px; color: var(--text-secondary); }

/* notes attached to the opening case */
.mc-notes { position: absolute; inset: 0; z-index: 2; list-style: none; padding: 0; pointer-events: none; }
.mc-notes li { position: absolute; left: 0; top: 0; width: 320px; translate: 18px -50%; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px 16px; opacity: 0;
  border-radius: 12px; background: var(--mc-glass); border: 1px solid var(--mc-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .35s; }
.mc-notes li::before { content: ""; position: absolute; right: 100%; top: 50%; width: calc(18px + var(--lead, 0px)); height: 1px; background: var(--tc, var(--track-1)); }
.mc-notes li::after { content: ""; position: absolute; right: calc(100% + 15px + var(--lead, 0px)); top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--tc, var(--track-1)); box-shadow: 0 0 12px var(--tc, var(--track-1)); }
.mc-notes b { grid-row: span 3; font-weight: 400; font-size: 11px; color: var(--tc, var(--track-1)); padding-top: 3px; }
.mc-notes em { font: 400 10.5px/1.4 var(--font-mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--tc, var(--track-1)); }
.mc-notes strong { font-size: 16px; font-weight: 600; }
.mc-notes span { font-size: 14px; color: var(--text-secondary); }
.mc-notes .mc-note-signature { width: 340px; --tc: var(--mc-violet); }
.mc-notes li.flip { translate: calc(-100% - 18px) -50%; }
.mc-notes li.flip::before { right: auto; left: 100%; }
.mc-notes li.flip::after { right: auto; left: calc(100% + 15px); }

/* chapter rails (mc-rail.js): bookmark tabs standing on a page edge. The edge fills with the
   chapter's progress; tabs already read stay marked, the current tab stands up and fills as its
   stage is read, the rest wait. Each tab is a button (click, Enter/Space, arrow keys). */
.mc-rail { --rc: var(--track-1); position: relative; list-style: none; counter-reset: mc-rail-step; width: fit-content; max-width: 100%; margin: 0 auto; padding: 10px 10px 4px;
  display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
.mc-rail::-webkit-scrollbar { display: none; }
.mc-rail::before { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--rc) calc(var(--rail-p, 0) * 100%), color-mix(in oklab, var(--text-primary) 16%, transparent) 0); }
.mc-rail li { position: relative; counter-increment: mc-rail-step; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 9px 14px 11px; overflow: hidden;
  border: 1px solid var(--mc-line); border-bottom: 0; border-radius: 10px 10px 2px 2px; background: color-mix(in oklab, var(--surface-1) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 500 12.5px/1.1 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--text-secondary);
  white-space: nowrap; cursor: pointer; user-select: none; translate: 0 3px;
  transition: translate .3s var(--ease-emphasized), color .25s, background-color .25s, border-color .25s, box-shadow .25s; }
.mc-rail:not(.mc-timeline) li::before, .mc-rail.mc-timeline li > i { display: inline-block; min-width: 16px; font: 600 10.5px/1 var(--font-mono); font-style: normal; color: var(--text-tertiary); transition: color .25s; }
.mc-rail:not(.mc-timeline) li::before { content: counter(mc-rail-step, decimal-leading-zero); }
.mc-rail li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); transform-origin: left; transform: scaleX(var(--step-p, 0)); opacity: 0; }
.mc-rail li:hover { color: var(--text-primary); background: color-mix(in oklab, var(--rc) 9%, var(--surface-1)); }
.mc-rail li:focus-visible { outline: 2px solid var(--rc); outline-offset: 2px; }
.mc-rail li.done { color: var(--text-primary); background: color-mix(in oklab, var(--rc) 10%, var(--surface-1)); border-color: color-mix(in oklab, var(--rc) 34%, transparent); }
.mc-rail:not(.mc-timeline) li.done::before { content: "✓"; }
.mc-rail li.done::before, .mc-rail.mc-timeline li.done > i { color: var(--rc); }
.mc-rail li.done::after { opacity: .55; }
.mc-rail li.on, .mc-rail li.is-active { color: var(--text-primary); background: color-mix(in oklab, var(--rc) 18%, var(--surface-2)); border-color: color-mix(in oklab, var(--rc) 62%, transparent);
  translate: 0 -3px; box-shadow: 0 -12px 26px -16px var(--rc); }
.mc-rail li.on::before, .mc-rail.mc-timeline li.on > i, .mc-rail.mc-timeline li.is-active > i { color: var(--rc); }
.mc-rail li.on::after, .mc-rail li.is-active::after { opacity: 1; }
.mc-scene.is-foundation .mc-rail { --rc: var(--track-2); }

/* without 3D the chapters read as plain text */
.mc-no3d .mc-scene { height: auto; }
.mc-no3d .mc-scene-pin { position: relative; top: 0; height: auto; min-height: 0; padding: 96px 0; }
.mc-no3d .mc-scene-head, .mc-no3d .mc-captions, .mc-no3d .mc-captions li, .mc-no3d .mc-scene-foot, .mc-no3d .mc-notes, .mc-no3d .mc-notes li { position: static; opacity: 1; translate: none; transform: none; }
.mc-no3d .mc-notes, .mc-no3d .mc-captions { display: grid; gap: 12px; margin: 32px auto 0; max-width: var(--content-max); padding: 0 24px; }
.mc-no3d .mc-tags, .mc-no3d .mc-art, .mc-no3d .mc-rail { display: none; }

/* ---------- Cards with a 3D picture on top ---------- */
.mc-grid { display: grid; gap: var(--mc-gap); }
.mc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.mc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mc-grid-4 { grid-template-columns: repeat(4, 1fr); }
.mc-card { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: 20px; border: 1px solid var(--border-hairline); overflow: hidden; text-decoration: none; color: inherit; isolation: isolate;
  transition: border-color var(--duration-base), translate var(--duration-slow) var(--ease-standard), box-shadow var(--duration-slow); }
.mc-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 30%, color-mix(in oklab, var(--tc, var(--track-1)) 12%, transparent), transparent 70%); }
.mc-card:hover { border-color: var(--border-strong); translate: 0 -3px; box-shadow: 0 30px 60px -36px color-mix(in oklab, var(--tc, var(--track-1)) 70%, transparent); }
.mc-art { position: relative; aspect-ratio: 4 / 3; }
.mc-grid-2 .mc-art { aspect-ratio: 16 / 9; }
.mc-grid-3 .mc-art { aspect-ratio: 16 / 11; }
.mc-card-body { position: relative; display: grid; align-content: start; gap: 10px; padding: 22px 24px 26px; border-top: 1px solid var(--border-hairline);
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface-1) 92%, transparent), var(--surface-1)); }
.mc-card-body::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--duration-base);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--tc, var(--track-1)) 14%, transparent), transparent 70%); }
.mc-card:hover .mc-card-body::before { opacity: 1; }
.mc-card-body .mono { color: var(--tc, var(--track-1)); font-size: 11px; }
.mc-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.mc-card-body > p:not(.mono) { color: var(--text-secondary); font-size: 15px; }

/* ---------- 05 · the participation workflow's head, and the results bench ---------- */
.mc-scene-head div.mc-sub p { margin: 0; }
/* the workroom's wall board can stand behind 05's intro; a soft backing keeps the text readable */
#rules .mc-scene-head .mc-sub { padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, var(--bg-canvas) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mc-results { padding-top: clamp(40px, 6vh, 72px); padding-bottom: clamp(24px, 4vh, 48px); }
.mc-results-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head intro" "stats stats"; gap: 28px clamp(28px, 4vw, 56px); padding: clamp(24px, 3vw, 40px);
  border-radius: 24px; border: 1px solid var(--border-hairline);
  /* light, not a solid panel: the 3D pictures draw on the page canvas behind it */
  background: radial-gradient(70% 120% at 0% 0%, color-mix(in oklab, var(--track-1) 10%, transparent), transparent 60%), linear-gradient(180deg, color-mix(in oklab, var(--surface-1) 50%, transparent), transparent 40%, transparent 72%, color-mix(in oklab, var(--surface-1) 50%, transparent));
  box-shadow: var(--inner-highlight); }
.mc-results-head { grid-area: head; display: grid; align-content: start; gap: 14px; }
.mc-results-head h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; }
.mc-results-intro { grid-area: intro; display: grid; align-content: end; gap: 20px; }
.mc-results-scope { color: var(--text-secondary); font-size: 16px; line-height: 1.6; max-width: 56ch; }
.mc-results-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* the three figures, each a toy picture over its number, with the parts or progress it stands for */
.mc-results-stats { grid-area: stats; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mc-results-stats > li { display: flex; flex-direction: column; border-radius: 20px; border: 1px solid color-mix(in oklab, var(--tc) 26%, var(--border-hairline)); overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%), 0 6px 0 rgb(0 0 0 / 24%), 0 24px 40px -28px rgb(0 0 0 / 70%); }
/* nothing painted over the picture (it is drawn behind the page), only a hairline under it */
.mc-results-stats .mc-art { aspect-ratio: 16 / 8; border-bottom: 1px solid color-mix(in oklab, var(--tc) 22%, var(--border-hairline)); }
.mc-stat { flex: 1; display: grid; align-content: start; gap: 12px; padding: 18px 20px 22px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--tc) 10%, var(--surface-1)), var(--surface-1) 70%); }
.mc-stat-head { display: grid; gap: 6px; margin: 0; }
.mc-stat-head b { font-size: clamp(42px, 4vw, 58px); font-weight: 650; letter-spacing: -0.045em; line-height: .95; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mc-stat-head span { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--tc); }
.mc-stat-note { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
/* 600 split into its three sources, in proportion */
.mc-stat-split { display: flex; gap: 3px; height: 10px; }
.mc-stat-split i { flex: var(--w) 1 0; min-width: 8px; border-radius: 999px; }
.mc-stat-split i:nth-child(2), .mc-stat-key li:nth-child(2) { --seg: color-mix(in oklab, var(--tc) 55%, var(--surface-2)); }
.mc-stat-split i:nth-child(3), .mc-stat-key li:nth-child(3) { --seg: color-mix(in oklab, var(--tc) 35%, #f3f6fb); }
.mc-stat-split i { background: var(--seg, var(--tc)); }
.mc-stat-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mc-stat-key li { display: grid; grid-template-columns: 8px 34px minmax(0, 1fr); align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.mc-stat-key li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--seg, var(--tc)); translate: 0 -1px; }
.mc-stat-key b { font-weight: 650; color: var(--text-primary); text-align: right; }
/* trials scored, as a filled bar */
.mc-stat-meter { height: 8px; border-radius: 999px; background: color-mix(in oklab, var(--tc) 14%, var(--surface-2)); overflow: hidden; }
.mc-stat-meter i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--tc) 60%, transparent), var(--tc)); box-shadow: 0 0 12px color-mix(in oklab, var(--tc) 50%, transparent); }
.mc-stat-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mc-stat-chips li { padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 1.3; color: var(--text-primary);
  border: 1px solid color-mix(in oklab, var(--tc) 35%, transparent); background: color-mix(in oklab, var(--tc) 12%, transparent); }
/* the nine harness configurations, one pip each */
.mc-stat-pips { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; max-width: 260px; }
.mc-stat-pips i { aspect-ratio: 1; border-radius: 7px; background: linear-gradient(180deg, color-mix(in oklab, var(--tc) 70%, #fff), var(--tc)); box-shadow: 0 3px 0 color-mix(in oklab, var(--tc) 40%, #000); }
/* the bars fill and the pips pop in as the card comes into view */
.js .mc-results-card .mc-stat-meter i, .js .mc-results-card .mc-stat-split i { transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease-emphasized) .35s; }
.js .mc-results-card.in .mc-stat-meter i, .js .mc-results-card.in .mc-stat-split i { transform: none; }
.js .mc-results-card .mc-stat-pips i { opacity: 0; scale: .5; transition: opacity .4s, scale .5s cubic-bezier(.34, 1.5, .5, 1); }
.js .mc-results-card.in .mc-stat-pips i { opacity: 1; scale: 1; }
.mc-results-card.in .mc-stat-pips i:nth-child(1) { transition-delay: 0.51s; }
.mc-results-card.in .mc-stat-pips i:nth-child(2) { transition-delay: 0.57s; }
.mc-results-card.in .mc-stat-pips i:nth-child(3) { transition-delay: 0.63s; }
.mc-results-card.in .mc-stat-pips i:nth-child(4) { transition-delay: 0.69s; }
.mc-results-card.in .mc-stat-pips i:nth-child(5) { transition-delay: 0.75s; }
.mc-results-card.in .mc-stat-pips i:nth-child(6) { transition-delay: 0.81s; }
.mc-results-card.in .mc-stat-pips i:nth-child(7) { transition-delay: 0.87s; }
.mc-results-card.in .mc-stat-pips i:nth-child(8) { transition-delay: 0.93s; }
.mc-results-card.in .mc-stat-pips i:nth-child(9) { transition-delay: 0.99s; }
/* the three ways to submit, under the results: one row of plain links, each with the thing it carries */
.mc-results-card { grid-template-areas: "head intro" "stats stats" "submit submit"; }
.mc-submit { grid-area: submit; display: grid; gap: 16px; padding-top: 26px; border-top: 1px solid var(--border-hairline); }
.mc-submit-label { color: var(--text-primary); font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
/* each way to submit is a toy card: its scene on top (drawn behind the page, so nothing is painted over it), then what it carries */
.mc-submit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mc-submit-list a { display: flex; flex-direction: column; height: 100%; border-radius: 18px; overflow: hidden; text-decoration: none;
  border: 1px solid color-mix(in oklab, var(--tc) 26%, var(--border-hairline));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%), 0 6px 0 rgb(0 0 0 / 24%), 0 22px 36px -26px rgb(0 0 0 / 70%);
  transition: translate .35s cubic-bezier(.34, 1.4, .5, 1), box-shadow .35s var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
.mc-submit-list .mc-art { aspect-ratio: 16 / 7; border-bottom: 1px solid color-mix(in oklab, var(--tc) 22%, var(--border-hairline)); }
.mc-submit-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title go" "desc go"; align-items: center; gap: 4px 14px; padding: 14px 16px 16px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--tc) 9%, var(--surface-1)), var(--surface-1) 80%); transition: background-color var(--duration-base) var(--ease-standard); }
/* the way out: a soft disc in the card's colour with a drawn arrow on it, the arrow nudging out on hover */
.mc-submit-body::before, .mc-submit-body::after { content: ""; grid-area: go; align-self: center; justify-self: center; }
.mc-submit-body::before { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in oklab, var(--tc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tc) 22%, transparent);
  transition: background-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
.mc-submit-body::after { width: 16px; height: 16px; background: var(--tc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7M6 4.5h5.5V10'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate .3s cubic-bezier(.34, 1.5, .5, 1), background-color var(--duration-base) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) {
  .mc-submit-list a:hover { translate: 0 -4px; border-color: color-mix(in oklab, var(--tc) 55%, transparent); box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 10px 0 rgb(0 0 0 / 26%), 0 30px 44px -26px rgb(0 0 0 / 75%); }
  .mc-submit-list a:hover .mc-submit-body::before { background: var(--tc); box-shadow: 0 0 18px color-mix(in oklab, var(--tc) 45%, transparent); }
  .mc-submit-list a:hover .mc-submit-body::after { background: var(--bg-canvas, #05070e); translate: 2px -2px; }
}
.mc-submit-list a:active { translate: 0 1px; }
.mc-submit-list a:focus-visible { outline: 2px solid var(--tc); outline-offset: 3px; }
.mc-submit-list b { grid-area: title; font-size: 16px; font-weight: 650; color: var(--text-primary); }
.mc-submit-list span { grid-area: desc; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
/* the hero's third way in: a plain link to the recorded run, beside the two buttons */
.mc-text-link { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px; color: var(--text-secondary); font-size: 15px; font-weight: 600; text-decoration: none;
  transition: color var(--duration-base) var(--ease-standard); }
.mc-text-link:hover { color: var(--text-primary); }
.mc-play { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); flex: none; transition: border-color var(--duration-base) var(--ease-standard); }
.mc-play::after { content: ""; position: absolute; left: 11px; top: 9px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--track-1); }
.mc-text-link:hover .mc-play { border-color: var(--track-1); }
.mc-grid-4 .mc-card:nth-child(2) { --tc: var(--mc-violet); }
.mc-grid-4 .mc-card:nth-child(3) { --tc: var(--track-2); }
.mc-grid-4 .mc-card:nth-child(4) { --tc: var(--mc-green); }
.mc-readers .mc-card:nth-child(2) { --tc: var(--track-2); }
.mc-readers { padding-top: 72px; }
.mc-go { margin-top: 6px; font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; }
.mc-go > span:last-child { color: var(--tc); transition: translate var(--duration-base) var(--ease-standard); }
.mc-card-link:hover .mc-go > span:last-child { translate: 4px 0; }
.mc-card-open { border-style: dashed; }

/* ---------- 08 The team ---------- */
.mc-join-card { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: stretch; border-radius: 28px; border: 1px solid var(--border-hairline); overflow: hidden;
  background: radial-gradient(80% 120% at 100% 0%, color-mix(in oklab, var(--mc-violet) 16%, transparent), transparent 60%), color-mix(in oklab, var(--surface-1) 86%, transparent);
  box-shadow: var(--inner-highlight); }
.mc-join-copy { padding: clamp(40px, 6vw, 88px); background: linear-gradient(90deg, var(--surface-1), color-mix(in oklab, var(--surface-1) 70%, transparent)); }
.mc-home .mc-join-copy h2 { margin-top: 16px; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.mc-home .mc-join-copy h2 > em { white-space: nowrap; }
@media (max-width: 480px) {
  .mc-home .mc-join-copy h2 { font-size: clamp(22px, 6.8vw, 30px); }
}
.mc-join-card .mc-art { aspect-ratio: auto; min-height: 420px; }
/* organizations and people, below the card's copy and picture, kept apart as on the Teams page:
   the founding organization, the collaborating organizations (marks and names only, no people),
   then the people and the student leaders, each group in its own full-width row */
.mc-team { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px clamp(24px, 3vw, 48px);
  padding: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 88px) clamp(36px, 5vw, 64px); border-top: 1px solid var(--border-hairline); background: color-mix(in oklab, var(--surface-1) 92%, transparent); }
.mc-team-kicker { margin-bottom: 14px; color: var(--text-tertiary); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
/* an organization card: its mark on a white plate (the same plate as the Teams page), its short name
   linking to its Teams entry, and its full name; nobody's name or photo */
.mc-orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.mc-org { display: grid; align-content: start; gap: 14px; padding: var(--mc-org-pad, 20px); border: 1px solid var(--border-hairline); border-radius: 18px; background: var(--surface-1); box-shadow: var(--inner-highlight); }
.mc-org-mark { display: grid; place-items: center; width: 100%; height: 64px; padding: 10px 16px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgb(14 20 32 / 7%); }
.mc-org-mark img { display: block; width: auto; height: auto; max-width: 100%; max-height: 40px; object-fit: contain; }
.mc-org-mark .mc-org-crest { height: 46px; max-height: 46px; } /* square crests and seals read larger than wordmarks */
.mc-org-mark-tall { padding: 4px 16px; } .mc-org-mark-tall img { max-height: 56px; } /* tall lockups (Columbia CDFT, AI4S2) use the plate's full inner height */
.mc-org-name { display: grid; gap: 4px; min-width: 0; }
.mc-org h3 { font-size: 17px; letter-spacing: -.015em; }
.mc-org h3 a { color: var(--text-primary); font-weight: 650; text-decoration: none; transition: color var(--duration-fast) var(--ease-standard); }
.mc-org h3 a:hover { color: var(--track-1); }
.mc-org-full { color: var(--text-secondary); font-size: 13.5px; line-height: 1.45; text-wrap: balance; }
/* the founding organization: full width, set apart by its accent, its mark beside a larger name */
.mc-team-host { grid-column: 1 / -1; }
.mc-org-host { grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 20px clamp(24px, 4vw, 48px); padding: var(--mc-org-pad, 24px);
  border-color: color-mix(in oklab, var(--track-1) 38%, var(--border-hairline)); border-radius: 20px;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in oklab, var(--track-1) 12%, transparent), transparent 62%), var(--surface-1); }
.mc-org-host .mc-org-mark { height: 88px; padding: 14px 24px; }
.mc-org-host .mc-org-mark img { max-height: 56px; }
.mc-org-host h3 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.03em; }
.mc-org-host .mc-org-name { gap: 6px; }
.mc-org-note { margin-top: 6px; max-width: 40em; color: var(--text-secondary); font-size: 15px; line-height: 1.55; }
/* a person card: photo, name, role and affiliation as plain text, no institutional mark */
.mc-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mc-people-lead { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mc-people-mini { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mc-person { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px var(--mc-org-pad, 20px); border: 1px solid var(--border-hairline); border-radius: 16px; background: var(--surface-1); box-shadow: var(--inner-highlight); }
.mc-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.mc-person div { display: grid; gap: 3px; min-width: 0; }
.mc-person a { color: var(--text-primary); font-size: 16px; font-weight: 650; text-decoration: none; transition: color var(--duration-fast) var(--ease-standard); }
.mc-person a:hover { color: var(--track-1); }
.mc-person b { color: var(--track-1); font-size: 13px; font-weight: 500; }
.mc-person span { color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.mc-people-mini .mc-person { align-items: center; }
.mc-team-more { margin-top: 14px; font-size: 14px; }
.mc-team-more a { color: var(--text-secondary); text-decoration: none; transition: color var(--duration-fast) var(--ease-standard); }
.mc-team-more a:hover { color: var(--track-1); }
.mc-home .v2-footer { margin-top: 0; background: var(--bg-canvas); }

/* ---------- 04 The catalogue: three wings of call-numbered classes ---------- */
.mc-catalogue { background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--surface-1) 55%, transparent) 30%, transparent); }
.mc-catalogue-meta { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 56px; align-items: end; margin: -16px 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border-hairline); }
.mc-catalogue-meta b { display: block; font-size: clamp(40px, 4.4vw, 64px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.mc-catalogue-meta span { color: var(--text-tertiary); font-size: 14px; }
.mc-call { font-size: 11px; color: var(--text-tertiary); letter-spacing: .04em; }
.mc-gallery-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 32px; align-items: center; margin-top: var(--mc-gap); padding: 26px 28px; border-radius: 20px; border: 1px dashed var(--border-strong);
  background: radial-gradient(60% 140% at 100% 50%, color-mix(in oklab, var(--mc-rose) 9%, transparent), transparent 70%), color-mix(in oklab, var(--surface-1) 75%, transparent);
  box-shadow: var(--inner-highlight); }
.mc-gallery-copy { display: grid; gap: 6px; }
.mc-gallery-copy .mono { color: var(--text-tertiary); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.mc-gallery-copy h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.mc-gallery-copy p:not(.mono) { color: var(--text-secondary); font-size: 15px; }
.mc-gallery-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mc-gallery-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--tc) 50%, transparent); font-size: 14px; }
.mc-gallery-chips li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tc); }
.mc-gallery-chips li.more { border-style: dashed; border-color: var(--border-strong); color: var(--text-tertiary); }
.mc-gallery-chips li.more::before { display: none; }

/* ---------- 04 · the field books (scripts/build-fields.mjs writes them; metacase.js stages them) ----------
   Each field is a toy book on a plinth, drawn by the shared stage in its colour like every other
   book on the page, and its six class slots are printed three to a page across an open two-page
   spread of cream, gilt-ruled stock: call number, class name and one line on what it asks of an
   agent. With the script the three books share one stage, as on a carousel, and the chosen field
   is read as an HTML book standing open in the middle, showing all six classes at once without
   manual page-flipping. Without the script every field's classes are simply listed under its name. */
.mc-bookrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin: 0 0 30px; }
.mc-fbook { position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; border: 0; border-radius: 18px; background: none;
  color: var(--text-primary); font: inherit; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mc-fbook .mc-art { display: block; aspect-ratio: 16 / 10; border-radius: 16px; background: radial-gradient(54% 46% at 50% 86%, color-mix(in oklab, var(--tc) 14%, transparent), transparent 76%); }
.mc-fbook-label { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 6px 2px; transition: color .3s var(--ease-standard); }
.mc-fbook small { color: var(--tc); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.mc-fbook-title { font-size: clamp(20px, 1.8vw, 24px); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.mc-fbook-n { font-size: 13px; color: var(--text-secondary); }
.mc-fbook-n b { font-weight: 650; color: var(--text-primary); }
.mc-fbook:focus-visible { outline: 2px solid var(--tc); outline-offset: 4px; border-radius: 18px; }
/* without the script there is no picture to draw; without WebGL a flat book in the field's colour stands in */
html:not(.js) .mc-fbook .mc-art { display: none; }
.mc-no3d .mc-fbook .mc-art, .mc-fbook .mc-art[data-renderer="fallback"] { display: block; position: relative; }
.mc-no3d .mc-fbook .mc-art::before, .mc-fbook .mc-art[data-renderer="fallback"]::before { content: ""; position: absolute; left: 50%; bottom: 14%; width: 28%; aspect-ratio: 3 / 4; translate: -50% 0;
  border-radius: 3px 8px 8px 3px; background: linear-gradient(90deg, color-mix(in oklab, var(--tc) 62%, #1f2a3a) 0 10%, var(--tc) 10%);
  box-shadow: inset -4px 0 0 #f6efe0, inset -6px 0 0 #ddd3bf, 0 16px 26px -14px rgb(0 0 0 / 65%); }

/* the class cards: cream stock with a gilt rule like the printed cards in chapter 01 (listed, without the script) */
.mc-flip + .mc-flip { margin-top: 32px; }
.mc-flip-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.mc-flip-head small { color: var(--tc); font-size: 11px; letter-spacing: .1em; }
.mc-flip-head b { font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.mc-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.mc-page { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px 14px; border-radius: 6px; color: #1f2a3a;
  background: linear-gradient(180deg, #f8f2e4, #f3ead6); box-shadow: inset 0 0 0 1px rgb(31 42 58 / 7%), 0 1px 2px rgb(0 0 0 / 16%), 0 18px 30px -20px rgb(0 0 0 / 70%); }
.mc-page::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgb(201 166 90 / 50%); border-radius: 3px; pointer-events: none; }
.mc-page .mc-call { position: relative; color: color-mix(in oklab, var(--tc) 62%, #1f2a3a); font-size: 11.5px; letter-spacing: .03em; text-transform: none; }
.mc-page-name { position: relative; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.mc-page-desc { position: relative; font-size: 14px; line-height: 1.55; color: #4b5563; }
/* the closing slot of a field with five classes: its numbers, how it is checked, and the way in */
.mc-page.is-summary .mc-call { color: #7a6a45; }
.mc-page-go { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 2px 0;
  color: color-mix(in oklab, var(--tc) 55%, #1f2a3a); font-size: 14px; font-weight: 650; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1px; transition: background-size var(--duration-slow) var(--ease-standard); }
.mc-page-go > span:last-child { transition: translate var(--duration-base) var(--ease-standard); }
.mc-page-go:hover { background-size: 100% 1px; }
.mc-page-go:hover > span:last-child { translate: 3px 0; }
.mc-page-go:focus-visible { outline: 2px solid color-mix(in oklab, var(--tc) 60%, #1f2a3a); outline-offset: 3px; border-radius: 3px; }
[data-theme="light"] .mc-page { box-shadow: inset 0 0 0 1px rgb(31 42 58 / 10%), 0 1px 2px rgb(14 20 32 / 8%), 0 16px 28px -20px rgb(14 20 32 / 40%); }

/* the stage: the chosen field's label above its open book, the other two books level with the
   book's middle (metacase.js measures; the CSS gives the sizes). Scrolling through the track steps
   through all three field books in turn while the stage stays pinned in view. */
.mc-fieldbooks-track { position: relative; height: calc(var(--book-stage-h, 640px) + 330vh); }
.mc-fieldbooks.is-books { --g: 22px; --bd: 10px; --gut: 0px;
  --side-w: clamp(100px, 12cqw, 164px);
  --pw: clamp(250px, (100cqw - 2 * var(--side-w) - 2 * var(--g)) / 2 - var(--bd), 392px);
  --ph: clamp(360px, min(calc(var(--pw) * 1.22), calc(100svh - var(--mc-pin-top, 112px) - 184px)), 484px);
  --book-w: calc(2 * (var(--pw) + var(--bd))); --book-h: calc(var(--ph) + 2 * var(--bd));
  --art-w: calc((var(--pw) + var(--bd)) * 1.25);
  position: sticky; top: calc(var(--mc-pin-top, 112px) + 12px); z-index: 4; container-type: inline-size; }
/* the field rail under the pinned stage: which of the three books is open, and how far through it the reader is */
.mc-fields-rail { display: none; }
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .mc-fields-rail { display: flex; margin-top: 34px; }
}
.is-books .mc-bookrow { position: relative; display: block; height: 620px; margin: 0; }
.is-books .mc-fbook { position: absolute; top: 0; left: calc(50% - var(--side-w) / 2); z-index: 2; width: var(--side-w); transform-origin: 0 0; }
.is-books .mc-fbook[data-slot="center"] { left: calc(50% - var(--art-w) / 2); width: var(--art-w); z-index: 3; grid-template-rows: auto auto; }
.is-books .mc-fbook[data-slot="left"] { left: 0; }
.is-books .mc-fbook[data-slot="right"] { left: calc(100% - var(--side-w)); }
.is-books .mc-fbook.is-crossing { z-index: 1; }
.is-books .mc-fbook .mc-art { aspect-ratio: 5 / 4; }
.is-books .mc-fbook[data-slot="center"] .mc-fbook-label { grid-row: 1; gap: 3px; padding: 0 6px 16px; }
.is-books .mc-fbook[data-slot="center"] .mc-fbook-title { font-size: 26px; }
.is-books .mc-fbook[data-slot="center"] .mc-art { grid-row: 2; aspect-ratio: auto; height: var(--book-h); background: none; }
.is-books .mc-fbook.is-reading .mc-art { opacity: 0; } /* the open book stands in its place (the 3D one hides itself too) */
.is-books .mc-fbook:not([data-slot="center"]) .mc-fbook-label { padding-top: 6px; color: var(--text-secondary); }
.is-books .mc-fbook:not([data-slot="center"]) .mc-fbook-title { font-size: 15px; font-weight: 600; }
.is-books .mc-fbook:not([data-slot="center"]) small { font-size: 9.5px; opacity: .8; }
.is-books .mc-fbook:not([data-slot="center"]) .mc-fbook-n { display: none; }
@media (hover: hover) and (pointer: fine) { .is-books .mc-fbook:not([data-slot="center"]):hover .mc-fbook-label { color: var(--text-primary); } }

/* the open book: the tabpanel of the chosen field, over its picture */
.is-books .mc-flip, .is-books .mc-flip + .mc-flip { position: absolute; top: var(--book-top, 70px); left: 50%; z-index: 5; display: grid; justify-items: center;
  width: var(--book-w); margin: 0; translate: -50% 0; border-radius: 12px; outline: none; }
.is-books .mc-flip:not(.is-shown) { visibility: hidden; pointer-events: none; }
.is-books .mc-flip:focus-visible { outline: 2px solid var(--tc); outline-offset: 10px; }
.is-books .mc-pages { display: none; }
.mc-book { --board: color-mix(in oklab, var(--tc) 58%, #0f1522); --dur: 650ms; position: relative; width: var(--book-w); height: var(--book-h);
  transition: translate var(--dur) var(--ease-standard); }
/* the back board under the right-hand page (the left-hand board is the inside of the cover) */
.mc-case { position: absolute; top: 0; bottom: 0; left: 50%; width: calc(var(--pw) + var(--bd)); border-radius: 2px 7px 7px 2px;
  background: linear-gradient(90deg, rgb(0 0 0 / 22%), transparent 6%), var(--board); box-shadow: 0 34px 50px -30px rgb(0 0 0 / 80%), 0 2px 5px rgb(0 0 0 / 30%); }
.mc-ribbon { position: absolute; z-index: 5; left: calc(50% + 38px); top: calc(100% - 14px); width: 11px; height: 36px; pointer-events: none;
  background: linear-gradient(90deg, #7d1a20, #b8323a 45%, #93242b); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
/* the cover leaf turns about the spine to open the left-hand page */
.mc-leaf { position: absolute; top: var(--bd); left: 50%; width: var(--pw); height: var(--ph); transform-origin: 0 50%; transform-style: preserve-3d;
  transform: perspective(2200px) rotateY(0deg); transition: transform var(--dur) cubic-bezier(.45, .05, .3, 1) var(--delay, 0ms); }
.mc-leaf.is-turned { transform: perspective(2200px) rotateY(-180deg); }
.mc-leaf.is-cover { top: 0; width: calc(var(--pw) + var(--bd)); height: var(--book-h); }
.mc-leaf.is-gone { visibility: hidden; pointer-events: none; }
.mc-face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mc-face.is-back { transform: rotateY(180deg); }
/* the shadow sweeping the cover and left page as the book opens or closes */
.mc-face::after { content: ""; position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; background: linear-gradient(90deg, rgb(24 16 4 / 6%), rgb(24 16 4 / 42%)); }
.mc-face.is-back::after { background: linear-gradient(270deg, rgb(24 16 4 / 6%), rgb(24 16 4 / 42%)); }
.mc-leaf.is-turning > .mc-face.is-front::after { animation: mc-shade-lift var(--dur) linear var(--delay, 0ms) both; }
.mc-leaf.is-turning > .mc-face.is-back::after { animation: mc-shade-land var(--dur) linear var(--delay, 0ms) both; }
.mc-leaf.is-turning.is-back > .mc-face::after { animation-direction: reverse; }
@keyframes mc-shade-lift { 0% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes mc-shade-land { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }
/* page edges: a few leaves' worth on either side of the open book */
.mc-leaf.is-base > .mc-face { overflow: visible; box-shadow: 1px 0 0 #e4d8bf, 2px 0 0 #f6efe0, 3px 0 0 #d9ccb1, 4px 0 0 #f1e8d4, 5px 1px 0 #cdbfa2; }
.mc-board-page { padding: var(--bd) 0 var(--bd) var(--bd); border-radius: 7px 2px 2px 7px;
  background: linear-gradient(270deg, rgb(0 0 0 / 22%), transparent 6%), var(--board); box-shadow: 0 34px 50px -30px rgb(0 0 0 / 80%), 0 2px 5px rgb(0 0 0 / 30%); }

/* each of the two open pages (.mc-sheet) holds three classes separated by a gilt dashed rule */
.mc-sheet { position: relative; container-type: inline-size; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); width: 100%; height: 100%;
  padding: clamp(20px, 6%, 28px) clamp(22px, 7%, 32px); border-radius: 0 3px 3px 0; color: #1f2a3a;
  background: linear-gradient(90deg, rgb(92 66 22 / 24%), rgb(92 66 22 / 6%) 5%, transparent 12%), linear-gradient(180deg, #f9f3e6, #f2e8d3); }
.mc-sheet::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgb(201 166 90 / 50%); border-radius: 3px; pointer-events: none; }
.mc-board-page .mc-sheet, .mc-sheet.is-left { border-radius: 3px 0 0 3px;
  background: linear-gradient(270deg, rgb(92 66 22 / 24%), rgb(92 66 22 / 6%) 5%, transparent 12%), linear-gradient(180deg, #f9f3e6, #f2e8d3);
  box-shadow: -1px 0 0 #e4d8bf, -2px 0 0 #f6efe0, -3px 0 0 #d9ccb1, -4px 0 0 #f1e8d4; }
.mc-book .mc-page { display: flex; flex-direction: column; justify-content: center; gap: 3px; height: auto; padding: 10px 4px; border-radius: 0; background: none; box-shadow: none; }
.mc-book .mc-page::before { display: none; }
.mc-book .mc-page:first-child { padding-top: 0; }
.mc-book .mc-page:last-child { padding-bottom: 0; }
.mc-book .mc-page + .mc-page { border-top: 1px dashed rgb(168 138 76 / 42%); }
.mc-book .mc-call { font-size: 11px; line-height: 1.25; }
.mc-book .mc-page-name { font-size: clamp(16.5px, 4.7cqi, 19.5px); font-weight: 700; line-height: 1.22; letter-spacing: -.018em; text-wrap: balance; }
.mc-book .mc-page-desc { margin-top: 2px; font-size: clamp(13px, 3.7cqi, 14.5px); line-height: 1.46; color: #4b5563; }
/* the summary slot: the field's counts set a step larger, as the book's closing note */
.mc-book .mc-page.is-summary { gap: 4px; }
.mc-book .mc-page.is-summary .mc-page-name { font-size: clamp(17px, 4.9cqi, 20px); letter-spacing: -.02em; }
/* the closed cover: the field's colour, gilt hairlines, its name and emblem */
.mc-cover { display: grid; place-items: center; padding: 16% 14% 18% 16%; border-radius: 2px 7px 7px 2px; color: #fbf6ea; cursor: pointer;
  background: radial-gradient(110% 70% at 28% 18%, rgb(255 255 255 / 16%), transparent 62%), linear-gradient(90deg, rgb(0 0 0 / 30%), rgb(0 0 0 / 0) 6%, rgb(255 255 255 / 8%) 7.5%, transparent 9%),
    color-mix(in oklab, var(--tc) 68%, #0f1522); box-shadow: 0 34px 50px -30px rgb(0 0 0 / 80%), 0 2px 5px rgb(0 0 0 / 30%); }
.mc-cover::before { content: ""; position: absolute; inset: 14px 14px 14px 24px; border: 1px solid rgb(232 205 140 / 70%); border-radius: 3px; box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgb(232 205 140 / 30%); pointer-events: none; }
.mc-cover-label { display: grid; justify-items: center; gap: 22px; text-align: center; }
.mc-cover .mc-flip-head { display: grid; justify-items: center; gap: 8px; margin: 0; }
.mc-cover .mc-flip-head small { color: rgb(251 246 234 / 78%); font-size: 11px; letter-spacing: .18em; }
.mc-cover .mc-flip-head b { font-size: clamp(24px, 2.4vw, 32px); font-weight: 650; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.mc-emblem { display: block; width: min(100%, 190px); height: auto; border-radius: 4px; box-shadow: 0 6px 14px -8px rgb(0 0 0 / 60%); }
.mc-emblem .is-paper { fill: #f6efe0; }
.mc-emblem .is-rule { fill: none; stroke: color-mix(in oklab, var(--tc) 55%, #1f2a3a); stroke-width: 3; opacity: .45; }
.mc-emblem .is-ink { fill: color-mix(in oklab, var(--tc) 62%, #1f2a3a); }
.mc-emblem .is-down { fill: #c2574f; }
.mc-emblem .is-line { fill: none; stroke: color-mix(in oklab, var(--tc) 62%, #1f2a3a); stroke-width: 6; }
[data-theme="light"] .mc-case, [data-theme="light"] .mc-board-page, [data-theme="light"] .mc-cover { box-shadow: 0 30px 44px -28px rgb(14 20 32 / 55%), 0 2px 4px rgb(14 20 32 / 18%); }

/* ---- the toy book: the field books drawn like the 3D kit — a chunky rounded board with a solid
   edge under it, a block of page edges, flat warm paper and one class to a page with its picture ---- */
.mc-book { --board: color-mix(in oklab, var(--tc) 72%, #10172a); --board-edge: color-mix(in oklab, var(--tc) 42%, #070b14);
  --paper: #fcf6e8; --paper-line: #eadcbd; --ink: #1d2638; --lift: 0 10px 0 var(--board-edge), 0 44px 60px -28px rgb(0 0 0 / 75%); }
.mc-case { border-radius: 10px 26px 26px 10px; background: linear-gradient(90deg, rgb(0 0 0 / 18%), transparent 5%), var(--board); box-shadow: var(--lift); }
.mc-board-page { border-radius: 26px 10px 10px 26px; background: linear-gradient(270deg, rgb(0 0 0 / 18%), transparent 5%), var(--board); box-shadow: var(--lift); }
.mc-ribbon { width: 16px; height: 46px; left: calc(50% + 44px); top: calc(100% - 6px); border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #d9434c, #f16a6f 45%, #d9434c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
/* the cover: flat field colour, a soft light from the top left, a stitched spine and a raised panel */
.mc-cover { border-radius: 10px 26px 26px 10px; padding: 14% 12% 16% 17%;
  background: radial-gradient(90% 60% at 24% 6%, rgb(255 255 255 / 24%), transparent 60%),
    linear-gradient(90deg, rgb(0 0 0 / 22%) 0 26px, rgb(255 255 255 / 12%) 26px 29px, transparent 29px), var(--board);
  box-shadow: var(--lift); }
.mc-cover::before { inset: 24px 24px 24px 46px; border: 3px solid rgb(255 255 255 / 22%); border-radius: 22px; box-shadow: none;
  background: rgb(255 255 255 / 7%); }
.mc-cover::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 22px; width: 0; border-left: 2px dashed rgb(255 255 255 / 28%); pointer-events: none; }
.mc-cover .mc-flip-head small { font-weight: 600; }
.mc-cover .mc-flip-head b { font-size: clamp(28px, 2.7vw, 38px); font-weight: 750; text-shadow: 0 3px 0 rgb(0 0 0 / 18%); }
.mc-emblem { border-radius: 18px; box-shadow: 0 6px 0 rgb(0 0 0 / 20%); }
.mc-emblem .is-rule { display: none; }
/* the page block under the open book: a few leaves' worth of edges, stepped like the 3D book */
.mc-leaf.is-base > .mc-face { box-shadow: 0 3px 0 var(--paper-line), 0 6px 0 var(--paper), 0 9px 0 var(--paper-line), 3px 0 0 var(--paper-line), 6px 1px 0 var(--paper), 8px 2px 0 var(--paper-line); border-radius: 4px 18px 18px 4px; }
/* paper: flat and warm, a faint dot grid, the gutter's shade by the spine */
.mc-sheet, .mc-board-page .mc-sheet, .mc-sheet.is-left { color: var(--ink);
  background: linear-gradient(90deg, rgb(120 86 30 / 16%), transparent 7%),
    radial-gradient(rgb(29 38 56 / 7%) 1px, transparent 1.5px) 0 0 / 16px 16px, var(--paper); box-shadow: none; }
.mc-sheet { border-radius: 0 18px 18px 0; }
.mc-board-page .mc-sheet, .mc-sheet.is-left { border-radius: 18px 0 0 18px; background: linear-gradient(270deg, rgb(120 86 30 / 16%), transparent 7%),
    radial-gradient(rgb(29 38 56 / 7%) 1px, transparent 1.5px) 0 0 / 16px 16px, var(--paper); }
.mc-sheet::before { display: none; }
.mc-leaf.is-page > .mc-face.is-front > .mc-sheet { box-shadow: inset -1px 0 0 var(--paper-line); }
@media (min-width: 900px) {
  /* one class to a page: the call sign and folio on top, the picture, the name, what it asks */
  .mc-book .mc-sheet { grid-template-rows: minmax(0, 1fr); padding: clamp(20px, 7%, 30px) clamp(22px, 8%, 34px); }
  .mc-book .mc-page { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; align-content: stretch; gap: 8px; padding: 0 !important; border: 0 !important; }
  .mc-book .mc-page .mc-call { justify-self: start; grid-row: 1; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em;
    color: color-mix(in oklab, var(--tc) 70%, #0f1522); background: color-mix(in oklab, var(--tc) 18%, #fff); box-shadow: 0 2px 0 color-mix(in oklab, var(--tc) 30%, #e9dcbd); }
  .mc-page-art { grid-row: 2; display: grid; place-items: center; min-height: 0; }
  .mc-page-art svg { width: min(100%, 290px); height: 100%; max-height: 236px; overflow: visible; }
  .mc-book .mc-page-name { grid-row: 3; font-size: clamp(19px, 6cqi, 24px); font-weight: 750; letter-spacing: -.022em; }
  .mc-book .mc-page-desc { grid-row: 4; font-size: clamp(13.5px, 4.1cqi, 15px); color: #4f5a6b; }
  .mc-page-folio { position: absolute; top: clamp(20px, 7%, 30px); right: clamp(22px, 8%, 34px); font-size: 11px; letter-spacing: .08em; color: #a39270; }
  /* a dog-ear on the right-hand page: it can be turned */
  .mc-sheet.is-right::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-radius: 0 0 18px 0; pointer-events: none;
    background: linear-gradient(315deg, transparent 50%, #efe2c4 50%, #fff8e9 70%); box-shadow: -3px -3px 6px -4px rgb(0 0 0 / 25%); transition: width .3s var(--ease-standard), height .3s var(--ease-standard); }
  .mc-book:hover .mc-sheet.is-right::after { width: 46px; height: 46px; }
  .mc-book[data-s="0"], .mc-book .mc-sheet { cursor: pointer; }
  /* the pages on view after a turn: the picture pops up, the words follow */
  .mc-sheet.is-fresh .mc-page-art svg { animation: mc-art-pop .62s cubic-bezier(.34, 1.4, .5, 1) both; }
  .mc-sheet.is-fresh .mc-page > :not(.mc-page-art) { animation: mc-words-rise .5s var(--ease-standard) both; }
  .mc-sheet.is-fresh .mc-page-name { animation-delay: .08s !important; }
  .mc-sheet.is-fresh .mc-page-desc { animation-delay: .14s !important; }
  /* the leaf in the air catches the light on its way over */
  .mc-leaf.is-turning > .mc-face.is-front::after { background: linear-gradient(90deg, rgb(255 250 235 / 0%), rgb(255 250 235 / 30%) 40%, rgb(24 16 4 / 34%)); }
}
@keyframes mc-art-pop { from { opacity: 0; transform: translateY(14px) scale(.82); } to { opacity: 1; transform: none; } }
@keyframes mc-words-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* the class pictures' fills */
.mc-page-art .sh { fill: rgb(29 38 56 / 10%); }
.mc-page-art .bg { fill: color-mix(in oklab, var(--tc) 14%, #fcf6e8); }
.mc-page-art .a { fill: var(--tc); }
.mc-page-art .b { fill: color-mix(in oklab, var(--tc) 45%, #fff); }
.mc-page-art .w { fill: #fffdf7; stroke: #eadcbd; stroke-width: 1.5; }
.mc-page-art .k { fill: #1d2638; }
.mc-page-art .r { fill: #f0727a; }
.mc-page-art .g { fill: #3fb27f; }
.mc-page-art .y { fill: #f2b545; }
.mc-page-art .yl { fill: #ffd27a; }
.mc-page-art .hl { fill: #fff; opacity: .32; }
.mc-page-art .w + .hl { opacity: 0; }
.mc-page-art .ln { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mc-page-art .k.ln { stroke: #1d2638; }
.mc-page-art .r.ln { stroke: #f0727a; }
.mc-page-art .w.ln { stroke: #fff; fill: none; }
.mc-page-art .y.ln { stroke: #f2b545; }
.mc-page-art .th { stroke-width: 7; }
.mc-page-art .b.ln { stroke: color-mix(in oklab, var(--tc) 45%, #fff); }
.mc-page-art .sl { stroke-width: 3; }
.mc-page-art .tx { font: 700 15px/1 Inter, system-ui, sans-serif; fill: #fff; text-anchor: middle; }
.mc-page-art .w-tx { fill: #fff; }
@media (max-width: 899px) {
  /* stacked: each class with its picture as a small badge beside it */
  .mc-book .mc-page { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .mc-book .mc-page > :not(.mc-page-art) { grid-column: 2; }
  .mc-page-art { grid-column: 1; grid-row: 1 / span 3; display: block; width: 58px; height: 58px; margin-top: 2px; }
  .mc-page-art svg { width: 100%; height: 100%; }
  .mc-page-art .sh { display: none; }
  .mc-book .mc-page .mc-call { justify-self: start; padding: 3px 9px; border-radius: 999px; color: color-mix(in oklab, var(--tc) 70%, #0f1522); background: color-mix(in oklab, var(--tc) 18%, #fff); }
  .mc-page-folio { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mc-sheet.is-fresh * { animation: none !important; } }

@media (min-width: 900px) {
  /* closed, the book is moved over so that its cover stands in the middle */
  .mc-book[data-s="0"] { translate: calc((var(--pw) + var(--bd)) / -2) 0; }
}
/* narrow screens: the two pages stack inside the open book, the other two books in a row above */
@media (max-width: 899px) {
  .mc-fieldbooks-track { height: auto; }
  .mc-fieldbooks.is-books { --bd: 8px; --gut: 5px; --pw: min(90vw, 360px); --book-w: calc(var(--pw) + 2 * var(--bd)); --side-w: clamp(84px, 27cqw, 128px); position: relative; top: auto; }
  .is-books .mc-fbook[data-slot="center"] { left: calc(var(--side-w) + 8px); width: calc(100% - 2 * var(--side-w) - 16px); }
  .is-books .mc-fbook[data-slot="center"] .mc-art { display: none; }
  .is-books .mc-fbook[data-slot="center"] .mc-fbook-label { padding: 0; }
  .is-books .mc-fbook .mc-art { aspect-ratio: 1 / 1; }
  .mc-book { height: auto; }
  .mc-case { left: 0; width: 100%; border-radius: 6px; }
  .mc-leaf.is-base { position: relative; top: 0; left: 0; width: 100%; height: auto; padding: var(--bd); transform: none; }
  .mc-leaf.is-base > .mc-face { position: relative; inset: auto; display: grid; gap: 4px; box-shadow: none; }
  .mc-sheet, .mc-sheet.is-left { height: auto; grid-template-rows: none; padding: 18px 20px; border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, #f9f3e6, #f2e8d3); box-shadow: none; }
  .mc-sheet.is-right { border-radius: 2px 2px 4px 4px; background: linear-gradient(180deg, #eee3cc, #f9f3e6 14%, #f2e8d3); }
  .mc-leaf.is-cover { left: 0; width: 100%; height: 100%; }
  .mc-ribbon { left: auto; right: 28px; height: 28px; }
}

/* The Challenge uses the same label, glass, typography and signature rail.
 * Its responsive layout lives in arena.css. */

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mc-gallery-row { grid-template-columns: 1fr; gap: 16px; }
  .mc-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mc-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .mc-grid-3 .mc-card:last-child { grid-column: 1 / -1; }
  .mc-grid-3 .mc-card:last-child .mc-art { aspect-ratio: 21 / 9; }
  .mc-join-card { grid-template-columns: 1fr; }
  .mc-join-card .mc-art { min-height: 320px; }
  .mc-team { grid-template-columns: 1fr; }
  .mc-org-host { grid-template-columns: 1fr; }
  .mc-org-host .mc-org-mark { width: min(100%, 320px); }
}
@media (max-width: 860px) {
  :root { --mc-gutter: 16px; }
  .mc-home .site-header .nav { flex-wrap: wrap; gap: 0 12px; min-height: 56px; padding: 0 16px; }
  .mc-home .site-header .nav-controls { margin-left: auto; }
  .mc-home .site-header .nav-links { order: 3; flex: 1 0 100%; margin: 0 -16px; padding: 0 10px 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .mc-home .site-header .nav-links::-webkit-scrollbar { display: none; }
  .mc-home .site-header .nav-links a { white-space: nowrap; }
  .mc-home .site-header .menu-toggle { display: none !important; }
  .mc-home .wrap { padding: 0 16px; }
  .mc-hero { padding-top: 400px; min-height: auto; }
  .mc-title { font-size: clamp(44px, 13vw, 72px); }
  .mc-hero::after { background: linear-gradient(0deg, var(--bg-canvas) 0, var(--bg-canvas) calc(100% - 430px), transparent calc(100% - 300px)); }
  .mc-hero-key { padding-top: 32px; }
  .mc-lead, .mc-lead-more { max-width: 34em; }
  .mc-scene-head { top: 18px; }
  .mc-scene-head .mc-sub { display: none; }
  .mc-captions { bottom: 88px; }
  .mc-captions li { left: 16px; right: 16px; }
  .mc-captions span { font-size: 15px; line-height: 1.5; }
  .mc-notes li { left: 16px !important; right: 16px; top: auto !important; bottom: 88px; width: auto; transform: none !important; translate: none; }
  .mc-notes li::before, .mc-notes li::after { display: none; }
  .mc-notes li:not(.current) { opacity: 0 !important; }
  .mc-notes li.current { opacity: 1 !important; }
  .mc-notes li.flip { translate: none; } /* on phones a note sits under the picture, wherever its anchor is */
  .mc-rail { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .mc-rail li { min-width: 40px; justify-content: center; gap: 0; padding: 9px 10px 11px; font-size: 0; }
  .mc-rail li.on, .mc-rail li.is-active { gap: 6px; padding: 9px 12px 11px; font-size: 11.5px; }
  .mc-tags span { font-size: 11px; padding: 4px 8px; }
  .mc-tags i { display: none; }
  .mc-grid-2, .mc-grid-3, .mc-grid-4 { grid-template-columns: 1fr; }
  .mc-team { padding: 28px 20px 32px; }
  .mc-grid-3 .mc-card:last-child .mc-art { aspect-ratio: 16 / 11; }
  .mc-catalogue-meta { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .mc-results-card { grid-template-columns: 1fr; grid-template-areas: "head" "intro" "stats" "submit"; gap: 22px; }
  .mc-submit-list { grid-template-columns: 1fr; gap: 12px; }
  .mc-submit-list a { flex-direction: row; }
  .mc-submit-list .mc-art { flex: none; width: 118px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid color-mix(in oklab, var(--tc) 22%, var(--border-hairline)); }
  .mc-submit-body { padding: 14px; }
  .mc-results-stats { grid-template-columns: 1fr; gap: 14px; }
  .mc-results-stats .mc-art { aspect-ratio: 16 / 7; }
  .mc-stat { padding: 16px 18px 20px; }
  .mc-stat-head { grid-template-columns: auto minmax(0, 1fr); align-items: end; column-gap: 14px; }
  .mc-stat-head b { font-size: 44px; }
  .mc-stat-head span { padding-bottom: 4px; }
  .mc-results-actions .btn { flex: 1 1 100%; justify-content: space-between; }
  .mc-bookrow { gap: 8px; margin-bottom: 22px; }
  .mc-fbook .mc-art { aspect-ratio: 1 / 1; }
  .mc-fbook-label { padding: 8px 4px 2px; }
  .mc-fbook small { font-size: 9px; letter-spacing: .06em; }
  .mc-fbook-title { font-size: 15px; }
  .mc-fbook-n { font-size: 11px; }
  .is-books .mc-fbook[data-slot="center"] .mc-fbook-title { font-size: 21px; }
  .is-books .mc-fbook:not([data-slot="center"]) .mc-fbook-title { font-size: 12.5px; }
  .is-books .mc-fbook:not([data-slot="center"]) small { display: none; }
  .mc-pages { gap: 12px; }
}
@media (max-width: 520px) {
  .mc-submit-list .mc-art { width: 104px; }
  .mc-submit-body { grid-template-columns: 1fr; grid-template-areas: "title" "desc"; align-content: center; }
  .mc-submit-body::before, .mc-submit-body::after { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .mc-in, .js .mc-r { animation: none; opacity: 1; translate: none; transition: none; }
  .js .mc-results-card :is(.mc-stat-meter, .mc-stat-split, .mc-stat-pips) i { transform: none; opacity: 1; scale: 1; transition: none; }
  .mc-rail li, .mc-rail li.on, .mc-rail li.is-active { transition: none; translate: none; }
  .mc-fbook-label { transition: none; }
  .mc-fieldbooks-track { height: auto; }
  .mc-fieldbooks.is-books { position: relative; top: auto; }
  .mc-book, .mc-leaf { transition: none !important; }
  .mc-face::after { animation: none !important; }
}


/* the pinned chapters: on wide screens the subhead sits beside the title, so the picture keeps its height */
@media (min-width: 1100px) {
  .mc-home .mc-scene .mc-scene-head { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); column-gap: clamp(32px, 4vw, 72px); align-items: end; }
  .mc-home .mc-scene .mc-scene-head > .mc-label, .mc-home .mc-scene .mc-scene-head > h2 { grid-column: 1; }
  .mc-home .mc-scene .mc-scene-head > .mc-sub { grid-column: 2; grid-row: 1 / span 2; align-self: end; max-width: 40em; margin: 0; font-size: 15px; line-height: 1.6; }
}
