/* Brickyard — blue baseplate, yellow bar, white instruction-booklet cards */
:root {
  --blue: #0a55c2;
  --blue-d: #073f94;
  --yellow: #ffd400;
  --red: #e3000b;
  --green: #00a651;
  --ink: #14181f;
  --paper: #ffffff;
  --mist: #eef3fb;
  --line: #d7e0ee;
  --muted: #566074;
  --display: 'Staatliches', Impact, 'Arial Narrow', sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
  --mono: 'Ubuntu Mono', ui-monospace, monospace;
  --wrap: 1180px;
  --gutter: max(18px, calc((100vw - var(--wrap)) / 2));
  --shadow: 0 6px 0 var(--ink);
  --stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 13'%3E%3Crect x='10' y='1.5' width='24' height='20' rx='5' fill='%23fff' stroke='%2314181F' stroke-width='3'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-color: var(--blue);
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.2) 0 36%, rgba(0,0,0,.2) 38% 47%, transparent 49%);
  background-size: 64px 64px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
img, canvas, svg { max-width: 100%; }
.muted { color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.noscript { margin: 0; padding: 14px; background: var(--red); color: #fff; text-align: center; font-weight: 600; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 10px var(--gutter);
  background: var(--yellow);
  border-bottom: 4px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 30px; letter-spacing: .04em; line-height: 1; }
.top nav { display: flex; gap: 26px; margin-left: auto; }
.top nav a { text-decoration: none; font-weight: 600; font-size: 16px; padding: 4px 0; border-bottom: 3px solid transparent; }
.top nav a:hover, .top nav a[aria-current=page] { border-bottom-color: var(--ink); }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 4px 11px 4px 9px; border-radius: 999px; }
.net i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.28); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; cursor: pointer;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 700; text-decoration: none; line-height: 1.1; white-space: nowrap;
  transition: transform .06s, box-shadow .06s, background .15s;
}
.btn:hover { background: #ffe14d; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.small { padding: 7px 13px; font-size: 14px; border-radius: 10px; box-shadow: 0 4px 0 var(--ink); }
.btn.small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { background: var(--paper); }
.btn.ghost:hover { background: var(--mist); }
.btn.big-ish { padding: 13px 24px; font-size: 18px; }
.btn.red { background: var(--red); color: #fff; }
.btn.red:hover { background: #ff1a25; }
.btn.red[disabled] { background: #9aa3b2; }
.top .btn { background: var(--paper); }
.top .btn:hover { background: var(--mist); }
.btn.big { width: 100%; padding: 16px 20px; font-family: var(--display); font-size: 27px; font-weight: 400; letter-spacing: .06em; background: var(--yellow); box-shadow: 0 7px 0 var(--ink); }
.btn.big.live { background: var(--red); color: #fff; }
.btn.big.live:hover { background: #ff1a25; }
.btn.big:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- hero ---------- */
main { padding: 0 var(--gutter) 70px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 56px 0 30px; color: #fff; }
.kicker { margin-bottom: 10px; font-family: var(--display); font-size: 20px; letter-spacing: .14em; color: var(--yellow); }
.hero h1 { font-size: clamp(50px, 8vw, 92px); text-shadow: 0 5px 0 var(--ink); }
.hero h1 em { font-style: normal; color: var(--yellow); }
.lede { font-size: 20px; margin: 22px 0 26px; max-width: 540px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pills li { background: rgba(20,24,31,.85); color: #fff; padding: 4px 13px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.hero-art svg { display: block; width: 100%; max-width: 440px; margin-inline: auto; filter: drop-shadow(0 10px 0 rgba(20,24,31,.45)); overflow: visible; }
.wb { transform-box: fill-box; animation: drop .7s cubic-bezier(.3,1.35,.5,1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes drop { from { transform: translateY(-120px) rotate(-3deg); opacity: 0; } 25% { opacity: 1; } to { transform: none; opacity: 1; } }

/* ---------- section heads ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; color: #fff; }
.sec-head h2 { font-size: clamp(40px, 5vw, 52px); text-shadow: 0 4px 0 var(--ink); }
.sec-head .kicker { font-size: 17px; margin-bottom: 6px; }
.sec-sub { margin-top: 10px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 40px; align-items: start; padding-top: 22px; }
.stage { position: sticky; top: 96px; }
.board {
  position: relative; aspect-ratio: 1; width: 100%;
  border: 4px solid var(--ink); border-radius: 16px; overflow: hidden;
  background: #0a55c2; box-shadow: 0 10px 0 var(--ink);
}
.board.over { outline: 5px dashed var(--yellow); outline-offset: 6px; }
#mosaic { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#mosaic.drag { cursor: grabbing; }
.drop-hint { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(20,24,31,.62); color: #fff; font-family: var(--display); font-size: 40px; letter-spacing: .06em; pointer-events: none; }
.board.over .drop-hint { display: flex; }
.stage-bar, .set-bar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 28px; }
.set { display: flex; align-items: center; gap: 14px; color: #fff; }
.set-no { font-family: var(--display); font-size: 26px; letter-spacing: .06em; background: var(--red); border: 3px solid var(--ink); border-radius: 8px; padding: 2px 10px 0; transform: rotate(-2deg); box-shadow: 0 3px 0 var(--ink); }
.set-pcs { font-size: 16px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.set-pcs b { font-family: var(--mono); font-size: 22px; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tip { color: rgba(255,255,255,.88); font-size: 14px; margin-top: 16px; text-shadow: 0 1px 0 rgba(0,0,0,.3); }

/* ---------- cards ---------- */
.booklet { display: flex; flex-direction: column; gap: 38px; padding-top: 14px; }
.card { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; top: -17px; left: 24px; right: 24px; height: 13px; background: var(--stud) repeat-x left bottom / 44px 13px; pointer-events: none; }
.step header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.step h2 { font-size: 30px; padding-top: 3px; }
.num { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 3px solid var(--ink); border-radius: 10px; font-family: var(--display); font-size: 26px; line-height: 1; padding-top: 3px; }
.n1 { background: var(--red); color: #fff; }
.n2 { background: var(--yellow); }
.n3 { background: var(--blue); color: #fff; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 20px; }
.samples { display: flex; gap: 8px; }
.sample { width: 46px; height: 46px; padding: 3px; background: var(--blue); border: 3px solid var(--ink); border-radius: 10px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.sample:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.sample img { width: 100%; height: 100%; display: block; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field.last { margin-bottom: 0; }
.field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 7px; }
.field > span i { font-weight: 400; font-style: normal; font-size: 13px; color: var(--muted); }
output { font-family: var(--mono); font-weight: 700; }
input[type=text], input[type=url], input[type=number], textarea {
  width: 100%; padding: 10px 12px; background: var(--mist); border: 3px solid var(--ink); border-radius: 10px; outline: none; transition: background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #8c97ab; }
input:focus-visible, textarea:focus-visible { background: #fff; box-shadow: 0 0 0 4px var(--yellow); outline: none; }
textarea { resize: vertical; min-height: 64px; }
#symbol { text-transform: uppercase; font-family: var(--mono); font-weight: 700; letter-spacing: .05em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
input[type=range] { width: 100%; accent-color: var(--red); height: 24px; }

.seg, .tabs { display: flex; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper); }
.seg button, .tabs button { flex: 1 1 0; min-width: 0; padding: 8px 6px; border: 0; border-right: 3px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 600; cursor: pointer; }
.seg button:last-child, .tabs button:last-child { border-right: 0; }
.seg button:hover, .tabs button:hover { background: var(--mist); }
.seg button.on, .tabs button.on { background: var(--ink); color: #fff; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 30%; }
.seg.wrap button:nth-child(3) { border-right: 0; }
.seg.wrap button:nth-child(n+4) { border-top: 3px solid var(--ink); }
.tabs { background: var(--paper); }
.tabs button { padding: 8px 16px; white-space: nowrap; }

.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw { width: 34px; height: 34px; border: 3px solid var(--ink); border-radius: 8px; cursor: pointer; padding: 0; box-shadow: 0 3px 0 var(--ink); }
.sw[aria-checked=true] { outline: 3px solid var(--red); outline-offset: 2px; }

.check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 20px; font-size: 15px; font-weight: 500; cursor: pointer; line-height: 1.4; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.check small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }

details.more { margin-bottom: 18px; border: 3px solid var(--ink); border-radius: 10px; background: var(--mist); }
details.more summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-family: var(--display); font-size: 24px; line-height: 1; }
details.more[open] summary::after { content: "–"; }
details.more summary i { font-weight: 400; font-style: normal; font-size: 13px; color: var(--muted); margin-left: 8px; margin-right: auto; }
.more-body { padding: 4px 14px 0; background: var(--paper); border-top: 3px solid var(--ink); padding-top: 16px; border-radius: 0 0 8px 8px; }

.buyrow { display: flex; gap: 10px; align-items: stretch; }
.buyrow input { width: 110px; flex: none; font-family: var(--mono); font-weight: 700; }
.chips-row { display: flex; flex: 1; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.chipbtn { flex: 1; padding: 8px 4px; border: 0; border-right: 3px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 600; cursor: pointer; font-family: var(--mono); }
.chipbtn:last-child { border-right: 0; }
.chipbtn:hover { background: var(--mist); }
.chipbtn.on { background: var(--ink); color: #fff; }

.pre { border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; margin-bottom: 18px; font-size: 14px; }
.pre-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--mist); }
.pre-row + .pre-row { border-top: 2px solid var(--line); }
.pre-row span { color: var(--muted); }
.pre-row b { font-family: var(--mono); font-size: 15px; text-align: right; }
.pre-row b.ok { color: #0a7d3e; }
.pre-row b.warn { color: #b3260e; }

.switch { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding: 12px 14px; border: 3px dashed var(--ink); border-radius: 10px; background: #fff7cc; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; flex: none; width: 52px; height: 30px; border: 3px solid var(--ink); border-radius: 999px; background: var(--red); transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform .15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--blue); outline-offset: 3px; }
.switch b { display: block; font-size: 16px; }
.switch small { display: block; font-size: 13px; color: #4a4630; line-height: 1.35; }

.errs { background: #ffe3e3; border: 3px solid var(--red); border-radius: 10px; padding: 9px 13px; margin: 0 0 16px; font-size: 14px; font-weight: 500; }
.log { list-style: none; margin: 18px 0 0; padding: 12px 14px; background: var(--ink); color: #dfe6f3; border-radius: 10px; font-family: var(--mono); font-size: 15px; max-height: 230px; overflow: auto; }
.log li { padding: 1px 0; overflow-wrap: anywhere; }
.log li.ok::before { content: "✓ "; color: #5fe38c; }
.log li.bad { color: #ff8b8b; }
.log li.bad::before { content: "✕ "; }
.log li.info::before { content: "• "; color: var(--yellow); }
.result { margin-top: 16px; padding: 16px; background: #e6fbee; border: 3px solid var(--green); border-radius: 10px; }
.result h3 { font-size: 26px; margin-bottom: 8px; }
.result .mint { font-family: var(--mono); font-size: 16px; overflow-wrap: anywhere; margin-bottom: 12px; }
.result .links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- parts list ---------- */
.parts { margin-top: 76px; }
.parts, .yard-empty, .card.tiny { color: var(--ink); }
.parts { background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 26px; position: relative; }
.parts::before { content: ""; position: absolute; top: -17px; left: 24px; right: 24px; height: 13px; background: var(--stud) repeat-x left bottom / 44px 13px; }
.parts-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 18px; }
.parts h2 { font-size: 36px; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 10px; background: var(--mist); }
.chip i { width: 26px; height: 26px; border: 3px solid var(--ink); border-radius: 50%; flex: none; }
.chip b { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip span { font-family: var(--mono); font-weight: 700; font-size: 17px; }

/* ---------- the Yard ---------- */
.yard { margin-top: 90px; }
.yard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 40px 28px; padding-top: 6px; }
.card.yc { padding: 18px 18px 16px; }
.card.yc::before { left: 18px; right: 18px; }
.yc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.yc-img { width: 64px; height: 64px; flex: none; display: block; border: 3px solid var(--ink); border-radius: 10px; background: var(--blue); object-fit: cover; }
.yc-img.ph { display: grid; place-items: center; font-family: var(--display); font-size: 34px; color: #fff; padding-top: 3px; }
.yc h3 { font-size: 28px; overflow-wrap: anywhere; }
.yc .nm { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; line-height: 1.3; margin-top: 3px; }
.yc dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.yc dt { color: var(--muted); font-size: 14px; align-self: center; }
.yc dd { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 18px; text-align: right; }
.up { color: #0a7d3e; } .down { color: #b3260e; }
.yc-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); font-size: 14px; }
.yc-foot .age { margin-right: auto; color: var(--muted); }
.yc-foot a { font-weight: 600; }
.sk h3, .sk .nm, .sk dt, .sk dd, .sk .yc-img { background: linear-gradient(90deg, var(--mist) 25%, #e3ebf7 50%, var(--mist) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 6px; color: transparent; }
.sk .yc-img { border-color: var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }
.yard-empty { grid-column: 1 / -1; text-align: center; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 44px 24px 40px; }
.yard-empty h3 { font-size: 34px; margin-bottom: 8px; }
.yard-empty p { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }
.empty-studs { width: 150px; height: 54px; margin: 0 auto 18px; background: radial-gradient(circle at 50% 50%, var(--blue) 0 34%, rgba(0,0,0,.25) 36% 46%, transparent 48%) 0 0 / 50px 54px; }

/* ---------- how ---------- */
.how { margin-top: 90px; color: #fff; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 30px; }
.card.tiny { padding: 24px 22px 22px; }
.card.tiny .num { margin-bottom: 14px; }
.card.tiny h3 { font-size: 30px; margin-bottom: 8px; }
.card.tiny p { font-size: 16px; color: #3a4457; }
.faq { margin: 46px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 30px; }
.faq dt { font-family: var(--display); font-size: 24px; letter-spacing: .03em; color: var(--yellow); margin-bottom: 6px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.faq dd { margin: 0; font-size: 15px; color: rgba(255,255,255,.92); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #fff; padding: 36px var(--gutter) 40px; border-top: 4px solid var(--yellow); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; }
.foot-brand { font-family: var(--display); font-size: 28px; letter-spacing: .05em; }
.foot p { max-width: 520px; margin-top: 8px; font-size: 14px; color: #a2aec4; }
.foot nav { display: flex; gap: 22px; align-items: flex-start; font-weight: 600; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--yellow); }

/* ---------- confirm dialog ---------- */
.modal { border: 4px solid var(--ink); border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--paper); box-shadow: 0 10px 0 var(--ink); color: var(--ink); }
.modal::backdrop { background: rgba(10,20,40,.72); backdrop-filter: blur(2px); }
.modal-in { padding: 26px 24px 22px; }
.modal h2 { font-size: 34px; margin-bottom: 16px; }
.cf-coin { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cf-coin canvas { width: 64px; height: 64px; border: 3px solid var(--ink); border-radius: 10px; }
.cf-coin b { display: block; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.cf-list { margin: 0 0 18px; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.cf-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--mist); font-size: 15px; }
.cf-list > div + div { border-top: 2px solid var(--line); }
.cf-list dt { color: var(--muted); }
.cf-list dd { margin: 0; font-family: var(--mono); font-weight: 700; text-align: right; }
.cf-list .total { background: var(--yellow); }
.cf-list .total dt { color: var(--ink); font-weight: 600; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ---------- pairs page ---------- */
.pairing { margin-top: 30px; }
.pair-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 14px; align-items: end; }
.plus { font-family: var(--display); font-size: 40px; line-height: 1; padding-bottom: 24px; color: var(--red); }
.snap-btn { width: auto; min-width: 250px; }
.examples { margin: 24px 0 0; }
.pair-out { margin-top: 60px; }
.pair-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 44px; align-items: start; }
.pair-board {
  position: relative; display: flex; justify-content: center; align-items: flex-end;
  padding: 110px 34px 40px; overflow: hidden;
  background: var(--blue) radial-gradient(circle at 50% 50%, rgba(255,255,255,.2) 0 36%, rgba(0,0,0,.2) 38% 47%, transparent 49%) 0 0 / 64px 64px;
  border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 10px 0 var(--ink);
}
/* B (top) lowers onto A (bottom). --lip is the stud height as a share of the piece width, so A's studs
   overlap B's sockets exactly when snapped. */
.stack { --lip: 2.5%; position: relative; width: 100%; filter: drop-shadow(0 8px 0 var(--ink)); }
.pc { display: block; width: 100%; height: auto; }
.pc.b { position: relative; z-index: 1; }
.pc.a { position: relative; z-index: 2; margin-top: calc(var(--lip) * -1); }
.stack.seated .pc.b { z-index: 3; }   /* seated: the top brick is in front, so the studs are inside it and out of sight */
.click { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0) rotate(-8deg); font-family: var(--display); font-size: 40px; letter-spacing: .06em; background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px; padding: 4px 14px 0; box-shadow: 0 4px 0 var(--ink); pointer-events: none; z-index: 4; }
.pair-board.snap .pc.b { animation: lower 1.15s both; }
.pair-board.snap .pc.a { animation: settle .9s both; }
.pair-board.snap .click { animation: pop 1.2s .78s ease-out both; }
/* hovers above with sockets facing the studs, drops, seats with a tiny press-down, then stays */
@keyframes lower {
  0%   { transform: translateY(-100px); opacity: 0; animation-timing-function: ease-out; }
  14%  { opacity: 1; }
  30%  { transform: translateY(-100px); animation-timing-function: cubic-bezier(.6,0,.9,.5); }
  66%  { transform: translateY(3px); }
  76%  { transform: translateY(5px); animation-timing-function: ease-out; }
  100% { transform: none; opacity: 1; }
}
@keyframes settle { 0%, 62% { transform: none; } 70% { transform: translateY(3px); } 100% { transform: none; } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(0) rotate(-8deg); } 25% { transform: translate(-50%, -50%) scale(1.15) rotate(-8deg); } 40%, 70% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); } 100% { transform: translate(-50%, -90%) scale(.9) rotate(-8deg); opacity: 0; } }
.pair-side .set-bar { margin-top: 0; margin-bottom: 34px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 38px 28px; }
.stats .combo { grid-column: 1 / -1; }
.coin h3 { font-size: 34px; margin-bottom: 2px; overflow-wrap: anywhere; }
.coin .nm { margin: 0 0 14px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.coin dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.coin dt { color: var(--muted); font-size: 14px; align-self: center; }
.coin dd { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 18px; text-align: right; }
.coin .src { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }
.coin.combo { background: var(--yellow); }
.coin.combo .nm, .coin.combo dt { color: #3d3a22; }
.coin .mintline { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 12px 0 0; overflow-wrap: anywhere; }
.fine { margin: 40px 0 0; max-width: 700px; font-size: 14px; color: rgba(255,255,255,.88); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-art { display: none; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .stage { position: static; }
  .how-grid, .faq { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .net { margin-left: auto; }
  .pair-fields { grid-template-columns: 1fr; }
  .plus { padding: 0 0 10px; text-align: center; }
  .pair-layout { grid-template-columns: minmax(0, 1fr); }
  .pair-board { max-width: 460px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { gap: 12px; }
  .brand { font-size: 26px; }
  .net { display: none; }
  .top .btn { margin-left: auto; }
  .lede { font-size: 18px; }
  .tabs { width: 100%; }
  .tabs button { padding: 8px 4px; white-space: normal; line-height: 1.2; }
  .two { grid-template-columns: 1fr; }
  .card { padding: 20px 16px; }
  .sample { width: 42px; height: 42px; }
  .buyrow { flex-direction: column; }
  .buyrow input { width: 100%; }
  .parts { padding: 22px 16px; }
  .stats { grid-template-columns: 1fr; }
  .pair-board { padding: 120px 22px 32px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .switch .track, .switch .track::after { transition: none; }
  .wb, .sk h3, .sk .nm, .sk dt, .sk dd, .sk .yc-img, .pair-board.snap .pc, .pair-board.snap .click { animation: none; }
}

/* ---------- Custom Pairs handoff ---------- */
[hidden] { display: none !important; }
.hint.tight { margin: 0 0 14px; }
.pairinfo { padding: 10px 12px; border: 3px solid var(--ink); border-radius: 10px; background: var(--mist); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.pairinfo span { color: var(--muted); }
.pairinfo.ok { background: #e6fbee; border-color: var(--green); }
.pairinfo.ok span { color: #0a7d3e; font-weight: 600; }
.pairinfo.warn { background: #fff3d6; border-color: #c98a00; }
.pair-note { background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin: -6px 0 34px; box-shadow: 0 4px 0 var(--ink); }
.coin .pairbtn { display: flex; margin-top: 16px; white-space: normal; text-align: center; }
.modal.wide { width: min(560px, calc(100vw - 32px)); }
.modal.wide .modal-in { max-height: calc(100vh - 40px); overflow: auto; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; counter-reset: s; }
.steps li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--mist); counter-increment: s; }
.steps li + li { border-top: 2px solid var(--line); }
.steps li > div { min-width: 0; flex: 1; }
.steps li b { display: block; font-size: 15px; }
.steps li b::before { content: counter(s) ". "; color: var(--red); }
.steps li b em { font-style: normal; }
.steps li span { display: block; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.35; }
.steps li span.mono { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.steps li .btn { flex: none; }

/* paired-launch extras */
.yc .paired { display: inline-block; margin-top: 5px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); font-size: 12px; font-weight: 700; line-height: 1.4; }
.altlink { display: block; margin: 12px auto 0; padding: 4px; background: none; border: 0; box-shadow: none; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--muted); }
.altlink:hover { color: var(--ink); }

/* Yard: add a coin by address */
.yard-add { max-width: 680px; margin-top: 40px; background: var(--paper); box-shadow: var(--shadow); }
.addrow { display: flex; gap: 10px; align-items: stretch; }
.addrow input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 15px; }
.addrow .btn { flex: none; }
#yardAddMsg { min-height: 1.4em; margin-top: 10px; }
#yardAddMsg.ok { color: #0a7d3e; font-weight: 600; }
#yardAddMsg.bad { color: #b3260e; font-weight: 600; }
@media (max-width: 560px) { .addrow { flex-direction: column; } }
.sec-head .tabs { flex: none; }
