/* Fitment comparison (catalog/includes/fit_check_tool.html), layout C of the design canvas (17 Nov 2026). One stylesheet for the shop's page
   and the staff page, so it carries its own colours: graphite = the wheel on the car now (dashed in the drawing), Autopart green = the
   new one, deep green = the answer. Dark only where the page is dark (the staff system's html.dark). */
.fitcheck {
  --fc-ink: #16171a; --fc-text: #2f3338; --fc-muted: #4f5862; --fc-faint: #6b7480;
  --fc-surface: #ffffff; --fc-field-bg: #ffffff; --fc-soft: #f4f7f5; --fc-line: #dfe4e1; --fc-field: #c3c9cf;
  --fc-old: #5b6670; --fc-old-ink: #44505a; --fc-new: #2c9a6e; --fc-new-ink: #1f7a55; --fc-deep: #143f30; --fc-hi: #9fe3c2;
  --fc-warn: #a15c00; --fc-danger: #b3261e; --fc-plate: #fff6c7;
  --fc-shadow: 0 18px 44px rgba(22, 23, 26, 0.2);
  /* the drawing */
  --fc-d-faint: #c3c8cd; --fc-d-faint-dark: #a9afb5; --fc-d-metal: #6a7077; --fc-d-disc: #55595f;
  --fc-d-caliper: #3f4348; --fc-d-boot: #6f757c; --fc-d-bg: #f4f7f5; --fc-d-orig: #8f969d; --fc-d-orig-rim: #7a8188;

  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; max-width: 1240px; margin: 0 auto; padding-block: 8px 24px;
  font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--fc-ink); font-size: 15px; line-height: 1.4;
}
html.dark .fitcheck {
  --fc-ink: #f2f3f5; --fc-text: #e4e6e9; --fc-muted: #b4b9bf; --fc-faint: #9aa0a6;
  --fc-surface: #1b1d20; --fc-field-bg: #22252a; --fc-soft: #22252a; --fc-line: #2f333a; --fc-field: #444a52;
  --fc-old: #a3afba; --fc-old-ink: #bcc6cf; --fc-new: #4fc08f; --fc-new-ink: #7fd6ae; --fc-deep: #173f31; --fc-hi: #9fe3c2;
  --fc-warn: #e0a34a; --fc-danger: #f2836f; --fc-plate: #3b351a;
  --fc-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  --fc-d-faint: #3f454c; --fc-d-faint-dark: #555c64; --fc-d-metal: #7a818a; --fc-d-disc: #8b9198;
  --fc-d-caliper: #a7adb4; --fc-d-boot: #5a6068; --fc-d-bg: #16181b; --fc-d-orig: #5f666e; --fc-d-orig-rim: #737a82;
}
.fitcheck *, .fitcheck *::before, .fitcheck *::after { box-sizing: border-box; }
.fitcheck .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fitcheck button, .fitcheck input, .fitcheck select { font: inherit; color: inherit; }
.fitcheck :focus-visible { outline: 2px solid var(--fc-new); outline-offset: 2px; }

