/* Automotive AI Training Platform — shell + component library (artboards 01–02).
   Everything is scoped under .tp; tokens live in tp-tokens.css. */

.tp, .tp * { box-sizing: border-box; }
.tp {
    font-family: var(--tp-font);
    font-size: var(--tp-fs-body);
    font-variant-numeric: tabular-nums;
    color: var(--tp-ink);
    background: var(--tp-ground);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
.tp a { color: var(--tp-brand); text-decoration: none; }
.tp a:hover { text-decoration: underline; }
.tp h1, .tp h2, .tp h3, .tp p { margin: 0; }
.tp button { font-family: inherit; }

/* ---------- Shell ---------- */
.tp-shell { display: flex; min-height: 100vh; }
.tp-nav {
    width: var(--tp-nav-width); flex: 0 0 var(--tp-nav-width);
    background: var(--tp-surface); border-right: 1px solid var(--tp-border);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.tp-brand { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 16px; border-bottom: 1px solid var(--tp-border); }
.tp-brand-row { display: flex; align-items: center; gap: 10px; }
.tp-brand-tile {
    width: 34px; height: 34px; border-radius: 8px; background: var(--tp-brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; letter-spacing: .02em;
}
.tp-brand-name { font-weight: 700; font-size: 15px; color: var(--tp-ink); }
.tp-brand-sub { font-size: var(--tp-fs-meta); color: var(--tp-ink-muted); }
.tp-nav-list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.tp-nav-section { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-ink-muted); padding: 14px 12px 6px; }
.tp-nav-link {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--tp-radius-control);
    color: var(--tp-ink-nav) !important; font-size: 14.5px; font-weight: 500; text-decoration: none !important;
}
.tp-nav-link:hover { background: var(--tp-ground); }
.tp-nav-link.active { background: var(--tp-brand); color: #fff !important; }
.tp-nav-icon { width: 18px; text-align: center; display: none; }
.tp-nav-foot { padding: 14px 20px; border-top: 1px solid var(--tp-border); font-size: 12.5px; color: var(--tp-ink-muted); }
.tp-nav-back { display: inline-block; margin-bottom: 8px; color: var(--tp-ink-muted); text-decoration: underline; }
.tp-nav-back:hover { color: var(--tp-ink); }
.tp-nav-back:focus-visible { outline: 2px solid var(--tp-focus, currentColor); outline-offset: 2px; }

.tp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-topbar {
    min-height: var(--tp-topbar-height); background: var(--tp-surface); border-bottom: 1px solid var(--tp-border);
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 var(--tp-space-6); position: sticky; top: 0; z-index: 20;
}
.tp-topbar-scope { color: var(--tp-ink-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-topbar-scope a { color: var(--tp-brand); }
.tp-topbar-spacer { flex: 1; }
.tp-topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tp-nav-toggle, .tp-nav-backdrop { display: none; }
.tp-nav-toggle { height: 36px; width: 40px; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-control); background: var(--tp-surface); color: var(--tp-ink-nav); font-size: 18px; cursor: pointer; }
.tp-search { height: 36px; width: 240px; border: 1px solid var(--tp-border-input); border-radius: var(--tp-radius-control); padding: 0 12px; font: inherit; font-size: 14px; background: var(--tp-surface); color: var(--tp-ink); }
.tp-icon-btn { height: 36px; width: 36px; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-control); background: var(--tp-surface); cursor: pointer; color: var(--tp-ink-nav); position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tp-icon-btn .tp-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--tp-radius-pill); background: var(--tp-fail); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-sizing: border-box; }
.tp-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Scope selector, search combobox and notification popover (top bar). A transparent backdrop button sits
   behind an open popover so a click anywhere else closes it; the popover's own wrapper is raised above it. */
.tp-scope { display: flex; align-items: center; gap: 8px; }
.tp-scope-label { font-size: 12px; font-weight: 600; color: var(--tp-ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.tp-scope .tp-scope-select { width: auto; min-width: 180px; max-width: 260px; height: 36px; font-size: 14px; }
.tp-pop-backdrop { position: fixed; inset: 0; z-index: 28; border: 0; padding: 0; background: transparent; cursor: default; }
.tp-search-wrap, .tp-bell-wrap { position: relative; }
.tp-pop-above { z-index: 30; }
.tp-search-list, .tp-bell-panel {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; background: var(--tp-surface);
    border: 1px solid var(--tp-border); border-radius: var(--tp-radius-card); box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
.tp-search-list { list-style: none; margin: 0; padding: 6px; width: 340px; max-width: calc(100vw - 32px); max-height: 380px; overflow-y: auto; left: 0; right: auto; }
.tp-search-opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--tp-radius-control); cursor: pointer; }
.tp-search-opt:hover, .tp-search-opt-active { background: var(--tp-brand-tint); }
.tp-search-opt-title { font-size: 14px; font-weight: 600; color: var(--tp-ink); }
.tp-search-opt-sub { font-size: 12.5px; color: var(--tp-ink-muted); }
.tp-search-note { padding: 8px 10px; font-size: 13px; color: var(--tp-ink-muted); }
.tp-bell-panel { width: 360px; max-width: calc(100vw - 32px); max-height: 440px; overflow-y: auto; }
.tp-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--tp-border); }
.tp-bell-title { font-weight: 600; font-size: 15px; }
.tp-bell-list { list-style: none; margin: 0; padding: 0; }
.tp-bell-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--tp-border); background: var(--tp-surface); font: inherit; cursor: pointer; color: var(--tp-ink); }
.tp-bell-item:hover { background: var(--tp-ground); }
.tp-bell-unread { background: var(--tp-brand-tint); }
.tp-bell-item-title { font-size: 14px; font-weight: 600; }
.tp-bell-item-body { font-size: 13px; color: var(--tp-ink-nav); }
.tp-bell-item-time { font-size: 12px; color: var(--tp-ink-muted); }
.tp-bell-empty { padding: 16px 14px; margin: 0; font-size: 14px; color: var(--tp-ink-muted); }
.tp-bell-item:focus-visible, .tp-search-opt:focus-visible { outline: 2px solid var(--tp-focus); outline-offset: -2px; }
.tp-user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.tp-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--tp-brand-tint); color: var(--tp-brand); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tp-dev-switch { height: 32px; border: 1px dashed var(--tp-warn); border-radius: var(--tp-radius-control); background: var(--tp-warn-bg); color: var(--tp-warn); font: inherit; font-size: 12.5px; padding: 0 8px; }

