/* 1.3.67 Gearing bench — compact-board layout. No math. */

/* Shared chrome already paints the photo header + title row. Hide the in-page hero / APK / extra All tools. */
body.cl-has-chrome #lab-switch,
body.cl-has-chrome .cl-bench-hero h1,
body.cl-has-chrome .cl-bench-apk,
body.cl-has-chrome .cl-bench-hero p.mt-2,
body.cl-has-chrome .cl-bench-hero a[href$="chainline.apk"],
body.cl-has-chrome .cl-bench-hero p.font-display.text-sm{display:none!important}

/* Landing: compact page frame. 1.3.72: Find the bike + Profiles sit under the
   selected-bike name header and above Pulls so switching bikes is quick.
   Both stay collapsed by default (same fold as other gearing sections). */
body.cl-has-chrome:not(.cl-bench-panel) #root main{
  display:flex;flex-direction:column;gap:16px;
  padding:16px 24px 48px!important;max-width:none;
}
@media (max-width:899px){
  body.cl-has-chrome:not(.cl-bench-panel) #root main{padding:8px 12px 88px!important;max-width:390px;}
}
body.cl-has-chrome:not(.cl-bench-panel) #root main > header,
body.cl-has-chrome:not(.cl-bench-panel) #root main > .cl-bench-hero{order:0;margin:0!important;padding:0!important;border:0;background:transparent}
body.cl-has-chrome:not(.cl-bench-panel) #root main > .cl-bench-find,
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_find"]){order:1}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_profiles"]){order:2}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_pulls"]){order:10}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_p2w"]){order:11}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_sprockets"]){order:12}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_tire"]){order:13}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :has([data-bench="bench_chain"]){order:14}
body.cl-has-chrome:not(.cl-bench-panel) #root main > :not(header):not(.cl-bench-hero):not(:has([data-bench])){order:70}

/* Bike line under the title row — 12px muted, not a display heading. */
body.cl-has-chrome .cl-bench-bike,
body.cl-has-chrome:not(.cl-bench-panel) #root main > header p{
  font:400 12px/1.35 "Source Sans 3",Manrope,sans-serif!important;
  letter-spacing:0!important;text-transform:none!important;
  color:#b8c6d2!important;margin:0 0 4px!important;max-width:100%;
}

/* Flush section cards (board has no heavy tile around a whole block). */
body.cl-has-chrome:not(.cl-bench-panel) #root main > section,
body.cl-has-chrome:not(.cl-bench-panel) #root main section.rounded-xl,
body.cl-has-chrome:not(.cl-bench-panel) #root main .bg-surface.rounded-xl{
  border:0!important;background:transparent!important;padding:0!important;border-radius:0!important;margin:0!important;box-shadow:none!important;
}

body.cl-has-chrome:not(.cl-bench-panel) #root main > section h2,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_p2w"] h2{
  font:italic 700 18px/1.1 "Barlow Condensed",sans-serif!important;
  letter-spacing:.08em;text-transform:uppercase;color:#f5f5f3!important;
  margin:0 0 8px!important;
}

/* FIND / PROFILES (and other folds) start collapsed. */
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold:not(.cl-fold-open){
  border:1px solid #2a333c!important;border-radius:12px!important;padding:10px 12px!important;background:#10151b!important;
}
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold:not(.cl-fold-open) > *:not(.cl-fold-head){display:none!important}
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold .cl-fold-head{
  cursor:pointer;display:flex;align-items:center;gap:8px;margin:0!important;
}
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold .cl-fold-head h2{
  font:italic 700 13px/1 "Barlow Condensed",sans-serif!important;letter-spacing:.1em;color:#9aa8b5!important;margin:0!important;
}
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold .cl-fold-head::after{
  content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid #9aa8b5;border-bottom:2px solid #9aa8b5;
  transform:rotate(45deg);opacity:.7;
}
body.cl-has-chrome:not(.cl-bench-panel) .cl-bench-fold.cl-fold-open .cl-fold-head::after{transform:rotate(-135deg)}

/* Metric tiles (PULLS 3-col, P2W / top speed already grid-cols-3). */
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_pulls"],
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_topspeed"]{
  gap:8px!important;
}
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_pulls"] > *,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_topspeed"] > *{
  background:#0a1016;border:1px solid #1c242c;border-radius:12px;padding:10px 10px 8px;min-width:0;
}
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_pulls"] .text-accent,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_p2w"] .text-accent,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_topspeed"] .text-accent{
  color:#ff761b!important;font:italic 700 28px/1 "Barlow Condensed",sans-serif!important;
}

/* Custom-pull + rider chips: orange selected, dark unselected. */
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_custom_pulls"] button,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_p2w"] button,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_nearby"] button{
  border-radius:10px;
}
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_custom_pulls"] input,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_p2w"] input,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_sprockets"] input,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_tire"] input,
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_chain"] input{
  background:#090e14;border:1px solid #1c242c;border-radius:10px;min-height:44px;color:#ecf1f5;
}