/* left: the three steps */
.fc-steps { flex: 1 1 340px; max-width: 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .fc-steps { max-width: none; } }
.fc-intro { display: flex; flex-direction: column; gap: 6px; }
.fc-title { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; color: var(--fc-ink); }
.fc-lede { margin: 0; font-size: 15px; color: var(--fc-muted); }
.fc-step { background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fc-step__head { display: flex; align-items: center; gap: 10px; }
.fc-step__head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--fc-ink); text-transform: none; letter-spacing: 0; }
.fc-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--fc-ink); color: var(--fc-surface); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.fc-num--old { background: var(--fc-old); color: #fff; }
.fc-num--new { background: var(--fc-new); color: #fff; }
html.dark .fc-num--old, html.dark .fc-num--new { color: #101113; }

/* the closed pickers and their pop-outs */
.fc-pick { position: relative; }
.fc-picker { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--fc-field); border-radius: 10px; background: var(--fc-soft); text-align: left; cursor: pointer; }
.fc-picker:hover { border-color: var(--fc-muted); }
.fc-picker[aria-expanded="true"] { border-color: var(--fc-ink); background: var(--fc-surface); }
.fc-picker__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fc-picker__main { font-weight: 700; font-size: 15px; color: var(--fc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-picker__sub { font-size: 13px; color: var(--fc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-chev { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--fc-ink); stroke-width: 2; transition: transform 0.15s; }
.fc-picker[aria-expanded="true"] .fc-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .fc-chev { transition: none; } }
.fc-thumb { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #2f3236 center / cover no-repeat; box-shadow: inset 0 0 0 7px #4b5056; }
.fc-thumb.has-img { box-shadow: none; background-color: var(--fc-surface); }
.fc-pop { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: min(460px, calc(100vw - 32px)); max-height: min(70vh, 620px); overflow-y: auto;
  background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 14px; box-shadow: var(--fc-shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fc-pop[hidden] { display: none; }
.fc-field { margin: 0; font-size: 12px; font-weight: 700; color: var(--fc-muted); }
.fc-note { margin: 0; font-size: 13px; color: var(--fc-faint); }
.fc-note.fc-warn, .fc-warn { color: var(--fc-warn); }
.fc-reg-row { display: flex; gap: 8px; }
.fc-reg { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--fc-field); border-radius: 8px; background: var(--fc-plate); font-size: 17px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.fc-reg::placeholder { font-weight: 500; letter-spacing: 0.04em; color: var(--fc-faint); }
.fc-btn { height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--fc-deep); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fc-btn:disabled { opacity: 0.6; cursor: progress; }
.fc-clear { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--fc-field); border-radius: 12px; background: var(--fc-surface); color: var(--fc-ink); font-size: 15px; font-weight: 700; cursor: pointer; }
.fc-clear:hover { border-color: var(--fc-ink); color: var(--fc-ink); }
.fc-or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fc-faint); }
.fc-or::before, .fc-or::after { content: ""; flex: 1; height: 1px; background: var(--fc-line); }
.fc-pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fc-pickers label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--fc-muted); min-width: 0; }
.fc-pickers select, .fc-offset select, .fc-search { height: 42px; width: 100%; min-width: 0; padding: 0 10px; border: 1px solid var(--fc-field); border-radius: 8px; background: var(--fc-field-bg); font-size: 15px; font-weight: 500; color: var(--fc-ink); }
.fc-pickers select:disabled { opacity: 0.55; }
.fc-sizes, .fc-results { display: flex; flex-direction: column; gap: 6px; }
.fc-size, .fc-result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 1px solid var(--fc-line); border-radius: 9px; background: var(--fc-surface); text-align: left; cursor: pointer; }
.fc-size { flex-direction: column; align-items: flex-start; gap: 2px; }
.fc-size:hover, .fc-result:hover { border-color: var(--fc-muted); background: var(--fc-soft); }
.fc-size.is-on { border: 2px solid var(--fc-old); padding: 8px 10px; }
.fc-size__main, .fc-result__main { font-weight: 700; font-size: 14px; color: var(--fc-ink); }
.fc-size__meta { font-size: 12px; color: var(--fc-faint); }
.fc-result__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fc-offset { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--fc-text); }
.fc-offset select { font-weight: 700; }
.fc-offset[hidden] { display: none; }

/* step 3: the sizes */
.fc-grid { display: grid; grid-template-columns: 50px repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr); gap: 6px; align-items: center; }
.fc-col-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fc-faint); }
.fc-row-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.fc-row-h--old { color: var(--fc-old-ink); }
.fc-row-h--new { color: var(--fc-new-ink); }
.fc-grid input, .fc-spacer input { height: 42px; width: 100%; min-width: 0; padding: 0 8px; border: 1px solid var(--fc-field); border-radius: 7px; background: var(--fc-field-bg); font-size: 15px; font-weight: 700; color: var(--fc-ink); font-variant-numeric: tabular-nums; }
.fc-grid input::placeholder, .fc-spacer input::placeholder { color: var(--fc-faint); font-weight: 500; }
.fc-spacer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--fc-text); }
.fc-spacer span { display: inline-flex; align-items: center; gap: 6px; }
.fc-spacer input { width: 76px; }
.fc-status { margin: 0; min-height: 2.9em; font-size: 13px; color: var(--fc-muted); }

