/* What can I legally ride? CBT Test look: tokens and shared parts come from core/cbt-tools-base.css
   (ink, muted, line, road, easier, harder; Barlow Condensed + Barlow). */
.cbtwr { --full: var(--easier); --full-tint: #E8F0FA; --learner-tint: #FFFFFF; }

/* Garage: the 4 bikes */
.cbtwr-garage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 24px; }
.cbtwr-bike { border: 2px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 12px 8px; text-align: center; transition: border-color .25s, background-color .25s, opacity .25s; }
.cbtwr-bike-svg { display: block; width: 100%; max-width: 92px; height: auto; margin: 0 auto 6px; color: var(--neutral-data); transition: color .25s; }
.cbtwr-bike-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.15; color: var(--ink); }
.cbtwr-cat { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 14px; }
.cbtwr-bike-spec { font-size: 14px; color: var(--muted); line-height: 1.3; margin-top: 2px !important; }
.cbtwr-bike-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px !important; font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--muted); }
.cbtwr-bike.is-full { border-color: var(--full); background: var(--full-tint); }
.cbtwr-bike.is-full .cbtwr-bike-svg, .cbtwr-bike.is-full .cbtwr-bike-status { color: var(--full); }
.cbtwr-bike.is-learner { border: 4px solid var(--ink); padding: 10px 6px; }
.cbtwr-bike.is-learner .cbtwr-bike-svg, .cbtwr-bike.is-learner .cbtwr-bike-status { color: var(--ink); }
.cbtwr-bike.is-no { border-style: dashed; background: var(--road); }
.cbtwr-bike.is-no .cbtwr-bike-svg { color: #A9B1B8; }
.cbtwr-bike.is-no .cbtwr-bike-name { color: var(--muted); }
.cbtwr-tick { font-weight: 700; }
/* A small learner plate: white square, ink border, red L. */
.cbtwr-lplate { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; border: 2px solid var(--ink); border-radius: 4px; background: #FFFFFF; color: var(--harder); font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1; }
.cbtwr-rules { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.3; text-align: left; }
.cbtwr-rules li { display: flex; gap: 6px; margin: 4px 0; color: var(--ink); }
.cbtwr-mark { font-weight: 700; flex: 0 0 auto; width: 1em; }
.cbtwr-rules .is-ok .cbtwr-mark { color: var(--easier); }
.cbtwr-rules .is-not .cbtwr-mark { color: var(--harder); }

.cbtwr-garage.is-compact { margin-bottom: 16px; }
.cbtwr-garage.is-compact .cbtwr-bike { padding: 8px 4px; }
.cbtwr-garage.is-compact .cbtwr-bike-svg { max-width: 56px; margin-bottom: 2px; }
.cbtwr-garage.is-compact .cbtwr-bike-name { font-size: 16px; }
.cbtwr-garage.is-compact .cbtwr-cat, .cbtwr-garage.is-compact .cbtwr-bike-spec, .cbtwr-garage.is-compact .cbtwr-bike-status { display: none; }

/* Steps */
.cbtwr-app { background: var(--road); border-radius: var(--radius-lg); padding: 20px; }
.cbtwr-start { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px !important; font-weight: 600; }
.cbtwr-start-badge { display: inline-block; background: var(--ink); color: #FFFFFF; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .5px; padding: 6px 12px; border-radius: var(--radius-sm); animation: cbtwr-pulse 1.8s ease-in-out infinite; }
.cbtwr-start-badge::after { content: " ↓"; }
@keyframes cbtwr-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,42,51,.45); } 50% { box-shadow: 0 0 0 8px rgba(31,42,51,0); } }
.cbtwr-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.cbtwr-dots { display: inline-flex; gap: 6px; }
.cbtwr-dots span { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.cbtwr-dots .is-done { background: var(--easier); }
.cbtwr-dots .is-now { background: var(--ink); }
.cbtwr-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.cbtwr-qtext { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 6vw, 34px); line-height: 1.1; margin: 0 0 6px; padding: 0; color: var(--ink); }
.cbtwr-hint { color: var(--muted); margin-bottom: 4px !important; }
.cbtwr-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.cbtwr-opts.is-many { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cbtwr .cbtwr-opt { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 12px 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-sm); text-align: left; text-transform: none; letter-spacing: 0; transition: background-color .15s, transform .1s; }
.cbtwr .cbtwr-opt:hover { background: #E8F0FA; color: var(--ink); }
.cbtwr .cbtwr-opt:active { transform: scale(.98); }
.cbtwr .cbtwr-opt.is-picked { background: var(--ink); color: #FFFFFF; }
.cbtwr .cbtwr-opt.is-picked .cbtwr-opt-s { color: #D5DBE0; }
.cbtwr-opt-t { font-weight: 600; font-size: 17px; line-height: 1.25; }
.cbtwr-opt-s { font-size: 14px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.cbtwr .cbtwr-back { min-height: 48px; margin-top: 14px; padding: 8px 16px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-sm); font-weight: 600; text-transform: none; letter-spacing: 0; }
.cbtwr .cbtwr-back:hover { background: #E8F0FA; color: var(--ink); }

/* Result */
.cbtwr-result:focus { outline: none; }
.cbtwr-rtitle { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 5.5vw, 32px); line-height: 1.15; margin: 0 0 4px; color: var(--ink); }
.cbtwr-rsub { color: var(--muted); margin-bottom: 14px !important; }
.cbtwr-lrules { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: start; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.cbtwr-lrules::before { content: "L"; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; height: 40px; border: 3px solid var(--ink); border-radius: 6px; color: var(--harder); font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; }
.cbtwr-lrules-h { font-weight: 600; }
.cbtwr-lrules-h, .cbtwr-lrules ul { grid-column: 2; }
.cbtwr-lrules ul { margin: 4px 0 0; padding-left: 20px; }
.cbtwr-note { margin: 0 0 10px !important; color: var(--ink); }
.cbtwr-next { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-top: 16px; }
.cbtwr-next-k { font-size: 14px; font-weight: 600; color: var(--muted); }
.cbtwr-next-t { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; margin: 2px 0 6px !important; color: var(--ink); }
.cbtwr-next-p { margin-bottom: 12px !important; }
.cbtwr .cbtwr-cta { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 16px; margin: 4px 8px 4px 0; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--ink); color: #FFFFFF; font-weight: 600; text-decoration: none; }
.cbtwr .cbtwr-cta--2 { background: var(--surface); color: var(--ink); }
.cbtwr .cbtwr-cta:hover { text-decoration: underline; }
.cbtwr-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* No-JS guide */
.cbtwr-fallback ul { padding-left: 20px; margin: 0; }
.cbtwr-fallback li { margin: 0 0 8px; }

/* Footer */
.cbtwr .cbt-foot p { margin-bottom: 10px; }
.cbtwr .cbtwr-check { color: var(--ink); font-size: 15px; }

@media (max-width: 560px) {
	.cbtwr-garage:not(.is-compact) { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.cbtwr-garage { gap: 8px; }
	.cbtwr-app { padding: 16px 14px; }
	.cbtwr-opts, .cbtwr-opts.is-many { grid-template-columns: 1fr 1fr; gap: 8px; }
	.cbtwr .cbtwr-opt { padding: 10px 12px; }
	.cbtwr-opt-t { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.cbtwr *, .cbtwr *::before, .cbtwr *::after { animation: none !important; transition: none !important; }
}