/* Isolated garage-panel boards (31–41) */
body.cl-bench-panel #root main{padding:16px 24px 48px!important;max-width:none;min-height:0!important}
@media (max-width:899px){
  body.cl-bench-panel #root main{padding:8px 12px 88px!important;max-width:390px;min-height:0!important}
}
body.cl-bench-panel #root > header,
body.cl-bench-panel .cl-bench-hero,
body.cl-bench-panel .cl-bench-apk,
body.cl-bench-panel .cl-bench-find,
body.cl-bench-panel [data-bench="bench_find"],
body.cl-bench-panel [data-bench="bench_pulls"],
body.cl-bench-panel [data-bench="bench_p2w"],
body.cl-bench-panel [data-bench="bench_sprockets"],
body.cl-bench-panel [data-bench="bench_nearby"],
body.cl-bench-panel [data-bench="bench_shop"],
body.cl-bench-panel [data-bench="bench_tire"],
body.cl-bench-panel [data-bench="bench_chart"],
body.cl-bench-panel [data-bench="bench_chain"],
body.cl-bench-panel [data-bench="bench_topspeed"],
body.cl-bench-panel [data-bench="bench_limits"],
body.cl-bench-panel [data-bench="bench_cruise"],
body.cl-bench-panel [data-bench="bench_custom_pulls"],
body.cl-bench-panel [data-bench="bench_correct"],
body.cl-bench-panel #root main > :has([data-bench="bench_find"]),
body.cl-bench-panel #root main > :has([data-bench="bench_pulls"]),
body.cl-bench-panel #root main > :has([data-bench="bench_p2w"]),
body.cl-bench-panel #root main > :has([data-bench="bench_sprockets"]),
body.cl-bench-panel #root main > :has([data-bench="bench_tire"]),
body.cl-bench-panel #root main > :has([data-bench="bench_chain"]),
body.cl-bench-panel #root main > :not(header):not(.cl-bench-hero):not(:has([data-bench-garage])):not(:has([data-bench="bench_profiles"])){display:none!important}
/* Keep the profiles section wrapper (it contains [data-bench-garage]); hide only the profile-actions UI and the section heading. */
body.cl-bench-panel:not(.cl-bench-panel-profiles) [data-bench="bench_profiles"]{display:none!important}
body.cl-bench-panel:not(.cl-bench-panel-profiles) #root main > :has([data-bench-garage]){
  border:0!important;background:transparent!important;padding:0!important;display:block!important;
}
body.cl-bench-panel:not(.cl-bench-panel-profiles) #root main > :has([data-bench-garage]) > :not(:has([data-bench-garage])):not([data-bench-garage]):not(.cl-panel-kicker){display:none!important}
body.cl-bench-panel [data-bench-garage]{display:block!important}
body.cl-bench-panel [data-bench-garage] details.gb-bike{
  display:block!important;border:0;padding:0;margin:0;background:transparent;
}
/* Show the open panel even if the parent <details.gb-bike> has not been expanded yet. */
body.cl-bench-panel [data-bench-garage] details.gb-bike > .gb-in,
body.cl-bench-panel [data-bench-garage] details.gb-bike > *:not(summary){display:block!important}
body.cl-bench-panel-profiles [data-bench-garage]{display:none!important}
body.cl-bench-panel-profiles #root main > :has([data-bench="bench_profiles"]){
  border:0!important;background:transparent!important;padding:0!important;
}
body.cl-bench-panel [data-bench-garage] details.gb-bike{border:0;padding:0;margin:0;background:transparent}
body.cl-bench-panel [data-bench-garage] details.gb-bike > summary{display:none!important}
body.cl-bench-panel [data-bench-garage] details.gb-sec:not(.cl-panel-on){display:none!important}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on{
  display:block;border:0;padding:0;background:transparent;
}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on > summary{
  font:italic 700 18px/1.1 "Barlow Condensed",sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#f5f5f3;padding:0 0 12px;
  list-style:none;display:block;
}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on > summary::-webkit-details-marker{display:none}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on > summary::before{display:none!important}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on{display:flex!important;flex-direction:column}
body.cl-bench-panel .cl-panel-kicker{
  order:-1;font:italic 700 12px/1 "Barlow Condensed",sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#9aa8b5;margin:0 0 10px;
}

body.cl-bench-panel [data-bench-garage] .gb-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
body.cl-bench-panel [data-bench-garage] .gb-f input,
body.cl-bench-panel [data-bench-garage] .gb-f select,
body.cl-bench-panel [data-bench-garage] .gb-body input,
body.cl-bench-panel [data-bench-garage] .gb-body select{
  height:44px!important;border-radius:6px!important;border:1px solid #1c242c!important;background:#090e14!important;color:#ecf1f5!important;
}
body.cl-bench-panel [data-bench-garage] .gb-save{margin-top:16px}
body.cl-bench-panel [data-bench-garage] .gb-save button,
body.cl-bench-panel [data-bench-garage] [data-gs]{
  display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;border-radius:6px;border:0;background:#FF5A0A;color:#0c0c10;font:700 14px "Source Sans 3",Manrope,sans-serif;
}
body.cl-bench-panel-profiles [data-bench="bench_profiles"] button,
body.cl-bench-panel-profiles #root main button{
  min-height:44px;border-radius:6px;
}

body.cl-bench-panel #cl-pull-cond{display:none!important}
body.cl-bench-panel [data-bench-garage] details.gb-sec.cl-panel-on > summary.cl-panel-sum-hide{
  position:absolute!important;width:1px;height:1px;padding:0!important;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);border:0;
}
body.cl-bench-panel .cl-panel-title{
  font:italic 700 18px/1.1 "Barlow Condensed",sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#f5f5f3;margin:8px 0 12px;
}

/* Boarded custom-pull controls: equal-width mode buttons, full-width + Add pull. */
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_custom_pulls"] .mt-2.flex.flex-wrap.gap-2{
  display:grid!important;grid-template-columns:1fr 1fr;gap:8px;
}
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_custom_pulls"] .mt-2.flex.flex-wrap.gap-2 > button{
  width:100%;min-height:44px;justify-content:center;border-radius:10px;padding:0 12px;
}
body.cl-has-chrome:not(.cl-bench-panel) [data-bench="bench_custom_pulls"] .mt-3.flex.flex-wrap.gap-2 > button:first-child{
  flex:1 0 100%;width:100%;min-height:44px;justify-content:center;
}
