/* CHIP IN MERCH — V6
   Shared visual correction for the shop and Quiz In. No purchasing logic. */
body.ci-brand .site-header .brand{display:inline-flex;align-items:center;gap:7px!important;white-space:nowrap}
body.ci-brand .site-header .brand-merch,body.storefront-dark.merch-refined.ci-brand .site-header .brand-merch{
  padding:0!important;margin:0!important;border:0!important;background:none!important;
  font-family:Fredoka,Inter,system-ui,sans-serif!important;
  font-size:clamp(2.2rem,3vw,3rem)!important;font-weight:700!important;
  letter-spacing:-.045em!important;line-height:1!important;text-transform:none!important;
  color:#0b2d62!important;white-space:nowrap;
}
@media(max-width:700px){
  body.ci-brand .site-header .brand-logo,body.storefront-dark.merch-refined.ci-brand .site-header .brand-logo{
    width:clamp(96px,30vw,136px)!important;max-width:none;
  }
  body.ci-brand .site-header .brand-merch,body.storefront-dark.merch-refined.ci-brand .site-header .brand-merch{
    font-size:clamp(2rem,9vw,2.48rem)!important;
  }
  body.ci-brand .site-header .brand{gap:6px!important}
}
@media(max-width:360px){
  body.ci-brand .site-header .brand-merch,body.storefront-dark.merch-refined.ci-brand .site-header .brand-merch{font-size:2rem!important}
}
/* Wide, product-led desktop shop instead of a narrow central island. */
@media(min-width:1100px){
  body.ci-brand .home-main,body.storefront-dark.merch-refined.ci-brand .home-main{
    width:min(1910px,calc(100% - clamp(64px,6vw,150px)))!important;
  }
  body.ci-brand .merch-hero,body.ci-brand .merch-hero:has(.merch-real-showcase:not([hidden])){
    grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr)!important;
    gap:clamp(38px,4.5vw,90px)!important;
  }
  body.ci-brand .merch-real-showcase{height:clamp(390px,29vw,580px)!important}
  body.ci-brand .merch-catalog-layout .catalog{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:34px 19px;
  }
  body.ci-brand .merch-catalog-layout:has(.merch-type-sidebar:not([hidden])) .catalog{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body.ci-brand .merch-catalog-layout:has(.merch-type-sidebar:not([hidden])){
    grid-template-columns:240px minmax(0,1fr);gap:26px;
  }
}
@media(min-width:1750px){
  body.ci-brand .merch-catalog-layout .catalog{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  body.ci-brand .merch-catalog-layout:has(.merch-type-sidebar:not([hidden])) .catalog{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}
body.ci-brand .merch-hero h1{
  max-width:690px!important;font-size:clamp(3.2rem,4.3vw,6.1rem)!important;
}
body.ci-brand .merch-hero .merch-hero-subline{
  max-width:590px!important;font-size:clamp(1.06rem,1.25vw,1.23rem)!important;
  line-height:1.65!important;
}
body.ci-brand .merch-showcase-product{
  border-radius:14px!important;opacity:1;transition:opacity .38s ease;
}
body.ci-brand .merch-real-showcase.is-changing .merch-showcase-product{opacity:.12}
body.ci-brand .merch-showcase-product:first-child{background:#edf3ef!important}
body.ci-brand .merch-showcase-product:nth-child(2){background:#f4f3ef!important}
body.ci-brand .merch-showcase-product:nth-child(3){background:#eff4f9!important}
body.ci-brand .merch-showcase-product img{padding:8px!important}
@media(max-width:1099px){
  body.ci-brand .home-main{width:calc(100% - 40px)!important}
  body.ci-brand .merch-hero h1{font-size:clamp(3rem,6vw,4.6rem)!important}
}
@media(max-width:700px){
  body.ci-brand .home-main{width:calc(100% - 34px)!important}
  body.ci-brand .merch-hero h1{font-size:clamp(2.8rem,10vw,3.6rem)!important}
  body.ci-brand .merch-showcase-product img{padding:4px!important}
}
/* Quiz In: clear one-button landing, centered 1–2–3 directions. */
body.ci-brand.quiz-landing-v4 .quiz-in-landing{
  width:min(1550px,calc(100% - clamp(40px,6vw,120px)))!important;
}
body.ci-brand.quiz-landing-v4 .quiz-landing-hero{
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important;
  gap:clamp(30px,4vw,85px)!important;
  padding:clamp(32px,4vw,64px) 0 36px!important;
  border:0!important;align-items:center;
}
body.ci-brand.quiz-landing-v4 .quiz-landing-hero h1{
  font-size:clamp(3.4rem,4.5vw,5.8rem);max-width:700px;
}
body.ci-brand.quiz-landing-v4 .quiz-landing-copy>p:not(.quiz-landing-eyebrow):not(.quiz-landing-price){
  max-width:610px;font-size:1.1rem;line-height:1.65;
}
body.ci-brand.quiz-landing-v4 .quiz-landing-art{
  min-height:340px;max-height:490px;background:#edf5f0;
  border-radius:20px;padding:48px 30px;
}
body.ci-brand.quiz-landing-v4 .quiz-landing-art img{width:min(100%,570px)}
body.ci-brand.quiz-landing-v4 .quiz-included{
  padding:42px 0 36px!important;border:0!important;text-align:center;
}
body.ci-brand.quiz-landing-v4 .quiz-included h2{
  text-align:center;max-width:none;margin:0 auto 34px!important;
  font-size:clamp(2rem,3vw,2.8rem);
}
body.ci-brand.quiz-landing-v4 .quiz-included-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:clamp(24px,4vw,80px);align-items:start;
  max-width:1220px;margin:0 auto;
}
body.ci-brand.quiz-landing-v4 .quiz-included-grid>div{
  text-align:center;padding:5px 9px 0!important;
}
body.ci-brand.quiz-landing-v4 .quiz-included-number{
  display:block;margin:0 0 12px;
  font:750 clamp(2.4rem,3.4vw,3.5rem)/1 Fredoka,Inter,sans-serif;
  color:#daa000;
}
body.ci-brand.quiz-landing-v4 .quiz-included-grid h3{
  margin:0 0 10px;font:700 clamp(1.07rem,1.45vw,1.3rem)/1.3 Fredoka,Inter,sans-serif;
}
body.ci-brand.quiz-landing-v4 .quiz-included-grid p{
  margin:0 auto;max-width:310px;font:.97rem/1.55 Inter,system-ui,sans-serif;
}
body.ci-brand.quiz-landing-v4 .quiz-recovery{margin:38px auto 10px;text-align:center}
body.ci-brand.quiz-landing-v4 .quiz-landing-cta{border-radius:11px!important}
@media(max-width:780px){
  body.ci-brand.quiz-landing-v4 .quiz-in-landing{width:calc(100% - 34px)!important}
  body.ci-brand.quiz-landing-v4 .quiz-landing-hero{
    grid-template-columns:1fr!important;gap:25px!important;padding:29px 0 20px!important;
  }
  body.ci-brand.quiz-landing-v4 .quiz-landing-art{min-height:220px;padding:30px 19px}
  body.ci-brand.quiz-landing-v4 .quiz-included{padding:30px 0!important}
  body.ci-brand.quiz-landing-v4 .quiz-included-grid{
    grid-template-columns:1fr!important;gap:28px!important;
  }
  body.ci-brand.quiz-landing-v4 .quiz-included-grid>div{padding:0!important}
}
/* Quiz In builder: restore the existing live category filters as a proper sidebar. */
body.ci-brand.quiz-builder-v4 .digital-builder-main{
  width:min(1690px,calc(100% - clamp(36px,5vw,110px)))!important;
}
body.ci-brand.quiz-builder-v4 .quiz-builder-masthead{
  border:0!important;padding:0 0 23px!important;margin:0 0 14px!important;
}
body.ci-brand.quiz-builder-v4 .db-workspace .db-layout,
body.ci-brand.quiz-builder-v4 .db-layout{
  display:grid!important;
  grid-template-columns:minmax(165px,210px) minmax(0,1fr) minmax(265px,310px)!important;
  grid-template-areas:"setup setup setup" "categories rounds summary"!important;
  column-gap:clamp(18px,2vw,34px)!important;row-gap:25px!important;align-items:start!important;
}
body.ci-brand.quiz-builder-v4 .db-builder-panel{
  grid-area:setup!important;background:#f1f7f4!important;border:0!important;
  border-radius:16px!important;padding:22px 26px!important;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar{
  grid-area:categories!important;display:block!important;
  position:sticky;top:105px;align-self:start;min-width:0;padding:8px 0 16px;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar #quiz-category-label{
  display:block!important;margin:0 0 14px;padding:0 8px;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar #quiz-category-label h3{
  font:700 1.09rem/1.2 Fredoka,Inter,sans-serif;color:#0b2d62;margin:0;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar #filters{
  display:flex!important;flex-direction:column;gap:5px!important;
  height:auto!important;max-height:min(72vh,730px)!important;
  overflow:auto!important;padding:0!important;border:0!important;background:none!important;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar .db-filter{
  display:block!important;flex:0 0 auto!important;width:100%!important;
  min-height:42px!important;border:0!important;background:transparent!important;
  border-radius:10px!important;color:#3d5c70!important;text-align:left;
  padding:11px 13px!important;font:600 .87rem Inter,system-ui,sans-serif!important;
  box-shadow:none!important;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar .db-filter:hover{
  background:#ebf2ed!important;color:#0b2d62!important;
}
body.ci-brand.quiz-builder-v4 .quiz-category-sidebar .db-filter[aria-pressed="true"]{
  background:#0b2d62!important;color:#fff!important;
}
body.ci-brand.quiz-builder-v4 .db-rounds-panel{
  grid-area:rounds!important;min-width:0;border:0!important;padding:4px 0!important;
}
body.ci-brand.quiz-builder-v4 .db-summary{
  grid-area:summary!important;align-self:start;top:105px!important;
  border-radius:15px!important;background:#fff!important;
  border:1px solid #dce7e2!important;border-top:1px solid #dce7e2!important;
  box-shadow:0 9px 30px rgba(14,44,60,.06)!important;padding:23px!important;
}
body.ci-brand.quiz-builder-v4 .db-builder-panel :is(button,select),
body.ci-brand.quiz-builder-v4 .db-rounds-panel button,
body.ci-brand.quiz-builder-v4 .db-summary button{border-radius:10px!important}
body.ci-brand.quiz-builder-v4 .db-round-card{
  border-radius:14px!important;border:1px solid #e2ebe6!important;padding:17px!important;
}
body.ci-brand.quiz-builder-v4 .db-round-card-selected{border-color:#0b2d62!important}
body.ci-brand.quiz-builder-v4 .db-rounds-header{border:0!important;margin:0 0 13px!important}
body.ci-brand.quiz-builder-v4 .quiz-search-filters{
  grid-template-columns:minmax(0,1fr)!important;margin:0 0 19px!important;
}
body.ci-brand.quiz-builder-v4 .quiz-topic-select{display:none!important}
body.ci-brand.quiz-builder-v4 .db-search-label input{
  border-radius:11px!important;min-height:49px!important;
}
@media(min-width:1250px){
  body.ci-brand.quiz-builder-v4 .db-catalogue{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:1090px) and (min-width:701px){
  body.ci-brand.quiz-builder-v4 .db-layout{
    grid-template-columns:180px minmax(0,1fr)!important;
    grid-template-areas:"setup setup" "categories rounds" "summary summary"!important;
  }
  body.ci-brand.quiz-builder-v4 .db-summary{position:static!important}
  body.ci-brand.quiz-builder-v4 .db-catalogue{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:700px){
  body.ci-brand.quiz-builder-v4 .digital-builder-main{width:calc(100% - 32px)!important}
  body.ci-brand.quiz-builder-v4 .db-layout{
    grid-template-columns:1fr!important;
    grid-template-areas:"setup" "categories" "rounds" "summary"!important;gap:14px!important;
  }
  body.ci-brand.quiz-builder-v4 .db-builder-panel{
    padding:20px!important;border-radius:14px!important;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar{
    position:static!important;padding:14px 0 4px!important;overflow:hidden;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar #filters{
    display:flex!important;flex-direction:row!important;
    gap:7px!important;overflow-x:auto!important;max-height:none!important;
    padding:0 0 9px!important;scrollbar-width:thin;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar .db-filter{
    width:auto!important;white-space:nowrap!important;
    border:1px solid #d4e2db!important;
    min-height:40px!important;padding:9px 13px!important;
  }
  body.ci-brand.quiz-builder-v4 .db-summary{position:static!important}
  body.ci-brand.quiz-builder-v4 .db-catalogue{
    grid-template-columns:1fr!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.ci-brand .merch-real-showcase.is-changing .merch-showcase-product{opacity:1}
}
/* V6.1: mobile/tablet grid override uses equal-or-greater specificity than the
   desktop .db-workspace .db-layout selector so categories cannot remain in
   squeezed three-column desktop positions. */
@media(max-width:1090px) and (min-width:701px){
  body.ci-brand.quiz-builder-v4 .db-workspace .db-layout,
  body.ci-brand.quiz-builder-v4 .db-layout{
    display:grid!important;
    grid-template-columns:minmax(165px,205px) minmax(0,1fr)!important;
    grid-template-areas:"setup setup" "categories rounds" "summary summary"!important;
    gap:22px!important;
  }
}
@media(max-width:700px){
  body.ci-brand.quiz-builder-v4 .db-workspace .db-layout,
  body.ci-brand.quiz-builder-v4 .db-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"setup" "categories" "rounds" "summary"!important;
    gap:18px!important;
    width:100%!important;
    min-width:0!important;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar{
    width:100%!important;min-width:0!important;max-width:100%!important;
    position:static!important;
    overflow:hidden!important;
    align-self:stretch!important;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar #filters{
    display:flex!important;flex-direction:row!important;
    flex-wrap:nowrap!important;
    width:100%!important;max-width:100%!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    gap:8px!important;
    padding:0 0 11px!important;
    scroll-snap-type:x proximity;
  }
  body.ci-brand.quiz-builder-v4 .quiz-category-sidebar .db-filter{
    display:inline-flex!important;flex:0 0 auto!important;
    align-items:center!important;
    width:auto!important;max-width:none!important;
    white-space:nowrap!important;
    scroll-snap-align:start;
  }
  body.ci-brand.quiz-builder-v4 .db-rounds-panel,
  body.ci-brand.quiz-builder-v4 .db-summary,
  body.ci-brand.quiz-builder-v4 .db-builder-panel{
    width:100%!important;min-width:0!important;max-width:100%!important;
    position:static!important;
  }
  body.ci-brand.quiz-builder-v4 .db-catalogue{
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* CHIP IN lettering: brand offset is measured against the real logo ink. */
body.ci-brand .site-header .brand-merch{transform:translateY(var(--merch-ink-shift,0px))!important;}


/* V9 — align the VISIBLE letterforms rather than the PNG and text boxes.
   The approved CHIP IN logo's dark ink sits lower within its transparent PNG. */
body.ci-brand .site-header .brand-merch,
body.storefront-dark.merch-refined.ci-brand .site-header .brand-merch{
  position:relative!important;top:4px!important;
}
@media(max-width:700px){
  body.ci-brand .site-header .brand-merch,
  body.storefront-dark.merch-refined.ci-brand .site-header .brand-merch{
    top:3px!important;
  }
}

/* V11: keep the Chip In logo at the same horizontal anchor and scale as
   chipinworks.co.uk, regardless of which Merch/Quiz In page is open.
   The main site uses a centred 1160px .wrap and a 166px logo. */
body.ci-brand .site-header,
body.storefront-dark.merch-refined.ci-brand .site-header {
  padding-left:max(18px,calc((100% - 1160px)/2))!important;
  padding-right:max(18px,calc((100% - 1160px)/2))!important;
}
body.ci-brand .site-header .brand-logo,
body.storefront-dark.merch-refined.ci-brand .site-header .brand-logo {
  width:166px!important;
  height:auto!important;
  max-height:none!important;
  max-width:none!important;
  flex:0 0 166px!important;
  object-fit:contain;
  object-position:left center;
}
@media(max-width:820px){
  body.ci-brand .site-header .brand-logo,
  body.storefront-dark.merch-refined.ci-brand .site-header .brand-logo {
    width:135px!important;
    flex-basis:135px!important;
  }
}
@media(max-width:560px){
  body.ci-brand .site-header,
  body.storefront-dark.merch-refined.ci-brand .site-header {
    padding-left:12px!important;
    padding-right:12px!important;
  }
  body.ci-brand .site-header .brand-logo,
  body.storefront-dark.merch-refined.ci-brand .site-header .brand-logo {
    width:122px!important;
    flex-basis:122px!important;
  }
}
