:root {
  --ink: #18202e;
  --muted: #586273;
  --paper: #ffffff;
  --mist: #eef1f5;
  --line: #d9dee6;
  --plate: #2b313c;
  --blue: #1f5cc4;
  --red: #d3262d;
  --yellow: #f6c915;
  --olive: #6f7d2c;
  --orange: #e8720c;
  --accent: var(--blue);
  --focus: #1f5cc4;
  --radius: 10px;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Atkinson Hyperlegible", Verdana, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f5;
    --muted: #a7b0bf;
    --paper: #12161d;
    --mist: #1b212b;
    --line: #2e3645;
    --focus: #7fb6e8;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.brand img { width: 38px; height: 38px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--mist); }
.nav .shop a { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; margin-left: auto; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 12px; font: 700 1rem var(--body); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a { padding: 12px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: 700 1rem var(--body); text-decoration: none; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: .95rem; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero */
.hero { padding: clamp(32px, 6vw, 72px) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .98; letter-spacing: -0.03em; }
.hero .lead { font-size: 1.25rem; max-width: 36ch; color: var(--muted); }
.hero-tray { max-width: 520px; justify-self: center; width: 100%; }
.hero-tray rect.t { transform-box: fill-box; transform-origin: center; animation: drop .5s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i) * 9ms + 200ms); }
@keyframes drop { from { opacity: 0; transform: scale(.2) rotate(-90deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-tray rect.t { animation: none; } }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero-tray { max-width: 380px; } }

/* sections */
.band { padding: clamp(40px, 6vw, 72px) 0; }
.band.mist { background: var(--mist); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }

/* tray cards */
.trays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .trays { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trays { grid-template-columns: 1fr; } }
.tray-card { display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-top: 6px solid var(--accent); }
.band.mist .tray-card { border-color: transparent; border-top-color: var(--accent); }
.tray-card .pic { background: var(--mist); padding: 16px; aspect-ratio: 1; display: grid; place-items: center; }
.band.mist .tray-card .pic { background: var(--paper); }
.tray-card .pic img { max-height: 100%; }
.tray-card .txt { padding: 16px 18px 20px; }
.tray-card h3 { margin-bottom: .25em; font-size: 1.5rem; }
.tray-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.tray-card .count { font-weight: 700; color: var(--ink); }
.tray-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

/* breadcrumbs */
.crumbs { font-size: .95rem; color: var(--muted); padding: 18px 0 14px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }

.page-head { padding: 20px 0 28px; }
.page-head p.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0 1.6em; font-size: .98rem; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.steps > li::before { content: counter(s); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--accent); color: #fff; font: 800 1.5rem var(--display); }
.steps h3 { margin: 6px 0 .3em; }
.steps p { margin: 0; }

/* tray intro */
.tray-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 820px) { .tray-intro { grid-template-columns: 1fr; } }
.facts { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 8px; }
.facts li { padding-left: 22px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; border-radius: 3px; background: var(--accent); }
.editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.edition { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; text-decoration: none; }
.edition:hover { border-color: var(--ink); }
.edition h3 { margin: 0 0 4px; }
.edition p { margin: 0; color: var(--muted); font-size: .95rem; }

/* swatches */
.supply { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0; margin: 0; list-style: none; font-size: .95rem; }
.supply li { display: flex; align-items: center; gap: 6px; }
.sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.25); flex: none; display: inline-block; }

