/* ==========================================================================
   CourseHub case study: design tokens and the light (design) chapters.
   CourseHub's own language: black and white for structure, one warm yellow
   for actions, four pastels that belong to courses, and square corners.
   ========================================================================== */

:root {
    --ink: #000000;
    --ink-2: #333333;
    --grey: #636363;
    --grey-2: #9b9b9b;
    --paper: #ffffff;
    --cream: #f6f3ec;
    --line: rgba(0, 0, 0, 0.14);
    --line-2: rgba(0, 0, 0, 0.07);

    --yellow: #fecf6f;
    --yellow-2: #f2b744;
    --lav: #dbceff;
    --pink: #ffa7d4;
    --blue: #6f8ffe;
    --lime: #edf492;
    --sky: #7fdcfb;

    --font: "Montserrat", "Proxima Nova", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

    --w: 1080px;
    --gut: clamp(18px, 4vw, 56px);
    --rail: 0px;
    --bar: 64px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    color-scheme: light;
}
@media (min-width: 1320px) { :root { --rail: 250px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p, figure, dl, dd { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--line-2); padding: 0.1em 0.35em; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--yellow); padding: 8px 14px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Shared bits ---------- */
.kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
.code { font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; font-size: 11.5px; background: var(--ink); color: var(--paper); padding: 4px 8px; }
.prose p + p { margin-top: 1em; }
.prose p { color: var(--ink-2); font-size: 17px; }
.sub-title { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px; }

/* Course card: a square pastel block, a black code tag, a bold name */
.cc { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 112px; padding: 10px 12px 12px; background: var(--lav); color: var(--ink); }
.cc b { font-weight: 700; font-size: 15px; line-height: 1.2; }
.cc-code { align-self: flex-start; font-size: 10px; font-weight: 700; background: var(--ink); color: #fff; padding: 3px 6px; letter-spacing: 0.02em; }
.cc-lav { background: var(--lav); } .cc-pink { background: var(--pink); } .cc-blue { background: var(--blue); } .cc-lime { background: var(--lime); }
.cc-add { background: transparent; outline: 1.5px dashed rgba(255, 255, 255, 0.7); outline-offset: -1.5px; color: #fff; justify-content: center; align-items: center; gap: 2px; font-weight: 400; }
.cc-add b { font-size: 28px; font-weight: 300; line-height: 1; }

/* Exam countdown, as on the dashboard: a big light number, a label in the corner */
.cd { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 150px; min-height: 104px; padding: 10px 12px; background: var(--yellow); color: var(--ink); }
.cd b { font-size: 52px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cd span { align-self: flex-end; text-align: right; font-size: 12.5px; line-height: 1.2; }
.cd-sm { min-width: 0; width: 170px; }

/* Favourites: folders with a tab cut out, files with a folded corner */
.fv { position: relative; display: flex; flex-direction: column; min-height: 110px; padding: 18px 12px 10px; background: var(--c, var(--lime)); color: var(--ink); overflow: hidden; }
.fv small { font-size: 11px; }
.fv b { font-size: 16px; font-weight: 800; line-height: 1.15; }
.fv em { margin-top: auto; align-self: flex-end; text-align: right; font-style: normal; font-weight: 800; font-size: 13px; line-height: 1.1; color: rgba(0, 0, 0, 0.32); }
.fv-folder { clip-path: polygon(0 0, 44% 0, 49% 7px, 82% 7px, 87% 0, 100% 0, 100% 100%, 0 100%); }
.fv-file { padding-top: 10px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); background: linear-gradient(transparent 0 46px, rgba(0, 0, 0, 0.12) 46px 47px, transparent 47px 64px, rgba(0, 0, 0, 0.12) 64px 65px, transparent 65px 82px, rgba(0, 0, 0, 0.12) 82px 83px, transparent 83px), var(--c); }
.fv-file::after { content: ""; position: absolute; right: 0; top: 0; width: 16px; height: 16px; background: linear-gradient(225deg, transparent 50%, rgba(0, 0, 0, 0.16) 50%); }

/* Buttons and fields: square, black or yellow */
.btn-ch { display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; font-weight: 700; font-size: 14px; padding: 12px 20px; text-decoration: none; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.btn-ch-yellow { background: var(--yellow); color: var(--ink); }
.btn-ch-dark { background: var(--ink); color: #fff; }
.btn-ch-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
a.btn-ch:hover, button.btn-ch:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
a.btn-ch-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink), 0 6px 0 var(--ink); }
.field-ch { display: inline-flex; align-items: center; gap: 30px; padding: 10px 12px; border: 1.5px solid var(--ink); background: #fff; font-size: 14px; font-weight: 500; }
.field-ch .ic { margin-left: auto; }
.ms { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 16px; height: 16px; flex: none; }
.ms b:nth-child(1) { background: #f25022; } .ms b:nth-child(2) { background: #7fba00; }
.ms b:nth-child(3) { background: #00a4ef; } .ms b:nth-child(4) { background: #ffb900; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip { font-size: 10.5px; font-weight: 700; padding: 6px 12px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ink); color: #fff; }

/* Browse header band */
.bhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; background: var(--yellow); color: var(--ink); }
.bh-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.bh-crumb u, .bh-crumb button { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.bh-crumb > * + *::before { content: "›"; display: inline-block; margin-right: 6px; text-decoration: none; font-weight: 700; }
.bh-crumb-plain { justify-content: center; }
.bh-title { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 22px; font-weight: 800; }
.bh-title .ic { width: 15px; height: 15px; }
.bh-btns { display: flex; gap: 8px; }
.bh-btns span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 10px; background: var(--ink); color: #fff; font-size: 11px; white-space: nowrap; }
.bh-btns .ic { width: 14px; height: 14px; }

/* Course sidebar with colour strips */
.side { background: #fff; color: var(--ink); }
.side > li:not(.side-tree) { position: relative; display: grid; gap: 1px; padding: 10px 30px 10px 22px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.25; }
.side > li:not(.side-tree)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--c); }
.side > li:not(.side-tree)::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.side > li.open::after { transform: rotate(-135deg); margin-top: -1px; }
.side b { font-weight: 800; font-size: 12.5px; }
.side-tree { display: grid; padding: 4px 0 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.side-tree span { position: relative; padding: 3px 10px 3px 34px; }
.side-tree span::before { content: ""; position: absolute; left: 18px; top: 50%; width: 10px; border-top: 1px solid var(--ink); }
.side-tree .t1 { font-weight: 700; }
.side-tree .t2 { padding-left: 52px; }
.side-tree .t2::before { left: 36px; }
.side-tree .on { background: var(--yellow); }

/* File tile */
.ft { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid #c8c8c8; background: #fff; padding-bottom: 8px; }
.ft-thumb { position: relative; width: 100%; aspect-ratio: 1.55; overflow: hidden; border-bottom: 1px solid #ddd; background: #fff; }
.ft-thumb img { width: 100%; height: auto; }
.ft b { font-size: 13px; font-weight: 400; margin-top: 6px; padding: 0 6px; }
.ft small { font-size: 9.5px; color: var(--grey); line-height: 1.35; }
.ft-actions { display: none; justify-content: space-around; width: 100%; padding: 6px 0; background: #fff; }
.ft-view { position: absolute; inset: 0; display: none; place-items: center; background: #b4b4b4; color: #fff; font-size: 14px; }
.ft-hover, .ft:hover { border-color: var(--ink); border-width: 1.5px; }
.ft-hover .ft-actions, .ft:hover .ft-actions { display: flex; }
.ft-hover .ft-view, .ft:hover .ft-view { display: grid; }
.ft-hover .ft-thumb, .ft:hover .ft-thumb { aspect-ratio: 2.1; }
.ft-demo { width: 170px; }

/* Line icons drawn with masks so they take currentColor */
.ic { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; flex: none; }
.ic-share { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='18' cy='5' r='2.5'/%3E%3Ccircle cx='6' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='19' r='2.5'/%3E%3Cpath d='m8.3 13.3 7.4 4.4M15.7 6.3l-7.4 4.4'/%3E%3C/svg%3E"); }
.ic-down { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12m-5-5 5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.ic-up { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20V5m-6 6 6-6 6 6'/%3E%3C/svg%3E"); }
.ic-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E"); }
.ic-x { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E"); }
.ic-chev { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.ic-star { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1 6.2L12 17.3 6.5 20.2l1-6.2L3 9.6l6.2-.9z'/%3E%3C/svg%3E"); }
.ic-star.on { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1 6.2L12 17.3 6.5 20.2l1-6.2L3 9.6l6.2-.9z'/%3E%3C/svg%3E"); }
.ic-folder { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6a1 1 0 0 1 1-1h5l2 2h9a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ic-folder-o { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 6a1 1 0 0 1 1-1h5l2 2h9a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ic-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 11 12 4l8 7v9h-5v-6H9v6H4z'/%3E%3C/svg%3E"); }
.ic-person { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-6.5 8-6.5s8 2.5 8 6.5'/%3E%3C/svg%3E"); }
.ic-menu { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E"); }
.ic-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='14' cy='10' r='6'/%3E%3Cpath d='M9.6 14.4 4 20'/%3E%3C/svg%3E"); }
.ic-copy { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='8' y='8' width='12' height='13'/%3E%3Cpath d='M5 16V4h11'/%3E%3C/svg%3E"); }
.ic-edit { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-5L16 4l4 4L9 19z'/%3E%3Cpath d='M14 6l4 4'/%3E%3C/svg%3E"); }
.ic-clock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ic-pin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }

/* ==========================================================================
   Top bar
   ========================================================================== */
.bar { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--bar); display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); padding: 0 clamp(14px, 2.4vw, 32px); background: var(--ink); color: #fff; }
.bar-logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; flex: none; }
.bar-logo b { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.bar-logo span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.bar-search { flex: 1; min-width: 0; max-width: 560px; height: 38px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; background: #fff; color: var(--ink); text-align: left; }
.bar-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; margin-left: auto; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--grey); }
.crumbs span { flex: none; }
.crumbs span:last-child { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.crumbs span + span::before { content: "›"; margin-right: 6px; color: var(--grey-2); }
.bar-right { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); flex: none; }
.bar-link { font-size: 15px; font-weight: 700; text-decoration: none; transition: color 0.2s; }
.bar-link:hover { color: var(--yellow); }
.bar-progress { position: absolute; left: 0; bottom: -3px; height: 3px; width: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }

.palette { width: min(560px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border: 2px solid var(--ink); background: #fff; color: var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.palette::backdrop { background: rgba(0, 0, 0, 0.55); }
.palette-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1.5px solid var(--ink); }
.palette-field svg { width: 20px; height: 20px; fill: none; stroke: var(--grey); stroke-width: 2; stroke-linecap: round; flex: none; }
.palette-field input { flex: 1; min-width: 0; border: 0; outline: 0; font: 600 16px var(--font); background: none; }
.palette-field kbd { font: 500 11px var(--mono); color: var(--grey); border: 1px solid var(--line); padding: 2px 6px; }
.palette-list { max-height: 56vh; overflow: auto; padding: 6px; }
.palette-list a { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 10px; text-decoration: none; }
.palette-list a[aria-selected="true"], .palette-list a:hover { background: var(--yellow); }
.palette-list .code { justify-self: start; }
.palette-list b { font-weight: 700; font-size: 15px; }
.palette-list em { font-style: normal; font-size: 12px; color: var(--grey); }
.palette-empty { padding: 18px; color: var(--grey); font-size: 14px; }

/* ==========================================================================
   Contents tree, like the course sidebar
   ========================================================================== */
.tree { position: fixed; z-index: 40; left: 20px; top: calc(var(--bar) + 20px); width: 214px; max-height: calc(100vh - var(--bar) - 40px); overflow: auto; padding: 14px 0 10px; background: #fff; border: 1.5px solid var(--ink); opacity: 0; visibility: hidden; transform: translateX(-12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s, background 0.4s, border-color 0.4s, color 0.4s; scrollbar-width: thin; }
.tree.is-shown { opacity: 1; visibility: visible; transform: none; }
.tree-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); padding: 0 14px 8px; }
.tree-group > button { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px 8px 20px; font-size: 13px; font-weight: 800; text-align: left; border-top: 1px solid var(--line); }
.tree-group > button::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c); }
.tree-group:nth-child(1) { --c: var(--lav); } .tree-group:nth-child(2) { --c: var(--pink); } .tree-group:nth-child(3) { --c: var(--blue); } .tree-group:nth-child(4) { --c: var(--lime); }
.tree-group > button::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.3s; }
.tree-group.is-closed > button::after { transform: rotate(-45deg); }
.tree-group ul { padding: 2px 0 6px; }
.tree-group.is-closed ul { display: none; }
.tree-group li a { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 4px 14px 4px 34px; text-decoration: none; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background 0.25s; }
.tree-group li a::before { content: ""; position: absolute; left: 20px; top: 50%; width: 8px; border-top: 1px solid currentColor; opacity: 0.6; }
.tree-group li a small { font-family: var(--mono); font-size: 10px; color: var(--grey-2); flex: none; }
.tree-group li a:hover { background: var(--line-2); }
.tree-group li a[aria-current="true"] { background: var(--yellow); color: var(--ink); font-weight: 700; }
.tree-group li a[aria-current="true"] small { color: var(--ink); }
.tree.is-dark { background: #111; border-color: #fff; color: #fff; }
.tree.is-dark .tree-group > button { border-color: rgba(255, 255, 255, 0.15); }
.tree.is-dark .tree-group li a { color: rgba(255, 255, 255, 0.72); }
.tree.is-dark .tree-group li a:hover { background: rgba(255, 255, 255, 0.08); }
.tree.is-dark .tree-group li a[aria-current="true"] { color: var(--ink); }
@media (max-width: 1319px) { .tree { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: 100svh; padding: calc(var(--bar) + clamp(30px, 6vh, 70px)) var(--gut) clamp(40px, 8vh, 90px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; background: var(--ink); color: #fff; overflow: hidden; }
.hero .kicker { color: rgba(255, 255, 255, 0.6); }
.hero .code { background: var(--yellow); color: var(--ink); }
.hero-title { font-size: clamp(64px, 11.5vw, 196px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; margin: 22px 0 22px -0.04em; }
.ht-line { display: block; overflow: hidden; padding: 0 0.05em 0.08em 0; }
.ht-line .ch { display: inline-block; will-change: transform; }
.hero-sub { font-size: clamp(18px, 1.55vw, 23px); line-height: 1.45; font-weight: 400; max-width: 36ch; color: rgba(255, 255, 255, 0.86); }
.hero-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: clamp(28px, 5vh, 48px); max-width: 560px; }
.hero-meta div { border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 10px; }
.hero-meta dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 4px; }
.hero-meta dd { font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.85); }

.hero-art { position: relative; height: min(76vh, 720px); min-height: 460px; }
.hero-collage { position: absolute; inset: 0; overflow: hidden; background: #e9e6df; }
.hero-collage img { width: 100%; height: 115%; object-fit: cover; object-position: 40% 50%; }
.hero-strip { position: absolute; top: 0; right: 0; height: 100%; width: auto; }
.hero-cards { position: absolute; inset: 0; pointer-events: none; }
.hero-cards > * { position: absolute; width: clamp(150px, 14vw, 200px); box-shadow: 8px 8px 0 var(--ink); }
.hero-cards .cc { min-height: clamp(110px, 10.5vw, 146px); }
.hero-cards .cc b { font-size: clamp(14px, 1.1vw, 16px); }
.hero-cards > :nth-child(1) { left: -4%; top: 12%; transform: rotate(-5deg); }
.hero-cards > :nth-child(2) { left: 30%; top: 4%; transform: rotate(4deg); }
.hero-cards > :nth-child(3) { left: 8%; top: 54%; transform: rotate(3deg); }
.hero-cards > :nth-child(4) { left: 40%; top: 66%; transform: rotate(-4deg); }
.hero-cards .cd { left: 46%; top: 32%; transform: rotate(-2deg); min-height: clamp(110px, 10.5vw, 146px); }
.hero-cards .cd b { font-size: clamp(52px, 5vw, 76px); }
.hero-scroll { position: absolute; left: var(--gut); bottom: 22px; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.hero-scroll i { width: 46px; height: 1.5px; background: rgba(255, 255, 255, 0.25); position: relative; overflow: hidden; }
.hero-scroll i::after { content: ""; position: absolute; inset: 0; background: var(--yellow); animation: scrollhint 2.2s var(--ease) infinite; }
@keyframes scrollhint { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

.band { background: var(--yellow); padding: clamp(26px, 4vw, 44px) var(--gut); }
.band-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1320px; margin: 0 auto; }
.band-stats li { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--ink); padding-left: 16px; }
.band-stats b { font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.band-stats span { font-size: 13.5px; font-weight: 600; }

/* ==========================================================================
   Chapters
   ========================================================================== */
.chapter { padding: clamp(80px, 11vw, 150px) var(--gut) 0; padding-left: calc(var(--gut) + var(--rail)); }
.chapter > * { max-width: var(--w); margin-left: auto; margin-right: auto; }
.content > .chapter:last-child { padding-bottom: clamp(80px, 10vw, 140px); }
.ch-head { margin-bottom: clamp(30px, 4.5vw, 56px); }
.ch-title { font-size: clamp(38px, 5.2vw, 72px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin-top: 16px; }
.ch-lede { margin-top: 20px; font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.65; color: var(--ink-2); max-width: 66ch; }
.ch-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.ch-cols-tight { margin-top: clamp(30px, 4vw, 48px); grid-template-columns: 1fr 1fr; }

.goals { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.goals li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.goals b { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; }
.goals span { font-size: 16px; color: var(--ink-2); line-height: 1.55; }

/* ---------- Why this solution: comparison and principles ---------- */
.cmp-wrap { overflow-x: auto; border: 1.5px solid var(--ink); scrollbar-width: thin; }
.cmp { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 0; }
.cmp thead th.cmp-us { background: var(--yellow); color: var(--ink); }
.cmp tbody th { width: 26%; font-weight: 700; font-size: 14.5px; }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp td { color: var(--ink-2); line-height: 1.45; }
.cmp td::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 9px; vertical-align: -1px; border: 1.5px solid var(--ink); }
.cmp td.yes::before { background: var(--ink); }
.cmp td.part::before { background: linear-gradient(135deg, var(--ink) 50%, transparent 50%); }
.cmp td.no { color: var(--grey); }
.cmp td.no::before { border-color: var(--grey-2); }
.cmp td.cmp-us { background: #fff8e6; color: var(--ink); font-weight: 600; }
.cmp-l { display: none; }
@media (max-width: 700px) {
    .cmp-wrap { border: 0; overflow: visible; }
    .cmp { min-width: 0; }
    .cmp thead { display: none; }
    .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
    .cmp tr { margin-bottom: 12px; border: 1.5px solid var(--ink); }
    .cmp tbody th { width: auto; padding: 12px 14px; background: var(--ink); color: #fff; border: 0; }
    .cmp td { display: grid; grid-template-columns: 11px 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 14px; }
    .cmp td::before { grid-row: 1 / span 2; margin: 3px 0 0; }
    .cmp-l { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
    .cmp td.cmp-us .cmp-l { color: var(--ink); }
}
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: clamp(24px, 3.5vw, 40px); }
.principles article { position: relative; padding: 22px 20px 20px; border: 1.5px solid var(--ink); background: #fff; }
.principles article::before { content: ""; position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; height: 8px; background: var(--c); border: 1.5px solid var(--ink); border-bottom: 0; }
.principles b { display: block; margin: 6px 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.principles p { font-size: 15px; color: var(--ink-2); }

/* ---------- Diagrams from the IA work ---------- */
.sheet { position: relative; overflow: hidden; background: #fff; border: 1.5px solid var(--ink); }
.sheet img { width: 100%; height: auto; cursor: zoom-in; }
.sheet-tab { padding: 10px 14px; border-bottom: 1.5px solid var(--ink); background: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sheet figcaption { padding: 12px 16px 16px; font-size: 14px; color: var(--grey); border-top: 1px solid var(--line); }
.sheet-wide { margin-bottom: clamp(20px, 3vw, 32px); }
.ia-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); align-items: stretch; }
.hier { display: flex; flex-direction: column; padding: 24px; background: var(--ink); color: #fff; }
.hier-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 18px; }
.hier ol { display: grid; flex: 1; align-content: center; }
.hier li { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0 9px 26px; }
.hier li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 1.5px; background: rgba(255, 255, 255, 0.25); }
.hier li::after { content: ""; position: absolute; left: 2px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--yellow); }
.hier li:first-child::before { top: 50%; } .hier li:last-child::before { bottom: 50%; }
.hier li span { font-size: clamp(18px, 1.7vw, 23px); font-weight: 600; }
.hier li em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink); background: var(--yellow); padding: 3px 7px; white-space: nowrap; }
.hier li:nth-child(2) em { background: var(--lav); } .hier li:nth-child(3) em { background: #fff; }
.hier li:nth-child(4) em { background: var(--pink); } .hier li:nth-child(5) em { background: var(--lime); } .hier li:nth-child(6) em { background: var(--blue); }
.hier-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 14px; color: rgba(255, 255, 255, 0.75); }
.hier-note a { color: var(--yellow); font-weight: 700; }

/* ---------- Wireframes ---------- */
.chapter-wire { overflow: hidden; }
.wire-track { display: flex; gap: clamp(16px, 2vw, 28px); max-width: none !important; width: max-content; margin-left: 0 !important; will-change: transform; }
.wire { flex: none; width: min(64vw, 820px); }
.wire img { width: 100%; height: auto; border: 1.5px solid var(--ink); background: #fff; cursor: zoom-in; }
.wire figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 14px; font-size: 14.5px; color: var(--ink-2); max-width: 64ch; }
.wire figcaption b { flex: none; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 3px 8px; }
.wire-hint { margin-top: 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
@media (min-width: 901px) {
    .chapter-wire { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--bar) + 40px); padding-bottom: 40px; }
    .chapter-wire .ch-head { margin-bottom: 30px; }
    .wire { width: min(56vw, calc((100vh - 380px) * 1.4), 900px); }
    .wire-track { padding-left: max(0px, calc((100vw - var(--rail) - var(--gut) * 2 - var(--w)) / 2)); }
}

/* ---------- Visual design: wireframe and final, side by side ---------- */
.pairs { display: grid; gap: clamp(40px, 6vw, 72px); }
.pair { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(20px, 3.5vw, 48px); align-items: center; }
.pair-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.pair-row-stack { grid-template-columns: minmax(0, 1fr); }
.pair figure { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 34px 16px 16px; border: 1.5px solid var(--ink); background: #fff; min-height: 170px; }
.pair figcaption { position: absolute; left: 0; top: 0; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; background: var(--ink); color: #fff; }
.pair-wf { background: #f4f4f4 !important; }
.pair-wf figcaption { background: #bdbdbd; color: var(--ink); }
.pair-wf img { width: 100%; height: auto; }
.pair-wf-narrow img { max-width: 260px; margin: 0 auto; }
.pair-final figcaption { background: var(--yellow); color: var(--ink); }
.pair-dark { background: var(--ink) !important; }
.pair-copy h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.pair-copy p { font-size: 15.5px; color: var(--ink-2); }
.pf-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-courses .cc { min-height: 92px; }
.pf-courses .cc b { font-size: 13px; }
.pf-countdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-countdown .cd { min-width: 0; }
.pf-favs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-favs .fv { min-height: 120px; }
.pair .bhead { padding: 14px 16px; }
.side-demo { border: 1px solid var(--line); }

/* ---------- Design system ---------- */
.ds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.ds-block { padding: clamp(18px, 2.4vw, 28px); border: 1.5px solid var(--ink); background: #fff; }
.ds-components, .ds-illus { grid-column: 1 / -1; }
.ds-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); margin-bottom: 18px; }
.ds-note { font-size: 13.5px; color: var(--grey); margin: -8px 0 16px; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 12px; }
.swatches li { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.swatches i { display: block; aspect-ratio: 1.3; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; transition: transform 0.4s var(--ease); }
.swatches li:hover i { transform: translateY(-4px); }
.swatches b { font-weight: 700; }
.swatches code { background: none; padding: 0; font-size: 11.5px; color: var(--ink-2); }
.swatches span { font-size: 11.5px; color: var(--grey); }
.type-scale li { display: grid; grid-template-columns: 124px 1fr; align-items: baseline; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.type-scale li:first-child { border-top: 0; padding-top: 0; }
.t-meta { font-family: var(--mono); font-size: 11px; color: var(--grey); }
.t-display { font-size: clamp(38px, 4vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.t-title { font-size: 27px; font-weight: 700; line-height: 1.15; }
.t-title .lt { font-weight: 300; }
.t-label { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.t-body { font-size: 15px; color: var(--grey); }
.comp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.comp { display: flex; flex-direction: column; }
.comp-stage { flex: 1; display: grid; place-items: center; min-height: 200px; padding: 20px; background: var(--cream); }
.comp-dark { background: var(--ink); }
.comp-cards { grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.comp-cards > * { width: 100%; }
.comp-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.comp figcaption { font-size: 12.5px; font-weight: 600; color: var(--grey); margin-top: 10px; }
.illus-row { display: grid; grid-template-columns: 1.4fr 1.6fr 0.8fr 0.8fr 0.7fr; gap: 18px; align-items: end; }
.illus-row img { width: 100%; height: auto; max-height: 180px; object-fit: contain; }

/* ---------- Roles ---------- */
.roles { margin-top: clamp(50px, 7vw, 90px); }
.role-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.role-table th, .role-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.role-table thead th { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); border-bottom: 2px solid currentColor; }
.role-table thead th:first-child, .role-table tbody th { text-align: left; }
.role-table tbody th { font-weight: 600; }
.role-table td { width: 15%; font-size: 13px; font-weight: 700; }

/* ---------- Launch: the "Now on mobile" poster, rebuilt ---------- */
.launch { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: stretch; }
.poster { position: relative; display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 842 / 595; overflow: hidden; background: #f7f1e5; border: 1.5px solid var(--ink); container-type: inline-size; }
.po-left { display: flex; flex-direction: column; padding: 7cqw 5cqw 5cqw; }
.po-name { font-size: 8.4cqw; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.po-sub { font-size: 1.9cqw; margin-top: 1cqw; }
.po-now { font-size: 4.6cqw; font-weight: 800; line-height: 1.05; margin-top: auto; }
.po-qr { display: flex; align-items: flex-end; gap: 2cqw; margin-top: 3cqw; }
.po-qr p { font-size: 1.7cqw; font-weight: 700; line-height: 1.25; }
.qr { display: grid; grid-template-columns: repeat(21, 1fr); width: 13cqw; aspect-ratio: 1; padding: 0.6cqw; background: #fff; }
.qr i { background: var(--ink); }
.qr i.o { background: transparent; }
.po-right { position: relative; background: linear-gradient(var(--yellow-2) 0 62%, transparent 62%); }
.po-phone { position: absolute; width: 19cqw; aspect-ratio: 360 / 800; overflow: hidden; border: 0.7cqw solid #111; border-radius: 2.6cqw; background: #000; box-shadow: 1.2cqw 1.2cqw 0 rgba(0, 0, 0, 0.25); }
.po-phone-a { left: 7cqw; top: 12cqw; transform: rotate(-9deg); }
.po-phone-b { left: 22cqw; top: 6cqw; transform: rotate(8deg); }
.award { display: flex; flex-direction: column; padding: clamp(20px, 2.6vw, 30px); background: var(--yellow); }
.award-k { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.award-t { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 10px 0 8px; }
.award-d { font-size: 14px; }
.award-stats { margin-top: auto; padding-top: 24px; display: grid; gap: 12px; }
.award-stats li { display: flex; flex-direction: column; border-top: 2px solid var(--ink); padding-top: 8px; font-size: 13px; font-weight: 600; }
.award-stats b { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }

.outro { margin-top: clamp(50px, 7vw, 90px); padding: clamp(28px, 5vw, 56px); background: var(--ink); color: #fff; }
.outro-q { font-size: clamp(24px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; max-width: 26ch; }
.outro-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.outro .btn-ch-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.outro a.btn-ch:hover { box-shadow: 0 6px 0 var(--yellow); }
.outro a.btn-ch-ghost:hover { box-shadow: inset 0 0 0 1.5px #fff, 0 6px 0 var(--yellow); }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px var(--gut); padding-left: calc(var(--gut) + var(--rail)); background: var(--ink); color: rgba(255, 255, 255, 0.6); font-size: 13px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.foot a { color: #fff; font-weight: 700; text-decoration: none; }
.foot a:hover { color: var(--yellow); }

.zoom { max-width: 96vw; max-height: 94vh; padding: 0; border: 2px solid var(--ink); background: #fff; overflow: auto; }
.zoom::backdrop { background: rgba(0, 0, 0, 0.8); }
.zoom img { width: min(1600px, 94vw); height: auto; }
.zoom-close { position: sticky; top: 8px; float: right; margin: 8px; width: 38px; height: 38px; background: var(--ink); color: #fff; font-size: 22px; line-height: 1; z-index: 2; }

/* ==========================================================================
   Narrow screens
   ========================================================================== */
@media (max-width: 900px) {
    :root { --bar: 56px; }
    .bar-logo span { display: none; }
    .bar-logo b { font-size: 17px; }
    .bar-search { height: 34px; padding: 0 10px; }
    .crumbs { font-size: 12.5px; }
    .crumbs span:not(:last-child) { display: none; }
    .crumbs span::before { display: none; }
    .bar-link:first-child { display: none; }
    .hero { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 30px; padding-bottom: 60px; }
    .hero-title { margin: 16px 0 16px -0.04em; }
    .hero-art { height: 112vw; min-height: 0; max-height: 560px; }
    .hero-cards > * { width: 40vw; max-width: 200px; box-shadow: 5px 5px 0 var(--ink); }
    .hero-cards > :nth-child(1) { left: -2%; top: 8%; }
    .hero-cards > :nth-child(2) { left: 40%; top: 2%; }
    .hero-cards > :nth-child(3) { left: 2%; top: 60%; }
    .hero-cards > :nth-child(4) { left: 44%; top: 70%; }
    .hero-cards .cd { left: 30%; top: 34%; }
    .hero-scroll { display: none; }
    .band-stats { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
    .ch-cols, .ch-cols-tight, .ia-split, .launch { grid-template-columns: minmax(0, 1fr); }
    .goals li { grid-template-columns: 1fr; gap: 4px; }
    .principles { grid-template-columns: minmax(0, 1fr); }
    .cmp th, .cmp td { padding: 12px; }
    .pair { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .pair-row { grid-template-columns: minmax(0, 1fr); }
    .pf-favs { gap: 6px; }
    .pf-favs .fv { padding: 14px 8px 8px; min-height: 100px; }
    .pf-favs .fv b { font-size: 13px; }
    .pf-favs .fv em { font-size: 10px; }
    .pair .bhead { flex-direction: column; align-items: flex-start; }
    .ds { grid-template-columns: minmax(0, 1fr); }
    .swatches { gap: 12px 8px; }
    .swatches span { display: none; }
    .comp-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .illus-row { grid-template-columns: 1fr 1fr; }
    .type-scale li { grid-template-columns: 1fr; gap: 4px; }
    .wire-track { overflow-x: auto; width: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(var(--gut) * -1) !important; padding-right: var(--gut); scrollbar-width: none; }
    .wire-track::-webkit-scrollbar { display: none; }
    .wire { width: 84vw; scroll-snap-align: start; }
    .wire figcaption { flex-direction: column; gap: 6px; }
    .role-table { font-size: 13px; }
    .role-table th, .role-table td { padding: 10px 6px; }
    .role-table td { font-size: 11px; }
    .foot { padding-left: var(--gut); }
}
@media (max-width: 520px) {
    .hero-meta { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