/* right: the answer, the drawing, the details */
.fc-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fc-answer { background: var(--fc-deep); color: #fff; border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.fc-answer__text { margin: 0; font-size: 19px; line-height: 1.45; max-width: 62ch; color: #fff; }
.fc-answer__text strong { color: var(--fc-hi); }
.fc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .fc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fc-answer__text { font-size: 17px; } }
.fc-tile { background: rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-tile__v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.fc-tile__l { font-size: 12px; color: #c9e6d8; }
.fc-error { margin: 0; color: #ffd3cc; font-weight: 600; }
.fc-detail { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }   /* the table to the right of the drawing */
@media (max-width: 640px) { .fc-detail { grid-template-columns: minmax(0, 1fr); } }
.fc-diagram { margin: 0; background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fc-diagram svg { width: 100%; height: auto; max-height: 620px; display: block; background: var(--fc-d-bg); border-radius: 10px; }
.fc-diagram svg:empty { min-height: 260px; }
.fc-diagram figcaption { font-size: 12px; color: var(--fc-muted); }
.fc-table-card { background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 14px; padding: 14px; overflow-x: auto; display: flex; flex-direction: column; gap: 8px; }
.fc-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fc-table th, .fc-table td { text-align: left; padding: 8px; border-top: 1px solid var(--fc-line); color: var(--fc-text); white-space: nowrap; }
.fc-table thead th { border-top: 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.fc-table tbody th { font-weight: 500; }
.fc-th--old { color: var(--fc-old-ink) !important; }
.fc-th--new { color: var(--fc-new-ink) !important; }
.fc-th--diff { color: var(--fc-ink) !important; }
.fc-table .fc-row-head th, .fc-table .fc-row-head td { font-weight: 700; color: var(--fc-ink); }
.fc-table .fc-diff { font-weight: 700; color: var(--fc-ink); }
@media (max-width: 480px) { .fc-table tbody th { white-space: normal; } .fc-grid { grid-template-columns: 40px repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr); } }

/* the drawing's parts (fit-check.js draw(), in millimetres) */
.fc-d-faint { fill: var(--fc-d-faint); fill-opacity: 0.6; }
.fc-d-faint-dark { fill: var(--fc-d-faint-dark); fill-opacity: 0.75; }
.fc-d-knuckle { fill: var(--fc-d-faint); fill-opacity: 0.6; stroke: var(--fc-d-faint-dark); stroke-width: 3; stroke-linejoin: round; }
.fc-d-joint { fill: var(--fc-d-faint-dark); }
.fc-d-boot { fill: var(--fc-d-boot); fill-opacity: 0.55; }
.fc-d-rod { fill: var(--fc-d-faint-dark); }
.fc-d-spring { fill: none; stroke: var(--fc-d-faint-dark); stroke-width: 9; stroke-linecap: round; }
.fc-d-spring--back { stroke: var(--fc-d-faint); stroke-width: 7; }
.fc-d-disc { fill: var(--fc-d-disc); }
.fc-d-caliper { fill: var(--fc-d-caliper); }
.fc-d-hub { fill: var(--fc-d-metal); }
.fc-d-tyre.fc-d-old { fill: var(--fc-d-orig); stroke: none; }
.fc-d-rim.fc-d-old { fill: none; stroke: var(--fc-d-orig-rim); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
.fc-d-tyre.fc-d-new { fill: none; stroke: var(--fc-new); stroke-width: 5; stroke-linejoin: round; }
.fc-d-rim.fc-d-new { fill: none; stroke: var(--fc-new); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.fc-key { display: inline-block; width: 16px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 0; }
.fc-key--old { background: var(--fc-d-orig); }
.fc-key--new { border: 2.5px solid var(--fc-new); margin-left: 8px; }

/* the tyre: two boxes with the slash fixed between them (17 Nov 2026) */
.fc-tyre-in { display: flex; align-items: center; height: 42px; min-width: 0; border: 1px solid var(--fc-field); border-radius: 7px; background: var(--fc-field-bg); overflow: hidden; }
.fc-tyre-in:focus-within { outline: 2px solid var(--fc-new); outline-offset: 1px; }
.fc-grid .fc-tyre-in input { height: 40px; border: 0; border-radius: 0; background: transparent; padding: 0 2px; text-align: center; outline: none; }
.fc-grid .fc-tyre-in .fc-tyre-w { flex: 3 1 0; min-width: 0; }
.fc-grid .fc-tyre-in .fc-tyre-p { flex: 2 1 0; min-width: 0; }
.fc-slash { flex: none; font-weight: 700; color: var(--fc-muted); }

/* Staggered (30 Nov 2026): "Same all round / Staggered" on step 2; then a rear wheel picker, rear sizes and spacer on the left, and on
   the right the front and rear tiles, two drawings side by side and the table in Front and Rear columns. data-axle-only shows only
   then (the hidden attribute has to win over the display rules above). */
.fitcheck [hidden] { display: none !important; }
.fc-step__head { flex-wrap: wrap; }
.fc-switch { flex: 1 0 100%; display: flex; padding: 3px; border-radius: 999px; background: var(--fc-soft); border: 1px solid var(--fc-line); }   /* its own row under the heading */
.fc-switch button { flex: 1 1 0; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--fc-muted); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fc-switch button:hover { color: var(--fc-ink); }
.fc-switch button[aria-pressed="true"] { background: var(--fc-deep); color: #fff; }
.fc-axle-h { margin: 2px 0 -4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fc-muted); }
.fc-rear-wheel, .fc-rear-sizes { display: flex; flex-direction: column; gap: 10px; }
.fc-spacers { display: flex; flex-direction: column; gap: 8px; }
.fc-axle-tag { margin: 0 0 -8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #c9e6d8; }
.fc-diagrams { display: grid; gap: 16px; min-width: 0; align-items: start; }
.fc-diagram__axle { margin: 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fc-muted); }
.is-staggered .fc-detail { grid-template-columns: minmax(0, 1fr); }
.is-staggered .fc-diagrams { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.is-staggered .fc-diagram svg { max-height: 460px; }
.fc-table .fc-axles th { padding-bottom: 2px; }
.fc-table .fc-th--axle { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--fc-ink) !important; }
.fc-table .fc-th--rear, .fc-table .fc-td--rear { border-left: 2px solid var(--fc-line); padding-left: 12px; }
.fc-stagger-note { margin: 0; font-size: 13px; font-weight: 700; color: var(--fc-text); }
.is-staggered .fc-table { font-size: 13px; }
.is-staggered .fc-table th, .is-staggered .fc-table td { padding: 7px 6px; }
.is-staggered .fc-table .fc-row-head td { white-space: normal; min-width: 72px; }   /* the wheel and tyre labels wrap, so the table fits */
.is-staggered .fc-table .fc-th--rear, .is-staggered .fc-table .fc-td--rear { padding-left: 10px; }