/* library */
.lib-tools { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 14px; }
@media (max-width: 900px) { .lib-tools { grid-template-columns: 1fr 1fr; } .lib-tools .search { grid-column: 1 / -1; } }
.field label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 1rem var(--body); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.lib-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); margin-bottom: 18px; }
.progress { height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; margin-top: 6px; width: min(260px, 100%); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.card { position: relative; }
.card a { display: block; text-decoration: none; border-radius: 12px; padding: 8px; }
.card a:hover { background: var(--mist); }
.card .thumb { aspect-ratio: 1; display: grid; place-items: center; }
.card .thumb img { max-height: 100%; }
.card .meta { display: flex; gap: 6px; align-items: baseline; padding: 6px 2px 0; font-size: .95rem; line-height: 1.3; }
.card .num { color: var(--muted); }
.card .nm { font-weight: 700; }
.card .built-mark { display: none; position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--olive); color: #fff; place-items: center; font-weight: 800; }
.card.is-built .built-mark { display: grid; }
.card.is-built .thumb { opacity: .65; }
.empty { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.badge { display: inline-block; font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--mist); }
.badge.new { background: var(--yellow); color: #18202e; }

/* pattern page */
.pattern { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; padding-bottom: 48px; }
@media (max-width: 900px) { .pattern { grid-template-columns: 1fr; } }
.pattern-fig { margin: 0; background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: clamp(8px, 2vw, 20px); }
.pattern-fig img { width: 100%; max-height: 82vh; object-fit: contain; }
.pattern-side h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .2em; }
.pattern-side .sub { color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.need { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--line); }
.need li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.need .sw { width: 24px; height: 24px; }
.need b { font-size: 1.15rem; }
.need small { color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.built-btn[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.tip { background: var(--mist); border-radius: 12px; padding: 14px 16px; font-size: .97rem; margin-top: 20px; }
.tip p:last-child { margin: 0; }

/* build mode */
.build { position: fixed; inset: 0; z-index: 100; background: #fff; display: none; flex-direction: column; }
.build.open { display: flex; }
.build-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--plate); color: #fff; flex-wrap: wrap; }
.build-bar .t { font-weight: 700; margin-right: auto; font-family: var(--display); font-size: 1.15rem; }
.build-bar button, .build-bar a { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font: 700 1rem var(--body); cursor: pointer; text-decoration: none; min-width: 44px; text-align: center; }
.build-stage { flex: 1; overflow: auto; display: grid; place-items: center; background: #fff; }
.build-stage img { width: calc(var(--z, 1) * min(100vw, (100vh - 60px) * var(--ar, 1))); max-width: none; max-height: none; }
.build .wake { font-size: .85rem; opacity: .8; }

/* challenges */
.challenge { border-top: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
@media (max-width: 760px) { .challenge { grid-template-columns: 1fr; } }
.challenge h3 { font-size: 1.4rem; margin-bottom: .2em; }
.challenge details { margin-top: 10px; }
.challenge summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.challenge .sol { max-width: 380px; margin-top: 12px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.faq details p { margin: 10px 0 0; }

/* callouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.week { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 28px; align-items: center; }
@media (max-width: 640px) { .week { grid-template-columns: 1fr; } }
.week figure { margin: 0; background: #fff; border-radius: 14px; padding: 12px; }
.tiles-row { display: flex; gap: 6px; margin: 0 0 18px; }
.tiles-row span { width: 18px; height: 18px; border-radius: 4px; }
.cta-box { background: var(--plate); color: #fff; border-radius: 18px; padding: clamp(24px, 4vw, 40px); }
.cta-box p { color: #c9d0db; }
.cta-box .btn { background: var(--yellow); border-color: var(--yellow); color: #18202e; }
.cta-box .btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.note { border-left: 4px solid var(--yellow); background: var(--mist); padding: 12px 16px; border-radius: 0 10px 10px 0; }
form .field { margin-bottom: 14px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 40px 0 28px; font-size: .97rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.site-foot h2 { font-size: 1rem; margin-bottom: .6em; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.legal { color: var(--muted); margin-top: 28px; font-size: .9rem; }

@media print {
  .site-head, .site-foot, .crumbs, .no-print, .pager, .tip, .build { display: none !important; }
  body { background: #fff; color: #000; }
  .pattern { display: block; }
  .pattern-fig { border: 0; padding: 0; }
  .pattern-fig img { max-height: 7.2in; }
  .need { columns: 2; }
  .need li { break-inside: avoid; }
}

/* ---- bonus pack: designs that need the add-on tile pack */
:root { --navy: #1b2a5e; --bonus-tint: #e8edf8; }
@media (prefers-color-scheme: dark) { :root { --bonus-tint: #1d2640; } }
.badge.bonus { background: var(--navy); color: #fff; }
.edition .badge.bonus { margin: 2px 0 6px; }
.bonus-banner { background: var(--bonus-tint); border-left: 5px solid var(--navy); border-radius: 8px; padding: 14px 18px; margin: 14px 0 6px; max-width: 72ch; }
@media (prefers-color-scheme: dark) { .bonus-banner { border-left-color: #7fb6e8; } }
.bonus-banner.small { font-size: .95rem; padding: 10px 14px; }
.card .pack-flag { position: absolute; top: 6px; left: 6px; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.pack-tag { font-size: .75rem; font-weight: 700; color: var(--navy); background: var(--bonus-tint); padding: 1px 6px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .pack-tag { color: #cfe0f7; } }
@media print { .pack-flag { display: none; } .bonus-banner { border: 1px solid #000; } }

/* ---- group murals (multi-plate, square tray) */
.msteps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; padding: 0; margin: 0; }
.msteps li { counter-increment: step; }
.msteps li::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--plate); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin-bottom: 10px; }
.msteps h3 { margin: 0 0 4px; font-size: 1.1rem; }
.msteps p { margin: 0; color: var(--muted); }
.mtools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 32px 0 8px; }
.mtools .field { min-width: 180px; }
.mcat { margin-top: 36px; }
.mgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.mcard a { display: block; text-decoration: none; color: inherit; }
.mthumb { background: var(--mist); border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; padding: 14px; transition: background .15s; }
.mcard a:hover .mthumb { background: var(--line); }
.mthumb { overflow: hidden; }
.mthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mcard .meta { display: flex; flex-direction: column; padding: 8px 2px 0; }
.mcard .nm { font-weight: 700; }
.mcard .sz { color: var(--muted); font-size: .9rem; }
.mural-head .lead { margin: 12px 0 18px; max-width: 60ch; }
.mural-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0 8px; align-items: start; }
.mural-figs figure { margin: 0; background: var(--mist); border-radius: 14px; padding: clamp(12px, 2vw, 22px); }
.mural-figs img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.mural-figs figcaption { margin-top: 10px; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .mural-figs { grid-template-columns: 1fr; } }
.plates-head { margin-top: 40px; }
.plate-sheet { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); padding: 28px 0; border-top: 1px solid var(--line); align-items: start; }
.plate-sheet .ps-fig img { width: 100%; height: auto; display: block; }
.ps-kicker { margin: 0; color: var(--muted); font-weight: 700; }
.plate-sheet h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 2px 0 14px; }
.ps-where { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ps-where p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .plate-sheet { grid-template-columns: 1fr; } }
.mural-promo { border: 2px solid var(--plate); border-radius: 16px; padding: clamp(18px, 3vw, 30px); margin: 26px 0 34px; }
.mural-promo h2 { margin-top: 0; }
.mural-strip { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mural-strip a { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.mural-strip img { background: var(--mist); border-radius: 10px; padding: 8px; aspect-ratio: 1; object-fit: contain; width: 100%; }
.mural-strip span { font-weight: 700; font-size: .95rem; margin-top: 6px; }
.mural-strip small { color: var(--muted); }
@media (max-width: 560px) { .mural-strip { grid-template-columns: repeat(2, 1fr); } }
.mural-link { margin-top: 14px; max-width: 52ch; }
@media print {
  .mural-figs { grid-template-columns: 1fr 1fr; }
  .mural-figs figure { background: none; padding: 0; }
  .plate-sheet { break-before: page; border: 0; grid-template-columns: 1.4fr 1fr; }
  .plate-sheet .need { columns: 1; }
  body.print-one .mural-head, body.print-one .mural-figs, body.print-one .plates-head,
  body.print-one .plate-sheet:not(.print-target) { display: none !important; }
  body.print-one .plate-sheet { break-before: auto; }
}
@media (max-width: 560px) { .mgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .mthumb { padding: 8px; } }
