/* CarwareToolkit portal. Light only, by choice; the logo is the only element of the house style. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; src: url("../fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; src: url("../fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-display: swap; }

:root {
    color-scheme: light;
    --bg: #f3f6f8; --surface: #ffffff; --surface-2: #eaf0f4; --ink: #12222e; --muted: #5d6f7c; --line: #d5dee5; --line-strong: #b9c6d0;
    --accent: #1f6f97; --accent-ink: #ffffff; --accent-soft: #e2eff6;
    --ok: #2a7a58; --ok-soft: #e1f2ea; --warn: #a8691a; --warn-soft: #fbeed9; --err: #b1413a; --err-soft: #f8e3e1;
    --diff-old: #b1413a; --diff-new: #1f6f97;
    --radius: 6px; --shadow: 0 1px 2px rgba(18, 34, 46, .08);
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { padding: 48px 16px; text-align: center; color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.spaced { margin-top: 16px; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.hint.err { color: var(--err); }
.hint.warn { color: var(--warn); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 16px; }
.topbar .brand { display: flex; align-items: center; }
.topbar .logo { height: 26px; width: auto; display: block; }
.topbar .product { font-weight: 600; letter-spacing: .02em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; white-space: nowrap; }
.topbar .grow, .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.env, .chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.chip.soon { background: var(--surface-2); color: var(--muted); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; cursor: pointer; font-weight: 500; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.user { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.user .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink); }
button.link { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }

/* Shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100% - 56px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.side .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; }
.side a.nav:hover { background: var(--surface-2); }
.side a.nav.active { background: var(--accent-soft); color: var(--accent); }
.side a.nav.sub { font-weight: 400; font-size: 13px; padding: 6px 10px 6px 14px; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.main { padding: 24px 24px 48px; min-width: 0; }
.main > * { max-width: 1040px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; text-wrap: balance; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; max-width: 65ch; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Blocks */
.grid { display: grid; gap: 16px; }
/* A grid cell may shrink below its content, so a long line scrolls inside it instead of widening the page */
.grid > * { min-width: 0; }
.grid.tools { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.slim { margin-bottom: 16px; }
.card.tool { display: flex; flex-direction: column; gap: 8px; }
.card.tool .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card.tool .actions { margin-top: auto; padding-top: 8px; }
.card.tool p { margin: 0; color: var(--muted); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .v.small { font-size: 15px; }
.stat .v.ok { color: var(--ok); }
.stat .v.err { color: var(--err); }
.stat .s { font-size: 12px; color: var(--muted); }
.section { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 500; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Forms */
.form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; }
.input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; width: 100%; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 20px; display: flex; gap: 16px; align-items: center; background: var(--surface-2); flex-wrap: wrap; }
.drop .file { font-family: var(--mono); font-size: 13px; }
.drop .file .name { font-weight: 500; color: var(--ink); word-break: break-all; }
.drop .file .size { color: var(--muted); }
.req { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.req span { font-family: var(--mono); }
.req .k { font-family: var(--sans); }

/* Checks */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-2); }
.checks .dot { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 2px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.checks .ok .dot { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.checks .err .dot { background: var(--err-soft); color: var(--err); border-color: transparent; }
.checks .t { font-weight: 500; }
.checks .d { color: var(--err); font-size: 13px; font-family: var(--mono); }
.callout { border-left: 3px solid var(--err); background: var(--err-soft); color: var(--ink); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 16px; }
.callout.ok { border-color: var(--ok); background: var(--ok-soft); }
.callout.info { border-color: var(--accent); background: var(--accent-soft); }
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout b { font-weight: 600; }
.svcs { display: flex; gap: 6px; flex-wrap: wrap; white-space: normal; min-width: 240px; }
.svc { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--radius); font-size: 12px; border: 1px solid var(--line); background: var(--surface); }
.svc.late { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.svc.overdue { background: var(--err-soft); border-color: transparent; color: var(--err); }
.svc.alarm { background: var(--err); border-color: transparent; color: #fff; font-weight: 600; }
.visit.drop { border-color: var(--err); }

/* Service history editor: one foldable block per visit */
.sh-bar { margin-bottom: 12px; }
.sh-name { max-width: 320px; }
.visit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 12px; }
.visit.open { border-color: var(--accent); }
.visit.invalid { border-color: var(--err); }
.visit-head { display: flex; gap: 16px; align-items: center; padding: 10px 14px; cursor: pointer; flex-wrap: wrap; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; border-radius: var(--radius); }
.visit-head:hover { background: var(--surface-2); }
.visit-head .date { font-family: var(--mono); font-weight: 500; }
.visit-head .km { font-family: var(--mono); color: var(--muted); min-width: 90px; }
.visit-head .who { color: var(--muted); }
.visit-head .sum { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 200px; }
.visit-body { border-top: 1px solid var(--line); padding: 14px; }
.visit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.visit-fields label { display: flex; flex-direction: column; gap: 6px; }
.input[aria-invalid="true"] { border-color: var(--err); background: var(--err-soft); }
.sh-services td { vertical-align: middle; }
.sh-services .input { padding: 5px 8px; font-size: 13px; min-width: 90px; }
.sh-services .sh-add td { background: var(--bg); }
.sh-services .sh-add .input { max-width: 260px; }
.iconbtn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: var(--radius); }
.iconbtn:hover { background: var(--err-soft); color: var(--err); }

/* Catalogue filters */
.catbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.catbar .input { max-width: 480px; }
.filters-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 500; font-size: 13px; }
.filter .n { font-family: var(--mono); font-size: 12px; opacity: .8; margin-left: 2px; }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }

/* Tables; position: relative keeps visually hidden headers inside the scroll area on a phone */
.tablewrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.mono, th.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.diff td.old { color: var(--diff-old); }
.diff td.new { color: var(--diff-new); font-weight: 500; }
.tfoot { padding: 8px 12px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tfoot.bare { border: 0; padding-left: 0; }

/* Key-value, files, logs */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.kv dd.sans { font-family: var(--sans); word-break: normal; }
.files { display: grid; gap: 8px; }
.files .f { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); flex-wrap: wrap; }
.files .f .n { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.files .f .s { color: var(--muted); font-size: 12px; font-family: var(--mono); }
pre.json, pre.log { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; margin: 0; }
pre.log { max-height: 320px; overflow: auto; user-select: all; line-height: 1.45; }

/* Login */
.login-wrap { min-height: 60vh; display: grid; place-items: center; padding: 24px 0; }
.login { width: 100%; max-width: 380px; }
.login .logo { height: 32px; width: auto; display: block; margin: 4px auto 20px; }
.login h1 { font-size: 18px; text-align: center; margin-bottom: 16px; }
.login .form { grid-template-columns: 1fr; }
.login .hint { text-align: center; margin-top: 12px; }
.login .btn { justify-content: center; }

#blazor-error-ui { background: var(--err-soft); color: var(--err); bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 820px) {
    .shell { grid-template-columns: 1fr; }
    .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; gap: 4px; }
    .side .group, .side .foot { display: none; }
    /* All links stay visible on a phone; a sideways-scrolling row hid the SP-Daten pages */
    .side { flex-wrap: wrap; overflow-x: visible; }
    .side a.nav { white-space: nowrap; padding: 6px 10px; }
    .main { padding: 16px 16px 40px; }
    .form, .grid.two { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
    .topbar .product, .user .user-name { display: none; }
    .topbar { gap: 10px; padding: 0 12px; }
    .topbar .logo { height: 22px; }
}

/* SP-Daten packages */
.sp-page .small { font-size: 12px; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.sp-page .series { display: inline-flex; font-size: 12px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); margin: 0 4px 4px 0; }
.sp-packages td { vertical-align: top; }
.sp-packages td.wrap { white-space: normal; max-width: 280px; }
.sp-packages td.actions { text-align: right; }
.sp-packages .confirm { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; white-space: normal; max-width: 320px; margin-left: auto; text-align: left; }
.sp-folder { width: auto; min-width: 260px; }
/* A wide table may use the whole main column; it only scrolls when the screen itself is too narrow */
.main > .wide, .main > .sp-page { max-width: none; }
.sp-page > :not(.wide) { max-width: 1040px; }