.tp-content { padding: var(--tp-space-6); width: 100%; max-width: calc(var(--tp-content-max) + 2 * var(--tp-space-6)); margin: 0 auto; }

/* Collapse to 64px icon rail below 1280px */
@media (max-width: 1280px) {
    .tp-nav { width: var(--tp-nav-collapsed); flex-basis: var(--tp-nav-collapsed); }
    .tp-brand-name, .tp-brand-sub, .tp-nav-text, .tp-nav-foot, .tp-nav-section { display: none; }
    .tp-brand { padding: 13px 15px; }
    .tp-nav-link { justify-content: center; padding: 10px 0; }
    .tp-nav-icon { display: inline; }
    .tp-search { width: 180px; }
}
/* Phone width: the nav rail becomes an overlay opened by the hamburger in the top bar; the top
   bar wraps instead of overflowing. */
@media (max-width: 720px) {
    .tp-nav {
        position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(280px, 85vw); flex-basis: auto; z-index: 40;
        /* Closing: hidden only once the slide-out ends (visibility waits .2s). */
        transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
        box-shadow: 0 0 24px rgba(15, 23, 42, .25);
    }
    /* Opening: visible at once, so the first link can take focus as the overlay opens (#19560: a visibility transition
       left it hidden at that moment and focus fell to the page body). */
    .tp-nav.tp-nav-open { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
    .tp-nav .tp-brand-name, .tp-nav .tp-brand-sub, .tp-nav .tp-nav-text, .tp-nav .tp-nav-foot, .tp-nav .tp-nav-section { display: revert; }
    .tp-nav .tp-brand { padding: 18px 20px 16px; }
    .tp-nav .tp-nav-link { justify-content: flex-start; padding: 12px; min-height: 44px; }
    .tp-nav .tp-nav-icon { display: inline-block; }
    .tp-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 30; border: 0; padding: 0; background: rgba(15, 23, 42, .45); cursor: default; }
    .tp-nav-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
    .tp-content { padding: 16px; }
    .tp-topbar { padding: 8px 16px; }
    .tp-topbar-scope { flex: 1 1 0; min-width: 0; white-space: normal; }
    .tp-topbar-spacer { display: none; }
    .tp-topbar-actions { flex: 1 1 100%; justify-content: flex-end; }
    .tp-user-chip > span:not(.tp-avatar) { display: none; }
    .tp-dev-switch { max-width: 160px; }
    .tp-scope { flex: 1 1 100%; }
    .tp-scope .tp-scope-select { flex: 1; max-width: none; }
    .tp-search-wrap { flex: 1 1 140px; }
    .tp-search { width: 100%; }
    .tp-search-list { width: auto; right: 0; }
    .tp-bell-panel { position: fixed; top: 64px; right: 16px; left: 16px; width: auto; max-width: none; }
    .tp-page-header { gap: 12px; }
    .tp-pagination { flex-wrap: wrap; }
    .tp-tabs { overflow-x: auto; }
}

