/* Brand Patterns — Figma 710:829 */
body[data-chapter="patterns"] { --dock-y: 168; --dock-x: 160; }

/* hero: lilac field, navy title (Figma) */
.fh.th-lilac { color: var(--m-navy); }
.fh.th-lilac .fh__title { text-shadow: 0 10px 50px rgba(255,255,255,.25); }
.fh.th-lilac .fh__panel { box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 50px 120px -50px rgba(14,19,60,.35); background: rgba(255,255,255,.08); }
.fh.th-lilac .fh__s img { filter: blur(var(--strip-blur, 7px)) saturate(1.15); opacity: .95; }
@media (min-width: 761px) { .fh .fh__chips { max-width: 1240px; justify-content: center; } }

.pt-hint { align-self: end; white-space: nowrap; }

/* ---------- 02 intro ---------- */
.pt-intro__grid { display: grid; gap: var(--s-6); }
.pt-intro__head { display: grid; gap: var(--s-6); justify-items: start; }
.pt-snap { display: inline-flex; gap: .55em; font-size: clamp(20px, calc(31 * var(--fx)), 31px); }
.pt-snap svg { width: 1em; height: 1em; overflow: visible; }
.pt-intro__copy { display: grid; gap: var(--s-5); max-width: 1180px; }
.pt-intro__copy .t-lead { font-size: clamp(18px, calc(32 * var(--fx)), 32px); line-height: 1.45; }

/* ---------- 03 meaning: Figma 2x2, every shape and meaning visible ---------- */
.pm4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
.pmc { display: grid; grid-template-columns: clamp(120px, calc(250 * var(--fx)), 250px) minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.pmc__stage {
  position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden;
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .3s, transform .6s var(--ease);
}
.pmc__stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .3s; pointer-events: none; }
.pmc:hover .pmc__stage::after { box-shadow: inset 0 0 0 1.5px var(--line); }
.pmc.is-sel .pmc__stage::after { box-shadow: inset 0 0 0 2px var(--m-navy); }
.pmc.is-sel .pmc__stage { transform: translateY(-4px); }
.pmc__text { display: grid; gap: .5em; align-content: center; }
.pmc__text .t-small { color: var(--fg-soft); max-width: 34em; transition: color .3s; }
.pmc.is-sel .pmc__text .t-small, .pmc:hover .pmc__text .t-small { color: var(--fg); }
.pmc__text h3 { position: relative; }
.pmc.is-sel .pmc__text h3::after { content: ""; display: inline-block; width: .28em; height: .28em; margin-left: .45em; vertical-align: .18em; border-radius: 2px; transform: rotate(45deg); background: var(--m-purple); }
.pm__svg { width: 100%; height: 100%; display: block; }
.pm__grid { stroke: rgba(14,19,60,.06); stroke-width: 1; fill: none; }
.pm__grid.is-major { stroke: rgba(14,19,60,.12); }
.pm__tick { stroke: rgba(101,47,234,.55); stroke-width: 1; fill: none; }
.pm__cross { stroke: rgba(101,47,234,.22); stroke-width: 1; stroke-dasharray: 4 6; fill: none; }
.pm__sub { font: 700 var(--t-small)/1.3 var(--font-display); }

/* ---------- 04 direction ---------- */
.pt-dir__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-7); align-items: center; }
.pt-dir__text { display: grid; gap: var(--s-4); max-width: 980px; }
.pt-fit { justify-self: end; width: min(100%, 420px); }
.pt-fit__svg { width: 100%; height: auto; overflow: visible; }
.pt-fit__slot { fill: none; stroke: var(--m-lilac); stroke-width: 1.5; stroke-dasharray: 6 6; }
.pt-fit__guide { stroke: rgba(101,47,234,.18); stroke-width: 1; fill: none; }

