/* brand-match.html (16 Oct 2026): Brand match, ten logos, five shades each (page-brand-match.js builds the game into [data-brand-match]).
   On paper, like the color quiz: the brand card takes the shade you pick (a short crossfade), the five shades sit under it as round
   chips, OK locks the answer. A wrong answer splits the card: your shade on the left, the real color sliding in on the right.
   Every rule is scoped to body.page-brand-match and uses the bm- prefix; global button rules are reset here. */
body.page-brand-match .bm-section{padding:clamp(22px,3vw,44px) var(--pg-gut,24px) clamp(56px,6vw,88px);border-top:0;background:var(--pg-paper,#f4f3ec)}
body.page-brand-match .bm-head{max-width:720px;margin:0 auto clamp(18px,2.4vw,28px);text-align:center}
body.page-brand-match .bm-head h1{margin:0;font-size:clamp(34px,4.2vw,58px);line-height:1.02;letter-spacing:-.034em;font-weight:600;color:#141416;text-wrap:balance}
body.page-brand-match .bm-head h1 span{color:#F50C0C}
body.page-brand-match .bm-head p{margin:12px auto 0;max-width:36em;font-size:clamp(16px,1.25vw,18px);line-height:1.5;color:#4b5052;text-wrap:pretty}
body.page-brand-match .bm-sr{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
body.page-brand-match .bm-noscript{margin:0 auto;max-width:52ch;text-align:center;font-size:17px;line-height:1.55;color:#33393a}

body.page-brand-match .bm{--ink:#141416;--t2:#4b5052;--t3:#6a6f74;--out:cubic-bezier(.23,1,.32,1);max-width:600px;margin:0 auto;display:grid;gap:16px;color:var(--ink)}
body.page-brand-match .bm button{font:inherit;color:inherit;background:none;border:0;margin:0;padding:0;min-height:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
body.page-brand-match .bm :focus-visible{outline:2px solid var(--ink);outline-offset:3px}
body.page-brand-match .bm-q{margin:0;text-align:center;font-size:clamp(19px,1.8vw,24px);line-height:1.25;letter-spacing:-.015em;font-weight:500;color:var(--t2)}
body.page-brand-match .bm-q b{font-weight:600;color:var(--ink)}

/* ---------------------------------------------------------------- the card */
body.page-brand-match .bm-card{position:relative;overflow:hidden;aspect-ratio:16/9;border-radius:22px;background:var(--bg);
  box-shadow:0 26px 50px -30px rgba(20,20,22,.45),inset 0 0 0 1px rgba(20,20,22,.05);transition:background-color .18s ease}
body.page-brand-match .bm-real-half{position:absolute;inset:0;background:var(--real);clip-path:inset(0 0 0 100%);transition:clip-path .5s var(--out)}
body.page-brand-match .bm.is-wrong .bm-real-half{clip-path:inset(0 0 0 50%)}
body.page-brand-match .bm-logo{position:absolute;left:50%;top:50%;z-index:1;max-width:none;height:auto;transform:translate(-50%,-50%);pointer-events:none;-webkit-user-drag:none;user-select:none}
body.page-brand-match .bm-tag{position:absolute;bottom:14px;z-index:2;padding:5px 10px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.2;color:#141416;background:rgba(255,255,255,.88);opacity:0;transform:translateY(6px);transition:opacity .25s ease .2s,transform .3s var(--out) .2s}
body.page-brand-match .bm-tag-yours{left:14px}
body.page-brand-match .bm-tag-real{right:14px}
body.page-brand-match .bm.is-wrong .bm-tag,body.page-brand-match .bm.is-done .bm-tag-real{opacity:1;transform:none}
body.page-brand-match .bm-badge{position:absolute;top:14px;left:50%;z-index:2;padding:7px 14px;border-radius:999px;font-size:14px;font-weight:600;white-space:pre;color:#fff;background:#141416;
  opacity:0;transform:translate(-50%,-8px) scale(.96);transition:opacity .2s ease,transform .32s cubic-bezier(.34,1.56,.64,1)}
body.page-brand-match .bm.is-done .bm-badge{opacity:1;transform:translate(-50%,0)}
body.page-brand-match .bm.is-exact .bm-badge{background:#2f8a1f}

/* ---------------------------------------------------------------- the five shades */
body.page-brand-match .bm-shades{display:flex;justify-content:center;gap:clamp(18px,4vw,26px);padding:4px 0 24px}
body.page-brand-match .bm.is-done .bm-shades{padding-bottom:40px}
body.page-brand-match .bm .bm-shade{position:relative;flex:none;width:clamp(50px,13vw,66px);height:clamp(50px,13vw,66px);border-radius:50%;background:var(--c);
  box-shadow:0 0 0 3px #f4f3ec,0 0 0 4px rgba(20,20,22,.1),0 4px 10px -4px rgba(20,20,22,.35);transition:transform .16s var(--out),box-shadow .16s ease}
@media (hover:hover) and (pointer:fine){body.page-brand-match .bm .bm-shade:not(:disabled):hover{transform:translateY(-3px)}}
body.page-brand-match .bm .bm-shade:active:not(:disabled){transform:scale(.94)}
body.page-brand-match .bm .bm-shade[aria-checked="true"]{transform:translateY(-4px);box-shadow:0 0 0 3px #f4f3ec,0 0 0 6px #141416,0 10px 18px -6px rgba(20,20,22,.45)}
body.page-brand-match .bm .bm-shade:disabled{cursor:default}
body.page-brand-match .bm-de{position:absolute;left:50%;top:calc(100% + 9px);transform:translateX(-50%);font-size:12px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--t3);opacity:0;transition:opacity .25s ease}
body.page-brand-match .bm.is-done .bm-de{opacity:1}
body.page-brand-match .bm .bm-shade.is-real{box-shadow:0 0 0 3px #f4f3ec,0 0 0 6px #2f8a1f}
body.page-brand-match .bm .bm-shade.is-real .bm-de{color:#2f8a1f}
body.page-brand-match .bm .bm-shade.is-real::after{content:"";position:absolute;right:-5px;top:-5px;width:20px;height:20px;border-radius:50%;
  background:#2f8a1f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat}
body.page-brand-match .bm.is-wrong .bm-shade.is-picked{box-shadow:0 0 0 3px #f4f3ec,0 0 0 6px #141416}
body.page-brand-match .bm.is-wrong .bm-shade.is-picked .bm-de{color:var(--ink)}
body.page-brand-match .bm-shade:not(.is-real):not(.is-picked):disabled{opacity:.72}

/* ---------------------------------------------------------------- progress, score, OK */
body.page-brand-match .bm-foot{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px}
body.page-brand-match .bm-foot .bm-ok{margin-left:auto}
body.page-brand-match .bm-steps{display:flex;gap:6px;margin:0;padding:0;list-style:none}
body.page-brand-match .bm-steps li{width:10px;height:10px;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(20,20,22,.25)}
body.page-brand-match .bm-steps li.is-now{box-shadow:inset 0 0 0 2px #141416}
body.page-brand-match .bm-steps li.is-exact{background:#2f8a1f;box-shadow:none}
body.page-brand-match .bm-steps li.is-near{background:#FBCB05;box-shadow:none}
body.page-brand-match .bm-steps li.is-miss{background:#e0241b;box-shadow:none}
body.page-brand-match .bm-score{margin:0;font-size:15px;color:var(--t2);font-variant-numeric:tabular-nums}
body.page-brand-match .bm-score b{font-size:20px;color:var(--ink)}
body.page-brand-match .bm .bm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;min-width:150px;padding:0 26px;border-radius:0;
  font-size:16px;font-weight:500;color:#fff;background:#141416;text-decoration:none;transition:background-color .2s ease,transform .16s var(--out),opacity .2s}
body.page-brand-match .bm .bm-btn:hover{background:#2a2b2f}
body.page-brand-match .bm .bm-btn:active{transform:scale(.97)}
body.page-brand-match .bm .bm-btn:disabled{opacity:.25;cursor:default;transform:none}
body.page-brand-match .bm .bm-ghost{color:#141416;background:transparent;box-shadow:inset 0 0 0 1px rgba(20,20,22,.3)}
body.page-brand-match .bm .bm-ghost:hover{color:#fff;background:#141416}
body.page-brand-match .bm .bm-link{display:inline-flex;align-items:center;min-height:44px;font-size:15px;font-weight:500;color:#141416;text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
body.page-brand-match .bm .bm-link:hover{text-decoration-thickness:2px}
body.page-brand-match .bm-hint{margin:-4px 0 0;min-height:3em;text-align:center;font-size:14px;line-height:1.5;color:var(--t3);text-wrap:balance}

/* ---------------------------------------------------------------- top line, challenge banner, Lab, players */
body.page-brand-match .bm-bar{display:flex;justify-content:space-between;align-items:center;min-height:28px;margin-bottom:-6px}
body.page-brand-match .bm-count{font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--t3);font-variant-numeric:tabular-nums}
body.page-brand-match .bm .bm-small{min-height:32px;font-size:14px}
body.page-brand-match .bm-banner{margin:0;padding:10px 14px;border-radius:12px;text-align:center;font-size:15px;color:var(--ink);background:#fff;box-shadow:0 1px 2px rgba(20,20,22,.06)}
body.page-brand-match .bm-lab{position:absolute;left:50%;top:calc(100% + 26px);transform:translateX(-50%);font-size:11.5px;font-weight:500;white-space:pre;font-variant-numeric:tabular-nums;color:#2f8a1f;opacity:0;transition:opacity .25s ease .1s}
body.page-brand-match .bm.is-done .bm-shade.is-real .bm-lab{opacity:1}
body.page-brand-match .bm-pdot{display:inline-block;flex:none;width:10px;height:10px;margin-right:6px;border-radius:50%;background:var(--p);box-shadow:inset 0 0 0 1px rgba(20,20,22,.15);vertical-align:.05em}
body.page-brand-match .bm-who{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);display:flex;gap:3px}
body.page-brand-match .bm-who .bm-pdot{width:12px;height:12px;margin:0;box-shadow:0 0 0 2px #f4f3ec}
body.page-brand-match .bm.is-all .bm-shades{padding-top:18px}
body.page-brand-match .bm-board{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;padding:0;list-style:none}
body.page-brand-match .bm-board li{display:flex;align-items:center;gap:0;padding:4px 10px;border-radius:999px;font-size:14px;color:var(--t2);background:rgba(20,20,22,.04)}
body.page-brand-match .bm-board li.is-turn{color:var(--ink);background:#fff;box-shadow:0 0 0 1.5px #141416}
body.page-brand-match .bm-board b{margin-left:8px;color:var(--ink);font-variant-numeric:tabular-nums}
body.page-brand-match .bm-board em{margin-left:5px;font-style:normal;font-size:12px;font-weight:600;color:#2f8a1f}
/* the pass screen: the card is covered until the next player is ready */
body.page-brand-match .bm-pass{position:absolute;inset:0;z-index:3;display:grid;place-content:center;justify-items:center;gap:18px;padding:20px;text-align:center;background:#141416;color:#fff}
body.page-brand-match .bm-pass[hidden]{display:none}
body.page-brand-match .bm-pass-t{margin:0;font-size:clamp(20px,2.4vw,26px);color:#a1a1a6}
body.page-brand-match .bm-pass-t b{color:#fff;font-weight:600}
body.page-brand-match .bm .bm-ready{color:#141416;background:#fff}
body.page-brand-match .bm .bm-ready:hover{background:#e8e8ed}
body.page-brand-match .bm.is-passing .bm-shade{opacity:.25}
/* setting up a game with friends */
body.page-brand-match .bm-setup{display:grid;gap:14px;padding:clamp(20px,3vw,32px);border-radius:22px;background:#fff;box-shadow:0 26px 50px -34px rgba(20,20,22,.4)}
body.page-brand-match .bm-setup-h{margin:0;font-size:clamp(24px,2.6vw,30px);font-weight:600;letter-spacing:-.02em;color:var(--ink)}
body.page-brand-match .bm-setup-t,body.page-brand-match .bm-setup-note{margin:0;font-size:15px;line-height:1.5;color:var(--t2)}
body.page-brand-match .bm-setup-note{font-size:13px;color:var(--t3)}
body.page-brand-match .bm-names{display:grid;gap:8px;margin:4px 0 0;padding:0;list-style:none}
body.page-brand-match .bm-names li{display:flex;align-items:center;gap:6px}
body.page-brand-match .bm-names .bm-pdot{width:14px;height:14px;margin-right:4px}
body.page-brand-match .bm-names input{flex:1;min-width:0;height:46px;padding:0 14px;border:1px solid rgba(20,20,22,.18);border-radius:10px;font:inherit;font-size:16px;color:var(--ink);background:#fafaf8}
body.page-brand-match .bm-names input:focus{outline:2px solid #141416;outline-offset:1px;border-color:transparent}
body.page-brand-match .bm .bm-x{width:40px;height:40px;border-radius:50%;font-size:22px;color:var(--t3)}
body.page-brand-match .bm .bm-x:hover{color:var(--ink);background:rgba(20,20,22,.06)}
body.page-brand-match .bm-setup-acts{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;margin-top:6px}
/* the standings */
body.page-brand-match .bm-standings{display:grid;gap:8px;max-width:460px;margin:14px auto 0;padding:0;list-style:none;text-align:left}
body.page-brand-match .bm-standings li{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(20,20,22,.06)}
body.page-brand-match .bm-standings li.is-first{box-shadow:0 0 0 2px #141416}
body.page-brand-match .bm-rank{width:20px;font-weight:600;color:var(--t3)}
body.page-brand-match .bm-standings b{flex:1;font-size:17px;color:var(--ink)}
body.page-brand-match .bm-st-x{font-size:13px;color:var(--t3)}
body.page-brand-match .bm-st-s{min-width:44px;text-align:right;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink)}
body.page-brand-match .bm-end.is-multi .bm-end-label{font-size:clamp(28px,3.4vw,40px);font-weight:600;letter-spacing:-.025em;color:var(--ink)}

body.page-brand-match .bm-share-field{width:100%;height:44px;padding:0 12px;border:1px solid rgba(20,20,22,.18);border-radius:10px;font:inherit;font-size:14px;color:#141416;background:#fafaf8}
/* ---------------------------------------------------------------- the end */
body.page-brand-match .bm-end{max-width:900px;gap:28px}
body.page-brand-match .bm-end-top{text-align:center}
body.page-brand-match .bm-end-label{margin:0;font-size:15px;color:var(--t2)}
body.page-brand-match .bm-end-num{margin:2px 0 4px;font-size:clamp(84px,12vw,140px);line-height:.95;font-weight:600;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
body.page-brand-match .bm-end-num,body.page-brand-match .bm-end-num b{color:#141416}
body.page-brand-match .bm-end-num span{font-size:.3em;letter-spacing:-.02em;color:var(--t3)}
body.page-brand-match .bm-end-exact{display:inline-block;margin:0;padding:6px 12px;border-radius:999px;font-size:14px;font-weight:600;color:#fff;background:#141416}
body.page-brand-match .bm-end-line{margin:14px auto 0;max-width:30em;font-size:17px;line-height:1.5;color:var(--t2)}
body.page-brand-match .bm-recap{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px 14px;margin:0;padding:0;list-style:none}
body.page-brand-match .bm-recap li{display:grid;gap:8px;min-width:0}
body.page-brand-match .bm-mini{position:relative;display:block;aspect-ratio:16/10;border-radius:12px;overflow:hidden;background:linear-gradient(90deg,var(--pick) 50%,var(--real) 50%);box-shadow:inset 0 0 0 1px rgba(20,20,22,.06)}
body.page-brand-match .bm-mini.is-whole{background:var(--real)}
body.page-brand-match .bm-mini img{position:absolute;left:50%;top:50%;height:auto;max-width:none;transform:translate(-50%,-50%)}
body.page-brand-match .bm-r-t{display:grid;gap:1px;font-size:13px;line-height:1.35;color:var(--t3);font-variant-numeric:tabular-nums}
body.page-brand-match .bm-r-t b{font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.page-brand-match .bm-r-t small{font-size:11.5px;color:var(--t3);white-space:nowrap}
body.page-brand-match .bm-r-t span{display:flex;align-items:center;gap:5px}
body.page-brand-match .bm-recap li.is-exact .bm-r-t span{color:#2f8a1f;font-weight:600}
body.page-brand-match .bm-cta{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px 24px;padding:20px 24px;border-radius:18px;background:#fff;box-shadow:0 1px 2px rgba(20,20,22,.06)}
body.page-brand-match .bm-cta-dot{width:70px;height:auto}
body.page-brand-match .bm-cta-t p{margin:0;font-size:15px;line-height:1.5;color:var(--t2)}
body.page-brand-match .bm-cta-t .bm-cta-h{margin-bottom:2px;font-size:19px;font-weight:600;color:var(--ink)}
body.page-brand-match .bm-acts{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}

@media (max-width:760px){
  body.page-brand-match .bm{gap:14px}
  body.page-brand-match .bm-card{aspect-ratio:4/3;border-radius:18px}
  body.page-brand-match .bm-foot{gap:10px 14px}
  body.page-brand-match .bm-foot .bm-ok{width:100%;margin-left:0}
  body.page-brand-match .bm-steps{flex:1}
  body.page-brand-match .bm-recap{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.page-brand-match .bm-cta{grid-template-columns:1fr;justify-items:center;text-align:center}
  body.page-brand-match .bm-acts{justify-content:center}
  body.page-brand-match .bm-acts .bm-btn{width:100%}
}
@media (prefers-reduced-motion:reduce){body.page-brand-match .bm *{transition:none!important;animation:none!important}}
html[data-motion="paused"] body.page-brand-match .bm *{transition:none!important;animation:none!important}