/* ---------- Page header ---------- */
.tp-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 var(--tp-space-5); flex-wrap: wrap; }
.tp-page-title { font-size: var(--tp-fs-display); font-weight: var(--tp-fw-display); letter-spacing: -0.01em; }
.tp-page-sub { color: var(--tp-ink-muted); font-size: 16px; margin-top: 6px; }
.tp-page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tp-breadcrumb { font-size: 14px; color: var(--tp-ink-muted); }

/* ---------- Grid ---------- */
.tp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--tp-gutter); }
.tp-col-3 { grid-column: span 3; } .tp-col-4 { grid-column: span 4; } .tp-col-5 { grid-column: span 5; }
.tp-col-6 { grid-column: span 6; } .tp-col-7 { grid-column: span 7; } .tp-col-8 { grid-column: span 8; }
.tp-col-9 { grid-column: span 9; } .tp-col-12 { grid-column: span 12; }
.tp-stack { display: flex; flex-direction: column; gap: var(--tp-gutter); }
.tp-row { display: flex; gap: 12px; align-items: center; }
.tp-wrap { flex-wrap: wrap; }
.tp-between { justify-content: space-between; }
.tp-mt { margin-top: var(--tp-space-4); }
@media (max-width: 1100px) {
    .tp-col-3, .tp-col-4, .tp-col-5, .tp-col-6, .tp-col-7, .tp-col-8, .tp-col-9 { grid-column: span 12; }
}

/* ---------- Card ---------- */
.tp-card { background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius-card); box-shadow: var(--tp-shadow-card); padding: var(--tp-space-6) var(--tp-space-6); min-width: 0; }
.tp-card-flush { padding: 0; }
.tp-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--tp-space-4); }
.tp-card-sub { color: var(--tp-ink-muted); font-size: 14px; margin-top: -8px; margin-bottom: 12px; }
.tp-label { font-size: var(--tp-fs-label); font-weight: var(--tp-fw-label); letter-spacing: .08em; text-transform: uppercase; color: var(--tp-ink-muted); }
.tp-h2 { font-size: var(--tp-fs-h2); font-weight: var(--tp-fw-h2); }
.tp-h1 { font-size: var(--tp-fs-h1); font-weight: var(--tp-fw-h1); }
.tp-meta { font-size: var(--tp-fs-meta); color: var(--tp-ink-muted); }
.tp-muted { color: var(--tp-ink-muted); }
.tp-item { border: 1px solid var(--tp-border); border-radius: var(--tp-radius-card); padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.tp-item + .tp-item { margin-top: 12px; }
.tp-item-body { flex: 1; min-width: 0; }
.tp-item-title { font-size: 17px; font-weight: 600; color: var(--tp-brand); }
.tp-divider { border: 0; border-top: 1px solid var(--tp-border); margin: 14px 0; }
.tp-list-plain { list-style: none; margin: 0; padding: 0; }
.tp-list-plain > li { padding: 12px 0; border-bottom: 1px solid var(--tp-border); }
.tp-list-plain > li:last-child { border-bottom: 0; }

/* ---------- Metric tile ---------- */
.tp-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--tp-gutter); margin-bottom: var(--tp-gutter); }
.tp-metric { background: var(--tp-surface); border: 1px solid var(--tp-border); border-left: 3px solid var(--tp-border); border-radius: var(--tp-radius-card); padding: 18px 20px; box-shadow: var(--tp-shadow-card); }
.tp-metric-value { font-size: var(--tp-fs-metric); font-weight: var(--tp-fw-metric); line-height: 1.15; margin-top: 6px; }
.tp-metric-note { font-size: var(--tp-fs-meta); color: var(--tp-ink-muted); margin-top: 2px; }
.tp-accent-brand { border-left-color: var(--tp-brand); } .tp-accent-brand .tp-metric-value { color: var(--tp-brand); }
.tp-accent-pass { border-left-color: var(--tp-pass); } .tp-accent-pass .tp-metric-value { color: var(--tp-pass); }
.tp-accent-warn { border-left-color: var(--tp-warn); } .tp-accent-warn .tp-metric-value { color: var(--tp-warn); }
.tp-accent-fail { border-left-color: var(--tp-fail); } .tp-accent-fail .tp-metric-value { color: var(--tp-fail); }
.tp-accent-neutral { border-left-color: var(--tp-ink-faint); } .tp-accent-neutral .tp-metric-value { color: var(--tp-neutral); }
.tp-accent-ink .tp-metric-value { color: var(--tp-ink); }