/* ---------- 05 animation: code stand-ins for the Figma video tiles ---------- */
.pt-anim { padding-bottom: 0; }
.pt-anim__head { display: grid; gap: var(--s-3); }
.pt-anim__play { display: inline-flex; align-items: center; gap: .6em; align-self: end; font: 500 var(--t-small)/1 var(--font-display); white-space: nowrap; }
.pt-anim__ico { width: 12px; height: 12px; display: inline-block; background: currentColor; -webkit-mask: linear-gradient(90deg, #000 0 35%, transparent 35% 65%, #000 65%); mask: linear-gradient(90deg, #000 0 35%, transparent 35% 65%, #000 65%); }
.pt-anim__play[aria-pressed="true"] .pt-anim__ico { -webkit-mask: none; mask: none; clip-path: polygon(10% 0, 100% 50%, 10% 100%); }
.pa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-6); }
.pa--strip { grid-template-columns: 1328fr 1182fr 1330fr; margin-top: clamp(16px, calc(36 * var(--fx)), 36px); }
.pa__t { position: relative; overflow: hidden; }
.pa__t svg { width: 100%; height: auto; display: block; }
.pa__s, .pa__tri, .pa__cell, .pa__wheel, .pa__cmp, .pa__star, .pa__dot { transform-box: fill-box; transform-origin: center; }

.pa--rise .pa__s { animation: pa-rise 5.2s var(--ease) infinite; animation-delay: calc(var(--i) * .14s); }
@keyframes pa-rise {
  0% { opacity: 0; transform: translateY(46px); }
  14%, 40% { opacity: 1; transform: none; }
  58%, 80% { opacity: 1; transform: rotate(90deg); }
  96%, 100% { opacity: 0; transform: translateY(-46px) rotate(90deg); }
}
.pa--slide .pa__s { animation: pa-slide 5s cubic-bezier(.7, 0, .2, 1) infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes pa-slide {
  0% { opacity: 0; transform: translateX(-140px); }
  16%, 74% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: translateX(140px); }
}
.pa--pop .pa__s { animation: pa-pop 4.6s var(--ease) infinite; animation-delay: calc(var(--i) * .16s); }
@keyframes pa-pop {
  0% { transform: scale(0) rotate(-90deg); }
  16% { transform: scale(1.18) rotate(0); }
  24%, 76% { transform: scale(1) rotate(0); }
  92%, 100% { transform: scale(0) rotate(90deg); }
}
.pa--flip .pa__s { animation: pa-flip 4.8s var(--ease-io) infinite; animation-delay: calc(var(--i) * .18s); }
@keyframes pa-flip {
  0%, 18% { transform: scaleX(1) translateY(0); }
  32% { transform: scaleX(-1) translateY(-14px); }
  46%, 64% { transform: scaleX(1) translateY(0); }
  78% { transform: scaleX(-1) translateY(10px); }
  92%, 100% { transform: scaleX(1) translateY(0); }
}
/* pat 12: rulers fly in from the corners and lock into the pinwheel */
.pa__tri { animation: pa-tri 5.4s var(--ease) infinite; animation-delay: calc(var(--i) * .08s); }
@keyframes pa-tri {
  0% { opacity: 0; transform: translate(calc(var(--dx) * 2.2), calc(var(--dy) * 2.2)) rotate(45deg); }
  22%, 70% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: translate(calc(var(--dx) * 1.4), calc(var(--dy) * 1.4)); }
}
.pa__wheel { animation: pa-wheel 5.4s var(--ease-io) infinite; }
@keyframes pa-wheel { 0%, 30% { transform: rotate(0); } 52%, 100% { transform: rotate(90deg); } }
/* pat 13: the compass needle swings and settles */
.pa__cmp { animation: pa-cmp 5s var(--ease) infinite; }
@keyframes pa-cmp { 0% { transform: scale(0); opacity: 0; } 14%, 84% { transform: scale(1); opacity: 1; } 98%, 100% { transform: scale(0); opacity: 0; } }
.pa__star { animation: pa-star 5s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes pa-star { 0%, 12% { transform: rotate(-180deg) scale(.4); } 34% { transform: rotate(18deg) scale(1); } 44% { transform: rotate(-8deg); } 52%, 100% { transform: rotate(0); } }
.pa__dot { animation: pa-dot 5s var(--ease) infinite; }
@keyframes pa-dot { 0%, 30% { transform: scale(0); } 40%, 100% { transform: scale(1); } }
/* pat 12 copy: two rows of the alphabet light up in sequence */
.pa__cell { animation: pa-cell 5.6s var(--ease) infinite; animation-delay: calc(var(--i) * .16s); }
@keyframes pa-cell { 0% { opacity: 0; transform: scale(.3) rotate(-45deg); } 12%, 66% { opacity: 1; transform: none; } 82%, 100% { opacity: 0; transform: scale(.3) rotate(45deg); } }

.pt-anim.is-paused .pa *, .pt-anim.is-paused .pa__t * { animation: none !important; }
.pt-anim.is-off .pa * { animation-play-state: paused !important; }

/* ---------- 06 options ---------- */
.po { display: grid; grid-template-columns: minmax(0, 260fr) minmax(0, 546fr) minmax(0, 200fr); gap: var(--s-4); --ok: calc(var(--fx) * 1.1); }
.po__card {
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-card); text-align: left;
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .3s, background .3s, transform .5s var(--ease);
  min-height: clamp(220px, calc(400 * var(--fx)), 400px);
}
.po__card:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.po__card[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--m-navy); }
.po__label { font: 700 clamp(16px, calc(24 * var(--fx)), 24px)/1.2 var(--font-display); color: var(--m-navy); display: inline-flex; align-items: center; gap: .6em; }
.po__card[aria-checked="true"] .po__label::after { content: ""; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--m-purple); }
.po__art { display: grid; place-items: center; }
.po__art svg { width: calc(var(--w) * var(--ok)); height: calc(var(--h) * var(--ok)); overflow: visible; }
.po__desc { color: var(--fg-soft); align-self: end; max-width: 30em; }