/* SP-Daten number lookup */
.chip.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.sp-search { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.sp-search .field { width: 220px; }
.sp-search .hint { flex-basis: 100%; margin: 0; }
.sp-lookup h2 { font-size: 16px; font-weight: 600; margin: 0; }
.sp-lookup h2.sp-title { font-size: 20px; }
.sp-lookup .row + .sp-facts, .sp-lookup .row + .sp-chain, .sp-lookup .row + .sp-hw { margin-top: 14px; }
.sp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.sp-facts dt { font-size: 12px; color: var(--muted); }
.sp-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sp-link { margin-right: 10px; }
.sp-combined dd { display: flex; flex-direction: column; gap: 2px; }
.sp-value { display: block; }
.sp-filter { margin-top: 14px; }
.sp-codes { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sp-code { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.sp-code:hover { border-color: var(--accent); }
.sp-code.removed { text-decoration: line-through; color: var(--err); background: var(--err-soft); border-color: transparent; }
.sp-code.added { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.sp-edit-fields .field, .sp-codes-start .field { width: 160px; }
.sp-edit-fields, .sp-codes-start, .sp-add-form { align-items: flex-end; }
.sp-wrap { overflow-wrap: anywhere; white-space: normal; }
.sp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.sp-lookup tr.sel td { background: var(--accent-soft); }
.sp-lookup tr.dim td { color: var(--muted); }
.sp-prg-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.sp-block { display: block; margin-top: 4px; }
.sp-vehicle { margin: 12px 0; }
.sp-code-list { margin: 8px 0 12px; }
.sp-code-list summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.sp-changes { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.sp-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sp-keywords { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-fa { font-size: 12.5px; background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; overflow-wrap: anywhere; }
.sp-detail td { background: var(--surface-2); white-space: normal; }
@media (max-width: 900px) { .sp-summary { grid-template-columns: 1fr 1fr; } }
.sp-sub { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
/* One SG of the factory default coding: a header that opens its function table */
.sp-sg { border-top: 1px solid var(--line); }
.sp-sg-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; width: 100%; padding: 10px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sp-sg-head:hover { color: var(--accent); }
.sp-sg .tablewrap { margin-bottom: 12px; }
.sp-features { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.sp-features li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--surface-2); font-size: 13px; }
.sp-chain, .sp-hw { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sp-chain li:not(:last-child)::after { content: "→"; color: var(--muted); margin-left: 8px; }
.sp-node { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-decoration: none; }
a.sp-node:hover { border-color: var(--accent); }
.sp-node.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sp-node.newest { background: var(--ok-soft); border-color: var(--ok); }
.sp-node.own { border-color: var(--accent); }
.sp-how ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; counter-reset: step; }
.sp-how li { display: flex; flex-direction: column; gap: 2px; counter-increment: step; }
.sp-how li b::before { content: counter(step) ". "; }
@media (max-width: 900px) {
    .sp-facts, .sp-features, .sp-how ol { grid-template-columns: 1fr; }
}
/* Trace comparison: one drop area for every file, then the SGs beside the detail of one SG */
.sp-trace-drop { position: relative; }
.sp-trace-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sp-trace-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-trace-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-trace-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-trace-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.sp-trace-item:hover { background: var(--surface-2); }
.sp-trace-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sp-trace-item > span:first-child { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; overflow-wrap: anywhere; }
.sp-old { color: var(--err); }
.sp-new { color: var(--ok); font-weight: 500; }
@media (max-width: 900px) { .sp-trace-grid { grid-template-columns: 1fr; } }

/* Check control: the messages to choose from, one box per CC-ID of a mask byte, and files beside steps */
.sp-cc-ids { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.sp-cc-ids li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sp-cc-ids li:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.sp-cc-ids label { display: flex; flex-direction: column; flex-grow: 1; cursor: pointer; }
.sp-cc-strip-label { margin: 12px 0 6px; }
.sp-cc-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.sp-cc-strip li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.sp-cc-strip li span { font-size: 11px; color: var(--muted); text-align: center; }
.sp-cc-strip li.off { background: var(--surface-2); border-style: dashed; }
.sp-cc-strip li.off b { color: var(--muted); text-decoration: line-through; }
.sp-cc-strip li.cut { background: var(--warn-soft); border-color: var(--warn); }
.sp-cc-strip li.cut b, .sp-cc-strip li.cut span { color: var(--warn); }
.sp-cc-strip li.cut span { font-weight: 600; }
.sp-cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-cc-steps { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 900px) { .sp-cc-grid { grid-template-columns: 1fr; } .sp-cc-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