/* ---------- Buttons ---------- */
.tp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
    border-radius: var(--tp-radius-control); font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
    text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s;
}
.tp-btn-primary { background: var(--tp-brand); color: #fff !important; }
.tp-btn-primary:hover:not(:disabled) { background: var(--tp-brand-hover); }
.tp-btn-secondary { background: var(--tp-surface); color: var(--tp-ink) !important; border-color: var(--tp-border-input); }
.tp-btn-secondary:hover:not(:disabled) { background: var(--tp-ground); }
.tp-btn-ghost { background: transparent; color: var(--tp-brand) !important; }
.tp-btn-ghost:hover:not(:disabled) { background: var(--tp-brand-tint); }
.tp-btn-danger { background: var(--tp-surface); color: var(--tp-fail) !important; border-color: var(--tp-fail); }
.tp-btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.tp-btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.tp-btn-block { width: 100%; }
.tp-btn:disabled { opacity: .5; cursor: not-allowed; }
.tp-link-btn { background: none; border: 0; padding: 0; color: var(--tp-brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* ---------- Status pill ---------- */
.tp-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--tp-radius-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tp-pill-pass { color: var(--tp-pass); background: var(--tp-pass-bg); }
.tp-pill-warn { color: var(--tp-warn); background: var(--tp-warn-bg); }
.tp-pill-fail { color: var(--tp-fail); background: var(--tp-fail-bg); }
.tp-pill-neutral { color: var(--tp-neutral); background: var(--tp-neutral-bg); }
.tp-pill-info { color: var(--tp-info); background: var(--tp-info-bg); }
.tp-pill-hidden { color: var(--tp-hidden-ink); background: var(--tp-warn-bg); }

/* ---------- Chips ---------- */
.tp-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-control); font-size: 12.5px; color: var(--tp-ink-nav); background: var(--tp-surface); }
.tp-chip-version { background: var(--tp-brand-tint); border-color: transparent; color: var(--tp-brand); font-weight: 600; }
.tp-chip-source::before { content: "\1F4C4"; font-size: 11px; }
.tp-chip-removable { border-color: var(--tp-hidden-border); background: var(--tp-surface); height: 34px; border-radius: var(--tp-radius-pill); padding: 0 14px; font-size: 14px; }
.tp-chip-add { border-style: dashed; border-color: var(--tp-hidden-border); color: var(--tp-hidden-ink); background: transparent; cursor: pointer; height: 34px; border-radius: var(--tp-radius-pill); padding: 0 14px; font: inherit; font-size: 14px; }
.tp-chip-x { background: none; border: 0; cursor: pointer; color: var(--tp-hidden-ink); font-size: 15px; padding: 0 0 0 4px; }

/* ---------- Forms ---------- */
.tp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tp-field-label { font-size: 14px; font-weight: 600; color: var(--tp-ink); }
.tp-field-hint { font-size: 12.5px; color: var(--tp-ink-muted); font-weight: 400; }
.tp-input, .tp-select, .tp-textarea {
    height: 40px; border: 1px solid var(--tp-border-input); border-radius: var(--tp-radius-control); padding: 0 12px;
    font: inherit; font-size: 15px; color: var(--tp-ink); background: var(--tp-surface); width: 100%;
}
.tp-textarea { height: auto; min-height: 100px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.tp-input:focus, .tp-select:focus, .tp-textarea:focus { outline: 2px solid var(--tp-focus); outline-offset: 1px; border-color: var(--tp-brand); }

/* ---------- Visible keyboard focus (brand-coloured, keyboard-only via :focus-visible) ---------- */
.tp-btn:focus-visible, .tp-tab:focus-visible, .tp-nav-link:focus-visible, .tp-filter-chip:focus-visible,
.tp-page-btn:focus-visible, .tp-link-btn:focus-visible, .tp-icon-btn:focus-visible, .tp-chip-add:focus-visible,
.tp-chip-x:focus-visible, .tp-nav-toggle:focus-visible, .tp-tabpanel:focus-visible, .tp a:focus-visible,
.tp-input:focus-visible, .tp-select:focus-visible, .tp-textarea:focus-visible, .tp-checkbox input:focus-visible,
.tp-dev-switch:focus-visible, .tp-search:focus-visible {
    outline: 2px solid var(--tp-focus); outline-offset: 2px;
}
.tp-nav-link.active:focus-visible, .tp-btn-primary:focus-visible { outline-color: var(--tp-focus); box-shadow: var(--tp-focus-ring); }
.tp-stage-root :focus-visible { outline-color: var(--tp-stage-ink); }
.tp-form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tp-checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.tp-checkbox input { width: 16px; height: 16px; accent-color: var(--tp-brand); }

/* ---------- Tabs & filters ---------- */
.tp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--tp-border); }
.tp-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; font: inherit; font-size: 15px; font-weight: 500; color: var(--tp-ink-muted); cursor: pointer; margin-bottom: -1px; }
.tp-tab.active { color: var(--tp-brand); border-bottom-color: var(--tp-brand); font-weight: 600; }
.tp-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tp-filters .tp-select, .tp-filters .tp-input { width: auto; min-width: 150px; height: 36px; font-size: 14px; }
.tp-filter-chip { height: 32px; padding: 0 12px; border-radius: var(--tp-radius-pill); border: 1px solid var(--tp-border); background: var(--tp-surface); font: inherit; font-size: 13.5px; cursor: pointer; color: var(--tp-ink-nav); }
.tp-filter-chip.active { background: var(--tp-brand-tint); border-color: transparent; color: var(--tp-brand); font-weight: 600; }