/* ---------- 07/08 patterns on backgrounds: all four boards + colour table ---------- */
.pt-bg--sec { padding-top: 0; }
.pt-bg__label { font: 700 var(--t-h4)/1.2 var(--font-display); letter-spacing: -.01em; margin-bottom: var(--s-5); }
.pb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, calc(32 * var(--fx)), 32px); max-width: max(calc(1384 * var(--fx)), 900px); margin-inline: auto; align-items: start; }
.pb__board {
  display: grid; padding: 7.5% 9.6% 5.5%; background: var(--board); color: var(--lab); border-radius: 2px;
  box-shadow: 0 40px 70px -50px rgba(14,19,60,.45);
}
.pb__row { display: grid; gap: clamp(8px, calc(18 * var(--fx)), 18px); margin: 0 -14px; padding: 10px 14px 16px; border-radius: 12px; text-align: left; transition: box-shadow .25s, background .25s; }
.pb__label { font: 700 clamp(11px, calc(16 * var(--fx)), 16px)/1.2 var(--font-display); color: var(--lab); }
.pb__row svg { width: 100%; height: auto; overflow: visible; }
.pb__row svg g { transition: transform .5s var(--ease); transform-box: fill-box; transform-origin: center; }
.pb__row:hover, .pb__row.is-hl { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lab) 45%, transparent); }
.pb__row.is-hl svg g { transform: translateY(-3px); }
.pb__row[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--lab); }
.pb__specwrap { max-width: max(calc(1384 * var(--fx)), 900px); margin: var(--s-5) auto 0; overflow-x: auto; }
.pb__spec { width: 100%; border-collapse: collapse; font: 500 var(--t-micro)/1.2 var(--font-display); }
.pb__spec th, .pb__spec td { padding: 6px 8px; text-align: left; white-space: nowrap; }
.pb__spec thead th { font-weight: 600; color: var(--fg-soft); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; padding-bottom: 10px; }
.pb__spec tbody + tbody { border-top: 1px solid var(--line); }
.pb__spec tbody tr { transition: background .25s; }
.pb__spec tr.is-hl td { background: var(--tile); }
.pb__spec tr.is-sel td { background: rgba(101,47,234,.08); }
.pb__spec tr.is-sel td:nth-of-type(1) { font-weight: 700; }
.pb__hex { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; margin: -5px -8px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .25s; }
.pb__hex:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.pb__hex code { font: 500 12px/1 ui-monospace, Menlo, monospace; color: var(--fg-soft); }
.pb__hex span:not(.pb__sw) { font-weight: 600; }
.pb__sw { width: 16px; height: 16px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(14,19,60,.18); flex: none; }

/* ---------- generator ---------- */
.pt-gen__hint { margin-top: .4em; }
.pg { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-6); align-items: start; }
.pg__controls { display: grid; gap: var(--s-4); }
.pg__field { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.pg__field .seg { flex-wrap: wrap; justify-self: start; }
.pg__field .seg button[aria-checked="true"] { background: var(--fg); color: var(--bg); }
.pg__rows button { min-width: 2.6em; }
.pg__boards { display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: center; }
.pg__grp { font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; min-width: 6.5em; }
.pg__board {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 12px; background: #fff;
  font: 500 var(--t-small)/1 var(--font-display); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .25s, transform .4s var(--ease);
}
.pg__board i { width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(14,19,60,.15); flex: none; }
.pg__board:hover { box-shadow: inset 0 0 0 1.5px var(--m-navy); }
.pg__board[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--m-purple); }
.pg__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pg__actions .btn--ghost[aria-pressed="true"] { background: var(--m-navy); color: #fff; box-shadow: none; }
.pg__out { display: grid; gap: var(--s-3); }
.pg__stage { display: block; width: 100%; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 40px 80px -50px rgba(14,19,60,.5); cursor: copy; }
.pg__stage svg { width: 100%; height: auto; display: block; }
.pg__stage:focus-visible { outline-offset: 4px; }
.pg-bg { transition: fill .8s var(--ease); }
.pg-s { transition: transform 1s var(--ease); }
.pg-s path { transition: fill .7s var(--ease); }
.pg-spin { transform-box: fill-box; transform-origin: center; }
#g-svg.is-anim .pg-spin { animation: pg-spin 4s var(--ease) infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes pg-spin { 0%, 25% { transform: rotate(0); } 50%, 100% { transform: rotate(90deg); } }
.pg__meta { display: grid; gap: var(--s-2); }
.pg__spec { display: flex; flex-wrap: wrap; gap: 8px; }
.pg__sw { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: 500 var(--t-micro)/1 var(--font-display); transition: box-shadow .25s; }
.pg__sw:hover { box-shadow: inset 0 0 0 1.5px var(--m-navy); }
.pg__sw i { width: 20px; height: 20px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(14,19,60,.18); }
.pg__sw b { font: 500 var(--t-micro)/1 ui-monospace, Menlo, monospace; color: var(--fg-soft); }
.pg__copy { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 09 usage ---------- */
.pt-usage__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-6); align-items: stretch; }
.pt-usage__text { display: grid; grid-template-rows: auto auto 1fr; gap: var(--s-5); align-content: start; }
.pt-usage__text .t-lead { max-width: 17em; }
.pt-usage__shapes { display: inline-flex; gap: .55em; align-self: end; font-size: clamp(20px, calc(31 * var(--fx)), 31px); }
.pt-usage__shapes svg { width: 1em; height: 1em; }
.pu { display: grid; }
.pu__top { display: grid; grid-template-columns: 692fr 646fr 564fr; grid-template-rows: 352fr 362fr 430fr; aspect-ratio: 1902 / 1144; }
.pu__bot { display: grid; grid-template-columns: 956fr 946fr; aspect-ratio: 1902 / 642; }
.pu__t { position: relative; overflow: hidden; display: block; width: 100%; height: 100%; background: #1A1A1A; }
.pu__t img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .5s; }
.pu__t:hover img { transform: scale(1.05); }
.pu__t:focus-visible { outline-offset: -4px; outline-color: #fff; }
.pu__t--lanyard { grid-row: 1 / 4; grid-column: 1; }
.pu__t--posters { grid-row: 1; grid-column: 2; }
.pu__t--stationery { grid-row: 2; grid-column: 2; }
.pu__t--tshirt { grid-row: 3; grid-column: 2; }
.pu__t--cards { grid-row: 1 / 4; grid-column: 3; }

/* ---------- 10 how we use it ---------- */
.pt-how__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-7); align-items: center; }
.pt-how__text { display: grid; gap: var(--s-4); }
.pt-how__text .t-lead { max-width: 40em; }
.pt-how__seg { justify-self: start; margin-top: var(--s-2); }
.pt-how__seg button { display: inline-flex; align-items: center; gap: .55em; }
.pt-how__seg i { width: 14px; height: 14px; display: inline-block; background: currentColor; }
.pt-how__seg i.ok { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5 9.5 18 20 6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%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 24 24'%3E%3Cpath d='M4 12.5 9.5 18 20 6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.pt-how__seg i.no { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%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 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.ph { display: grid; gap: var(--s-2); justify-items: center; }
.ph__card { position: relative; width: min(100%, 420px); aspect-ratio: 4 / 5; border-radius: var(--r-card); overflow: hidden; background: var(--m-purple); color: #fff; box-shadow: 0 40px 80px -45px rgba(14,19,60,.6); }
.ph__logo { position: absolute; left: 9%; top: 8%; width: 17%; height: auto; z-index: 2; transition: opacity .6s; }
.ph__row { position: absolute; left: 9%; bottom: 8%; display: flex; gap: 4.5%; width: 46%; z-index: 2; transition: opacity .6s; }
.ph__row svg { width: 19%; height: auto; aspect-ratio: 1; }
.ph__flood span { position: absolute; display: block; aspect-ratio: 1; transform: scale(0) rotate(var(--r)); opacity: 0; transition: transform .7s var(--ease) var(--d), opacity .5s var(--ease) var(--d); }
.ph__flood svg { width: 100%; height: 100%; }
.ph[data-mode="overused"] .ph__flood span { transform: scale(1) rotate(var(--r)); opacity: 1; }
.ph[data-mode="overused"] .ph__logo { opacity: .55; }
.ph__verdict { display: flex; align-items: center; gap: .5em; font-family: var(--font-display); font-weight: 600; }
.ph__verdict span { display: none; }
.ph[data-mode="minimal"] .ph__verdict [data-v="minimal"], .ph[data-mode="overused"] .ph__verdict [data-v="overused"] { display: inline; }
.ph__verdict span::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .45em; vertical-align: -.1em; background: currentColor; -webkit-mask: var(--vm) center/contain no-repeat; mask: var(--vm) center/contain no-repeat; }
.ph__verdict [data-v="minimal"] { --vm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5 9.5 18 20 6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); color: var(--m-purple); }
.ph__verdict [data-v="overused"] { --vm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pm4 { grid-template-columns: 1fr; max-width: 820px; }
}
@media (max-width: 900px) {
  .pt-hint { display: none; }
  .pt-dir__grid, .pg, .pt-usage__grid, .pt-how__grid { grid-template-columns: 1fr; }
  .pt-fit { justify-self: center; width: min(100%, 360px); }
  .po { grid-template-columns: 1fr; --ok: calc(var(--fx) * 2.3); }
  .po__card { min-height: 0; }
  .pb { grid-template-columns: 1fr; max-width: 560px; }
  .pt-usage__shapes { margin-top: var(--s-2); }
}
@media (max-width: 600px) {
  .pa { grid-template-columns: 1fr; }
  .pa--strip { grid-template-columns: 1fr; }
  .pa--strip .pa__t svg { max-height: 60vw; }
  .pa--strip .pa__t { display: grid; place-items: center; background: var(--m-purple); }
  .pa--strip .pa__t:nth-child(2) { background: var(--m-navy); }
  .pmc { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; }
  .pg__boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg__grp { grid-column: 1 / -1; }
  .pt-anim .hd { flex-direction: column; align-items: flex-start; }
}
/* verdict icons use the UI palette from Brand Colors: Error (Default) for the cross, Success (Default) for the tick */
.ph__verdict [data-v="overused"]::before { background: var(--pt-err, #FB2A23); }
.ph__verdict [data-v="minimal"] { color: inherit; }
.ph__verdict [data-v="minimal"]::before { background: #25AB68; }

/* grid children may shrink below their images' intrinsic width (phones) */
.pt-intro__grid > *, .pm4 > *, .pmc > *, .pt-dir__grid > *, .po > *, .pb > *, .pg > *, .pg__controls > *, .pg__out > *, .pt-usage__grid > *, .pu > *, .pu__top > *, .pu__bot > *, .pt-how__grid > *, .pa > * { min-width: 0; }

/* colour table on phones: board name on its own line, then Option + four fills, so every value shows without sideways scrolling */
@media (max-width: 600px) {
  .pb__specwrap { overflow: visible; }
  .pb__spec, .pb__spec thead, .pb__spec tbody { display: block; }
  .pb__spec tr { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); align-items: center; }
  .pb__spec thead th:first-child, .pb__spec tbody th[scope="rowgroup"] { grid-column: 1 / -1; padding-top: 12px; }
  .pb__spec th, .pb__spec td { padding: 5px 3px; }
  .pb__spec thead th { font-size: 9.5px; letter-spacing: .04em; }
  .pb__spec td .pb__hex { gap: 4px; margin: -4px -3px; padding: 4px 3px; }
  .pb__spec td .pb__sw { width: 11px; height: 11px; border-radius: 3px; }
  .pb__spec td .pb__hex code { font-size: 9.5px; }
}

/* jump between the Main and Secondary background slides (both always visible; the chip marks where you are) */
.pt-bg__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-5); }
.pt-bg__head .pt-bg__label { margin-bottom: 0; }
.pt-bg__jump .chip { font-size: clamp(12px, calc(16 * var(--fx)), 16px); }