/* ---------- Pagination ---------- */
.tp-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; font-size: 13.5px; color: var(--tp-ink-muted); }
.tp-pagination-pages { display: flex; gap: 4px; }
.tp-page-btn { min-width: 32px; height: 32px; border: 1px solid var(--tp-border); border-radius: var(--tp-radius-control); background: var(--tp-surface); cursor: pointer; font: inherit; font-size: 13.5px; }
.tp-page-btn.active { background: var(--tp-brand); color: #fff; border-color: var(--tp-brand); }
.tp-page-btn:disabled { opacity: .4; cursor: default; }

/* ---------- Table ---------- */
.tp-table-wrap { width: 100%; overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-table th { text-align: left; font-size: var(--tp-fs-label); font-weight: var(--tp-fw-label); letter-spacing: .08em; text-transform: uppercase; color: var(--tp-ink-muted); padding: 10px 12px; border-bottom: 1px solid var(--tp-border); white-space: nowrap; }
.tp-table td { padding: 14px 12px; border-bottom: 1px solid var(--tp-border); vertical-align: middle; }
.tp-table tr:last-child td { border-bottom: 0; }
.tp-table .tp-num { text-align: right; }
.tp-table tbody tr.tp-clickable { cursor: pointer; }
.tp-table tbody tr.tp-clickable:hover td { background: #FAFAFB; }

/* ---------- Progress & competency ---------- */
.tp-progress { height: 8px; background: var(--tp-neutral-bg); border-radius: var(--tp-radius-pill); overflow: hidden; }
.tp-progress-fill { height: 100%; border-radius: var(--tp-radius-pill); background: var(--tp-brand); }
.tp-progress-pass .tp-progress-fill { background: var(--tp-pass); }
.tp-progress-warn .tp-progress-fill { background: var(--tp-warn); }
.tp-progress-fail .tp-progress-fill { background: var(--tp-fail); }
.tp-comp { display: flex; flex-direction: column; gap: 14px; }
.tp-comp-row { display: flex; flex-direction: column; gap: 6px; }
.tp-comp-head { display: flex; justify-content: space-between; font-size: 15px; }
.tp-comp-delta { font-size: 12.5px; margin-left: 6px; }
.tp-comp-delta.up { color: var(--tp-pass); } .tp-comp-delta.down { color: var(--tp-fail); }
.tp-comp-team { position: relative; }
.tp-comp-marker { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--tp-ink); }

/* ---------- Score dial ---------- */
.tp-dial { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.tp-dial svg { transform: rotate(-90deg); }
.tp-dial-center { position: absolute; display: flex; flex-direction: column; align-items: center; }
.tp-dial-value { font-size: 34px; font-weight: 700; line-height: 1; }
.tp-dial-caption { font-size: 12.5px; color: var(--tp-ink-muted); margin-top: 4px; }

/* ---------- Transcript line ---------- */
.tp-transcript { display: flex; flex-direction: column; gap: 14px; }
.tp-tline { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 12px; border-radius: var(--tp-radius-control); }
.tp-tline-who { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tp-tline-who.customer { color: var(--tp-warn); } .tp-tline-who.employee { color: var(--tp-brand); }
.tp-tline-time { font-size: 12px; color: var(--tp-ink-muted); display: block; font-weight: 500; letter-spacing: 0; }
.tp-tline-text { font-size: 15px; }
.tp-tline.pass { background: var(--tp-pass-bg); } .tp-tline.fail { background: var(--tp-fail-bg); } .tp-tline.warn { background: var(--tp-warn-bg); }
.tp-tline.highlight { outline: 2px solid var(--tp-brand); }
.tp-tline-note { grid-column: 2; font-size: 13px; font-weight: 600; margin-top: 4px; }
.tp-tline.pass .tp-tline-note { color: var(--tp-pass); } .tp-tline.fail .tp-tline-note { color: var(--tp-fail); } .tp-tline.warn .tp-tline-note { color: var(--tp-warn); }

/* ---------- Notices ---------- */
.tp-notice { border-radius: var(--tp-radius-card); padding: 14px 16px; font-size: 14px; border: 1px solid; }
.tp-notice-title { font-weight: 700; }
.tp-notice-info { background: var(--tp-info-bg); border-color: #C7D2FE; color: #3730A3; }
.tp-notice-warn { background: var(--tp-hidden-bg); border-color: var(--tp-hidden-border); color: var(--tp-hidden-ink); }
.tp-notice-fail { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.tp-notice-pass { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.tp-notice-decision { background: var(--tp-hidden-bg); border-color: var(--tp-hidden-border); color: var(--tp-hidden-ink); }
.tp-notice-decision::before { content: "[DECISION] "; font-weight: 700; }

/* Hidden / author-only block: warm tint + lock pill */
.tp-hidden-block { background: var(--tp-hidden-bg); border: 1px solid var(--tp-hidden-border); border-radius: var(--tp-radius-card); padding: var(--tp-space-6); }
.tp-hidden-block .tp-label { color: var(--tp-hidden-ink); }
.tp-hidden-note { color: var(--tp-hidden-ink); font-size: 14px; margin-top: 14px; }

/* ---------- Empty state ---------- */
.tp-empty { text-align: center; padding: 40px 20px; color: var(--tp-ink-muted); }
.tp-empty-title { font-size: 16px; font-weight: 600; color: var(--tp-ink); margin-bottom: 6px; }

/* ---------- Checklist / lifecycle ---------- */
.tp-check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; }
.tp-check-icon { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 22px; }
.tp-check.done .tp-check-icon { background: var(--tp-pass-bg); color: var(--tp-pass); }
.tp-check.todo .tp-check-icon { background: var(--tp-warn-bg); color: var(--tp-warn); }
.tp-check.todo { color: var(--tp-warn); }

/* ---------- Loading ---------- */
.tp-loading { padding: 60px; text-align: center; color: var(--tp-ink-muted); }
.tp-helper { font-size: var(--tp-fs-meta); color: var(--tp-ink-muted); margin-top: 6px; }
.tp-error { padding: 16px; }

/* ---------- Stage (full-bleed roleplay) ---------- */
.tp-stage-root { --tp-ink-muted: var(--tp-stage-muted); min-height: 100vh; background: var(--tp-stage); color: var(--tp-stage-ink); display: flex; flex-direction: column; }

/* ---------- Legacy global overrides ----------
   app.css / responsive.css style bare elements globally (44px buttons, !important h1/h2 sizes
   under 1199px, dark scrollbars). Neutralise them inside the new shell only. */
.tp button { min-height: 0; }
.tp h1.tp-page-title { font-size: var(--tp-fs-display) !important; }
.tp h1:not(.tp-page-title) { font-size: var(--tp-fs-h1) !important; }
.tp h2 { font-size: var(--tp-fs-h2) !important; }
.tp *::-webkit-scrollbar-track { background: var(--tp-ground); }
.tp *::-webkit-scrollbar-thumb { background: #CBD5E1; border-color: var(--tp-ground); }
.tp-stage-root *::-webkit-scrollbar-track { background: var(--tp-stage); }
.tp-stage-root *::-webkit-scrollbar-thumb { background: var(--tp-stage-panel); border-color: var(--tp-stage); }

/* Generated from the inline style attributes that used to sit on the /app pages (PR 3533 review fix UI-2).
   !important keeps the precedence the inline style had. Add new spacing to the page .razor.css or the tokens instead. */
.tp-u-align-items-flex-start { align-items:flex-start !important; }
.tp-u-align-items-flex-start-flex-direction-column { align-items:flex-start !important; flex-direction:column !important; }
.tp-u-align-items-flex-start-gap-20px { align-items:flex-start !important; gap:20px !important; }
.tp-u-background-var-tp-ground-padding-12px-16-ce39f7 { background:var(--tp-ground) !important; padding:12px 16px !important; border-bottom:1px solid var(--tp-border) !important; }
.tp-u-border-0-padding-0-background-transparen-384113 { border:0 !important; padding:0 !important; background:transparent !important; max-width:520px !important; width:calc(100% - 32px) !important; max-height:90vh !important; }
.tp-u-border-0-padding-0-margin-0-min-width-0 { border:0 !important; padding:0 !important; margin:0 !important; min-width:0 !important; }
.tp-u-border-1px-solid-var-tp-border-border-ra-6396a3 { border:1px solid var(--tp-border) !important; border-radius:var(--tp-radius-card) !important; overflow:hidden !important; }
.tp-u-color-var-tp-brand-margin-bottom-6px { color:var(--tp-brand) !important; margin-bottom:6px !important; }
.tp-u-color-var-tp-fail-font-weight-600 { color:var(--tp-fail) !important; font-weight:600 !important; }
.tp-u-color-var-tp-hidden-ink-margin-bottom-8px { color:var(--tp-hidden-ink) !important; margin-bottom:8px !important; }
.tp-u-color-var-tp-ink { color:var(--tp-ink) !important; }
.tp-u-display-block-margin-bottom-10px { display:block !important; margin-bottom:10px !important; }
.tp-u-display-block-padding-14px-16px { display:block !important; padding:14px 16px !important; }
.tp-u-flex-1 { flex:1 !important; }
.tp-u-flex-1-min-width-0-display-flex-flex-dir-af8931 { flex:1 !important; min-width:0 !important; display:flex !important; flex-direction:column !important; gap:6px !important; }
.tp-u-font-size-14-5px { font-size:14.5px !important; }
.tp-u-font-size-14px-margin-top-6px { font-size:14px !important; margin-top:6px !important; }
.tp-u-font-size-15-5px-margin-bottom-10px { font-size:15.5px !important; margin-bottom:10px !important; }
.tp-u-font-size-15px { font-size:15px !important; }
.tp-u-font-size-16px { font-size:16px !important; }
.tp-u-font-size-17px-font-weight-600 { font-size:17px !important; font-weight:600 !important; }
.tp-u-font-size-18px { font-size:18px !important; }
.tp-u-font-size-30px { font-size:30px !important; }
.tp-u-font-size-34px-font-weight-700 { font-size:34px !important; font-weight:700 !important; }
.tp-u-font-weight-600 { font-weight:600 !important; }
.tp-u-font-weight-600-font-size-16px { font-weight:600 !important; font-size:16px !important; }
.tp-u-font-weight-700 { font-weight:700 !important; }
.tp-u-gap-10px { gap:10px !important; }
.tp-u-gap-12px { gap:12px !important; }
.tp-u-gap-14px { gap:14px !important; }
.tp-u-gap-16px-margin-top-16px { gap:16px !important; margin-top:16px !important; }
.tp-u-gap-16px-margin-top-4px { gap:16px !important; margin-top:4px !important; }
.tp-u-gap-24px { gap:24px !important; }
.tp-u-gap-28px { gap:28px !important; }
.tp-u-gap-40px-margin-22px-0 { gap:40px !important; margin:22px 0 !important; }
.tp-u-gap-4px { gap:4px !important; }
.tp-u-gap-8px { gap:8px !important; }
.tp-u-gap-8px-margin-12px-0 { gap:8px !important; margin:12px 0 !important; }
.tp-u-gap-8px-margin-bottom-12px { gap:8px !important; margin-bottom:12px !important; }
.tp-u-gap-8px-margin-bottom-8px { gap:8px !important; margin-bottom:8px !important; }
.tp-u-gap-8px-margin-top-6px { gap:8px !important; margin-top:6px !important; }
.tp-u-grid-column-span-12 { grid-column:span 12 !important; }
.tp-u-grid-column-span-2 { grid-column:span 2 !important; }
.tp-u-grid-column-span-3 { grid-column:span 3 !important; }
.tp-u-grid-column-span-4 { grid-column:span 4 !important; }
.tp-u-grid-column-span-4-justify-content-flex--04b134 { grid-column:span 4 !important; justify-content:flex-end !important; align-items:flex-start !important; }
.tp-u-grid-column-span-5 { grid-column:span 5 !important; }
.tp-u-grid-column-span-6 { grid-column:span 6 !important; }
.tp-u-grid-column-span-7 { grid-column:span 7 !important; }
.tp-u-grid-column-span-8 { grid-column:span 8 !important; }
.tp-u-grid-template-columns-90px-1fr { grid-template-columns:90px 1fr !important; }
.tp-u-grid-template-columns-repeat-auto-fit-mi-1cc8f3 { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)) !important; }
.tp-u-height-34px-font-size-14px { height:34px !important; font-size:14px !important; }
.tp-u-margin-0 { margin:0 !important; }
.tp-u-margin-0-0-12px { margin:0 0 12px !important; }
.tp-u-margin-12px-0 { margin:12px 0 !important; }
.tp-u-margin-4px-0-0 { margin:4px 0 0 !important; }
.tp-u-margin-4px-0-0-padding-left-18px { margin:4px 0 0 !important; padding-left:18px !important; }
.tp-u-margin-4px-0-12px { margin:-4px 0 12px !important; }
.tp-u-margin-6px-0-14px { margin:6px 0 14px !important; }
.tp-u-margin-8px-0-16px { margin:-8px 0 16px !important; }
.tp-u-margin-bottom-0 { margin-bottom:0 !important; }
.tp-u-margin-bottom-10px { margin-bottom:10px !important; }
.tp-u-margin-bottom-14px { margin-bottom:14px !important; }
.tp-u-margin-bottom-16px { margin-bottom:16px !important; }
.tp-u-margin-bottom-4px { margin-bottom:4px !important; }
.tp-u-margin-bottom-8px { margin-bottom:8px !important; }
.tp-u-margin-bottom-var-tp-gutter { margin-bottom:var(--tp-gutter) !important; }
.tp-u-margin-left-4px-height-14px-border-left--fd8e6f { margin-left:4px !important; height:14px !important; border-left:1px dotted var(--tp-border-input) !important; }
.tp-u-margin-left-auto { margin-left:auto !important; }
.tp-u-margin-top-10px { margin-top:10px !important; }
.tp-u-margin-top-10px-font-size-16px { margin-top:10px !important; font-size:16px !important; }
.tp-u-margin-top-10px-max-width-520px { margin-top:10px !important; max-width:520px !important; }
.tp-u-margin-top-16px { margin-top:16px !important; }
.tp-u-margin-top-20px { margin-top:20px !important; }
.tp-u-margin-top-4px { margin-top:4px !important; }
.tp-u-margin-top-8px { margin-top:8px !important; }
.tp-u-max-height-90vh-overflow-auto { max-height:90vh !important; overflow:auto !important; }
.tp-u-min-height-150px { min-height:150px !important; }
.tp-u-min-height-200px-max-height-420px-overfl-2f000e { min-height:200px !important; max-height:420px !important; overflow-y:auto !important; display:flex !important; flex-direction:column !important; gap:10px !important; }
.tp-u-min-height-70px { min-height:70px !important; }
.tp-u-min-width-0 { min-width:0 !important; }
.tp-u-min-width-200px { min-width:200px !important; }
.tp-u-padding-6px-0-border-0 { padding:6px 0 !important; border:0 !important; }
.tp-u-padding-8px-0 { padding:8px 0 !important; }
.tp-u-padding-8px-0-align-items-flex-start { padding:8px 0 !important; align-items:flex-start !important; }
.tp-u-padding-8px-0-border-bottom-1px-solid-va-c7c554 { padding:8px 0 !important; border-bottom:1px solid var(--tp-border) !important; }
.tp-u-padding-8px-12px { padding:8px 12px !important; }
.tp-u-padding-8px-16px { padding:8px 16px !important; }
.tp-u-padding-left-4px { padding-left:4px !important; }
.tp-u-position-absolute-left-9999px { position:absolute !important; left:-9999px !important; }
.tp-u-text-decoration-none { text-decoration:none !important; }
.tp-u-text-decoration-none-font-weight-500-tex-ddf849 { text-decoration:none !important; font-weight:500 !important; text-align:left !important; }
.tp-u-white-space-nowrap { white-space:nowrap !important; }
.tp-u-width-100 { width:100% !important; }
.tp-u-width-180px-height-36px { width:180px !important; height:36px !important; }
.tp-u-width-220px-height-34px-border-radius-999px { width:220px !important; height:34px !important; border-radius:999px !important; }
.tp-u-width-72px { width:72px !important; }
.tp-u-width-auto-height-34px-font-size-14px { width:auto !important; height:34px !important; font-size:14px !important; }
.tp-u-width-auto-height-36px { width:auto !important; height:36px !important; }
.tp-u-link-btn-inherit { text-decoration:none !important; color:inherit !important; text-transform:inherit !important; letter-spacing:inherit !important; font-size:inherit !important; }
.tp-mb { margin-bottom: var(--tp-gutter); }
