/* Application shell: shared by every page and permission-based navigation. */
html.tc-app { font-size: calc(17px * var(--app-text-scale, 1)); }
html.tc-app {
    --app-sidebar-width: 238px;
    --app-topbar-height: 64px;
    --app-sidebar-bg: #202232;
    --app-sidebar-text: #c7cadb;
    --app-accent: var(--tc-interactive-ink, var(--tc-text-main));
    --app-canvas: var(--tc-bg-main, #f5f6fa);
}
html.tc-app body {
    padding: var(--app-topbar-height) 0 0 var(--app-sidebar-width);
    min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--app-canvas) !important;
    font-size: calc(16px * var(--app-text-scale, 1)); line-height: 1.55;
}
html.tc-app body::before, html.tc-app body::after { display: none !important; }
html.tc-app body.home-body { padding-left: 0; }
html.tc-app body.home-body .app-topbar { left: 0; }
html.tc-app body.home-body > main { padding-top: 24px; }
html.tc-app body > #js-preloader { display: none !important; }
html.tc-app body > main { flex: 1 0 auto; width: 100%; min-height: calc(100dvh - 118px); margin: 0; padding: 32px 28px 40px; background: none; }
html.tc-app body > main > :is(.container, .container-fluid) { width: 100%; max-width: 1600px; padding: 0 !important; margin-inline: auto; }
html.tc-app body > main :is(.admin-heading h1, .account-heading h1, .projects-header h1, .classes-heading h1, .about-heading h1) { font-size: 1.8rem; font-weight: 500; line-height: 1.25; letter-spacing: -.035em; }
html.tc-app body > main :is(.admin-heading, .account-heading, .projects-header, .classes-heading, .about-heading) { margin: 0 0 26px; }
html.tc-app body > main :is(.admin-heading p, .account-heading p, .projects-header p, .classes-heading p) { max-width: 760px; color: var(--tc-text-muted); font-size: .94rem; }
html.tc-app :is(.app-topbar, .app-sidebar, .app-command-dialog, .app-footer) { font-family: var(--tc-material-font); }
.app-skip-link { position: fixed; top: -100px; left: 16px; z-index: 3000; padding: 12px; background: var(--tc-panel-bg-solid); color: var(--tc-text-main); }
.app-skip-link:focus { top: 10px; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--app-sidebar-width); z-index: 1050; display: flex; flex-direction: column; padding: 25px 14px 12px; background: var(--app-sidebar-bg); color: var(--app-sidebar-text); border-right: 1px solid #ffffff0b; }
.app-brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 28px; color: #fff !important; text-decoration: none; white-space: nowrap; }
.app-brand-symbol { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #b7adfa; color: #28243c; font-size: calc(18px * var(--app-text-scale, 1)); flex-shrink: 0; }
.app-brand-copy strong { display: block; font-size: calc(26px * var(--app-text-scale, 1)); line-height: 1; font-weight: 500; letter-spacing: -.04em; color: #f4f2ff; }
.app-brand-copy strong span { color: #aca0e5; }
.app-brand-copy small { display: block; color: #999eb6; font-size: calc(10px * var(--app-text-scale, 1)); letter-spacing: .07em; margin-top: 6px; }
.app-nav-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; margin-bottom: 26px; border: 1px solid #ffffff16; border-radius: 7px; background: #ffffff06; color: #abb0c6; font: inherit; font-size: calc(13px * var(--app-text-scale, 1)); }
.app-nav-search kbd { margin-left: auto; padding: 2px 4px; background: #ffffff0a; color: #9da3ba; font: inherit; font-size: calc(10px * var(--app-text-scale, 1)); }
.app-navigation { min-height: 0; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: #50536a transparent; }
.app-nav-label { color: #81879f; font-size: calc(10px * var(--app-text-scale, 1)); text-transform: uppercase; letter-spacing: .12em; font-weight: 500; padding: 0 12px 10px; }
.app-sidebar .app-nav-link { display: flex; align-items: center; gap: 13px; width: 100%; padding: 10px 12px; margin: 3px 0; border: 0; border-radius: 7px; background: transparent; color: var(--app-sidebar-text); font: inherit; font-size: calc(14px * var(--app-text-scale, 1)); text-decoration: none; text-align: left; white-space: nowrap; }
.app-nav-link i { width: 18px; flex-shrink: 0; text-align: center; font-size: calc(15px * var(--app-text-scale, 1)); color: #949bb5; }
.app-sidebar .app-nav-link:hover { color: white; background: #ffffff08; }
.app-sidebar .app-nav-link.is-current { background: #b7adfa1f; color: #e3deff; }
.app-nav-link.is-current i { color: #bbb0ff; }
.app-recents-label { margin-top: 30px; }
.app-recent-projects .dropdown-item { font-size: calc(12px * var(--app-text-scale, 1)); padding: 8px 12px 8px 43px; color: #b2b8cf; overflow: hidden; text-overflow: ellipsis; border-radius: 6px; }
.app-recent-projects .dropdown-item:hover { background: #ffffff08; color: white; }
html.tc-app body #recentProjectsList .traceceni-recent-project-item:is(:hover,:active) { background: #ffffff12 !important; color: #fff !important; }
html.tc-app body #recentProjectsList .traceceni-recent-project-item:focus-visible { background: #ffffff12 !important; color: #fff !important; outline: 2px solid #b7adfa; outline-offset: -2px; }
.app-recent-projects :is(.dropdown-item-text, .app-nav-empty) { display: block; color: #858ca6 !important; font-size: calc(12px * var(--app-text-scale, 1)); padding: 0 12px; }
.app-sidebar-bottom { padding-top: 20px; }
.app-sidebar-signature { margin: 17px 10px 0; padding-top: 16px; border-top: 1px solid #ffffff0e; display: flex; align-items: center; gap: 7px; color: #7f88a1; font-size: calc(10px * var(--app-text-scale, 1)); white-space: nowrap; }
.app-sidebar-signature small { margin-left: auto; font-size: calc(10px * var(--app-text-scale, 1)); }
.app-status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #69b59a; flex-shrink: 0; }
.app-topbar { position: fixed; z-index: 1040; top: 0; right: 0; left: var(--app-sidebar-width); height: var(--app-topbar-height); padding: 0 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--tc-panel-bg-solid); border-bottom: 1px solid var(--tc-panel-border); }
.app-topbar-location, .app-topbar-tools { display: flex; align-items: center; gap: 13px; min-width: 0; }
.app-topbar-tools { gap: 5px; flex-shrink: 0; }
.app-breadcrumb-root, .app-breadcrumb-divider { font-size: calc(12px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
.app-breadcrumb-divider { font-size: calc(9px * var(--app-text-scale, 1)); opacity: .65; }
.app-current-page { color: var(--tc-text-main); font-size: calc(13px * var(--app-text-scale, 1)); white-space: nowrap; }
.app-project-divider, .app-tool-divider { height: 20px; width: 1px; background: var(--tc-panel-border); flex-shrink: 0; }
.app-tool-divider { margin-inline: 7px; }
.app-project-name { position: relative; min-width: 80px; }
html.tc-app .app-project-name input { width: clamp(100px, 15vw, 230px); height: 33px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--tc-text-main); font: inherit; font-size: calc(13px * var(--app-text-scale, 1)); padding: 3px 26px 3px 8px; }
html.tc-app .app-project-name input:hover { border-color: var(--tc-panel-border); }
.app-project-name i { position: absolute; right: 8px; top: 10px; pointer-events: none; color: var(--tc-text-muted); font-size: calc(12px * var(--app-text-scale, 1)); }
.app-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--tc-text-muted); font-size: calc(15px * var(--app-text-scale, 1)); flex-shrink: 0; }
.app-icon-button:hover { background: var(--tc-panel-bg-soft); color: var(--tc-text-main); }
.app-sign-in { display: flex; align-items: center; gap: 10px; padding: 8px 9px; color: var(--tc-text-main); font-size: calc(13px * var(--app-text-scale, 1)); text-decoration: none; white-space: nowrap; }
.app-sign-in i { font-size: calc(11px * var(--app-text-scale, 1)); }
.app-profile-button { border: 0; padding: 0; border-radius: 50%; background: transparent; }
.app-user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tc-panel-bg-soft); color: var(--app-accent); font-size: calc(14px * var(--app-text-scale, 1)); }
.app-profile-button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.app-mode-badge { display: flex; gap: 6px; align-items: center; color: var(--tc-text-muted); font-size: calc(11px * var(--app-text-scale, 1)); padding-right: 8px; }
.app-mode-badge .app-status-dot { background: #d0a055; }
.app-topbar .dropdown-menu { border: 1px solid var(--tc-panel-border); border-radius: 9px; padding: 6px; box-shadow: 0 8px 28px #00000018; background: var(--tc-panel-bg-solid); }
html.tc-app .app-topbar .dropdown-menu.show { position: fixed !important; inset: auto !important; top: var(--app-dropdown-top, 72px) !important; left: var(--app-dropdown-left, 8px) !important; right: auto !important; bottom: auto !important; transform: none !important; z-index: 2000; }
.app-topbar .dropdown-item { font-size: calc(13px * var(--app-text-scale, 1)); padding: 9px 10px; border-radius: 5px; color: var(--tc-text-main); }
.app-topbar .dropdown-item:hover { background: var(--tc-panel-bg-soft); }
.app-menu-heading { padding: 8px 10px; font-size: calc(12px * var(--app-text-scale, 1)); font-weight: 500; color: var(--tc-text-main); }
.app-topbar .app-language-menu { width: 256px; }
.app-language-menu .traceceni-language-option { padding: 9px 10px; font-size: calc(14px * var(--app-text-scale, 1)); border-radius: 5px; }
.app-menu-note { font-size: calc(11px * var(--app-text-scale, 1)) !important; color: var(--tc-text-muted); line-height: 1.45 !important; padding: 10px; margin: 7px 0 0; border-top: 1px solid var(--tc-panel-border); }
.app-menu-identity { padding: 8px 12px; }
.app-menu-identity strong, .app-menu-identity small { display: block; font-size: calc(13px * var(--app-text-scale, 1)); }
.app-menu-identity small { font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
.guest-workspace-reminder { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 22px; padding:16px 18px; border:1px solid color-mix(in srgb,var(--tc-interactive-ink) 32%,var(--tc-panel-border)); border-left:4px solid var(--tc-interactive-ink); border-radius:12px; background:var(--tc-panel-bg-solid); color:var(--tc-text-main); }
.guest-workspace-reminder-copy { min-width:0; }
.guest-workspace-reminder-copy strong { display:block; font-size:.98rem; }
.guest-workspace-reminder-copy strong i { margin-right:7px; color:var(--tc-interactive-ink); }
.guest-workspace-reminder-copy p { margin:4px 0 0; color:var(--tc-text-muted); font-size:.85rem; }
.guest-workspace-reminder-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.guest-workspace-reminder-actions .btn { min-height:40px; }
.app-mobile-menu, .app-sidebar-scrim { display: none; }
/* The old floating language control is retired, including cached markup. */
html.tc-app :is(.traceceni-floating-language, .traceceni-floating-tools, .traceceni-floating-language-panel) { display: none !important; }
html.tc-app footer.app-footer { margin: 0; padding: 16px 28px; background: transparent !important; color: var(--tc-text-muted); border-top: 1px solid var(--tc-panel-border); border-radius: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: calc(11px * var(--app-text-scale, 1)); box-shadow: none; min-height: 54px; }
.app-footer-brand { display: flex; align-items: center; gap: 8px; }
.app-footer-brand strong { font-weight: 500; color: var(--tc-text-main); }
.app-footer a { color: var(--tc-text-muted); text-decoration: none; }
.app-footer a:hover { color: var(--tc-text-main); }
.app-footer-links { display: flex; gap: 14px; }
.app-command-dialog { width: min(580px, calc(100vw - 32px)); padding: 0; margin: 16vh auto auto; border: 1px solid var(--tc-panel-border); border-radius: 12px; color: var(--tc-text-main); background: var(--tc-panel-bg-solid); box-shadow: 0 24px 90px #0004; }
.app-command-dialog::backdrop { background: #10132266; backdrop-filter: blur(3px); }
.app-command-header { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--tc-panel-border); }
.app-command-header > i { color: var(--tc-text-muted); }
.app-command-header input { width: 100%; min-width: 0; border: 0; outline: 0; font: inherit; font-size: calc(15px * var(--app-text-scale, 1)); color: inherit; background: transparent; }
.app-command-results { padding: 8px; max-height: 50vh; overflow-y: auto; }
.app-command-result { display: flex; width: 100%; gap: 12px; align-items: center; padding: 12px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: calc(14px * var(--app-text-scale, 1)); text-align: left; }
.app-command-result:hover, .app-command-result:focus-visible { background: var(--tc-panel-bg-soft); outline: 2px solid var(--tc-focus-ring); }
.app-command-result i { width: 20px; color: var(--tc-text-muted); }
.app-command-result small { margin-left: auto; font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
.app-command-empty { padding: 24px; text-align: center; color: var(--tc-text-muted); font-size: calc(14px * var(--app-text-scale, 1)); }
.app-command-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); border-top: 1px solid var(--tc-panel-border); }
.app-command-footer kbd { background: var(--tc-panel-bg-soft); color: inherit; }
html.tc-app :is(button,a,input,select,textarea):focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; }
html.tc-app .app-sidebar :is(button,a):focus-visible { outline-color: #c5baff; }
/* Shared page surfaces and toolbar hierarchy. */
html.tc-app body .btn { border-radius: 6px; font-size: .87rem; font-weight: 400; box-shadow: none; letter-spacing: 0; text-transform: none; }
html.tc-app body .btn-sm { font-size: .8rem; }
html.tc-app body :is(.form-control,.form-select) { border-radius: 6px; font-size: .88rem; box-shadow: none; }
html.tc-app body :is(.principal-panel,.projects-panel,.account-panel,.admin-panel,.classes-panel,.class-card,.about-shell) { border: 1px solid var(--tc-panel-border); border-radius: 10px; background: var(--tc-panel-bg-solid); box-shadow: 0 2px 4px #00000003; padding: 22px; }
html.tc-app body :is(.principal-panel-title h2,.classes-panel-heading h2) { font-size: 1.1rem; font-weight: 500; letter-spacing: -.02em; }
html.tc-app body :is(.principal-panel-title p,.classes-panel-heading p) { font-size: .82rem; margin-top: 4px; }
html.tc-app body .principal-panel-title { margin-bottom: 19px; padding-bottom: 17px; }
html.tc-app body .table thead th { background: var(--tc-panel-bg-soft); font-weight: 500; font-size: .78rem; border-bottom: 1px solid var(--tc-panel-border); white-space: nowrap; }
html.tc-app body .table tbody td { font-size: .85rem; padding-block: 14px; }
.workspace-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.workspace-system-identity { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: min(42%, 34rem); min-width: 0; text-align: right; }
.workspace-system-label { color: var(--tc-text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.workspace-system-identity strong { color: var(--tc-text-main); font-size: clamp(.95rem, 1.5vw, 1.2rem); line-height: 1.3; overflow-wrap: anywhere; }
.workspace-page-heading h1 { font-size: 1.8rem; font-weight: 500; letter-spacing: -.035em; margin: 4px 0 7px; }
.workspace-page-heading p { font-size: .9rem; color: var(--tc-text-muted); margin: 0; }
.workspace-eyebrow { color: var(--tc-text-muted); text-transform: uppercase; letter-spacing: .13em; font-size: calc(10px * var(--app-text-scale, 1)); font-weight: 500; }
.workspace-live-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--tc-panel-border); background: var(--tc-panel-bg-solid); color: var(--tc-text-muted); border-radius: 5px; padding: 5px 10px; font-size: calc(11px * var(--app-text-scale, 1)); white-space: nowrap; }
html.tc-app body .principal-toolbar { margin: 0 0 22px; padding: 0; }
html.tc-app body .principal-action-buttons { gap: 9px; justify-content: flex-start; }
html.tc-app body .principal-action-buttons .traceceni-toolbar-help-anchor { flex: 0 1 auto; }
html.tc-app body .principal-action-buttons .principal-toolbar-button { min-height: 38px; height: auto; min-width: 0; width: auto; max-width: none; padding: 9px 27px 9px 14px; font-size: .82rem; border-radius: 6px; font-weight: 400; }
html.tc-app body .principal-project-tools { flex: 0 1 auto; min-width: 0; width: auto; }
html.tc-app body .principal-action-buttons .traceceni-toolbar-help-anchor:has([data-bs-target='#modalImport']) { order: -2; }
html.tc-app body .principal-action-buttons .traceceni-toolbar-help-anchor:has(#btnGenerateRelations) { order: -1; }
html.tc-app body #btnGenerateRelations:not(:disabled) { background: var(--tc-panel-bg-solid); border: 1px solid var(--tc-panel-border); color: var(--tc-text-main); }
html.tc-app body #agentSettingsCurrentSummary { order: 2; background: transparent; border: 0; padding: 0; font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
html.tc-app body .principal-action-group { gap: 11px; }
html.tc-app body #agentSettingsCurrentSummaryText { gap: 2px 13px; }
html.tc-app body .principal-toolbar > .row { gap: 0; }
html.tc-app body .principal-toolbar > .col-auto { width: 100%; }
html.tc-app body .principal-layout { gap: 18px; }
html.tc-app body .artifacts-panel-toggle { width: 30px; height: 30px; flex-basis: 30px; border: 0; background: var(--tc-panel-bg-soft); }
html.tc-app body .artifact-accordion-header { min-height: 48px; padding: 12px; border-radius: 6px; font-size: .85rem; }
html.tc-app body .accordion-imported-artifacts .accordion-item { border-radius: 6px; box-shadow: none; }
html.tc-app body .trace-matrix-empty-columns, html.tc-app body #traceMatrixBody > tr:only-child > td:only-child { padding-block: 48px !important; color: var(--tc-text-muted); font-size: .9rem; background: transparent; border: 0; }
html.tc-app body.principal-body #accordionImportedArtifacts :is(.accordion-item,.artifact-accordion-header) { border-radius: 6px !important; }
html.tc-app body.principal-body #accordionImportedArtifacts .artifact-accordion-header { display: grid; grid-template-columns: minmax(0,1fr) 27px 12px; padding: 11px 9px; gap: 5px; font-size: .8rem; }
html.tc-app body.principal-body #accordionImportedArtifacts .artifact-accordion-title { display: block; min-width: 0; font-weight: 400; font-size: .8rem; }
html.tc-app body.principal-body #accordionImportedArtifacts .btn-add-manual-artifact { width: 27px !important; height: 27px !important; min-height: 0; padding: 0 !important; margin: 0 !important; background: var(--tc-panel-bg-soft) !important; border: 1px solid var(--tc-panel-border); color: var(--app-accent) !important; flex-shrink: 0; }
html.tc-app body.principal-body #accordionImportedArtifacts .artifact-collapse-icon { font-size: calc(9px * var(--app-text-scale, 1)); }
html.tc-app body.principal-body #importedArtifactsContent .input-group :is(input,span,button) { border-radius: 5px; font-size: .79rem; }
html.tc-app body.principal-body #importedArtifactsContent .principal-label { font-size: .77rem; font-weight: 400; }
html.tc-app body.principal-body .trace-matrix-scroll-container { border-radius: 6px; box-shadow: none; background: transparent; }
html.tc-app body .trace-matrix-table:has(tbody > tr:only-child > td[colspan]) { min-width: 0; width: 100%; }
html.tc-app body .trace-matrix-table:has(tbody > tr:only-child > td[colspan]) thead { display: none; }
html.tc-app body .principal-panel-right { container-type: inline-size; }
html.tc-app body.principal-body .trace-filter-card { border: 0; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
html.tc-app body .trace-filter-card > .row { display: grid; grid-template-columns: minmax(140px,2fr) repeat(3,minmax(95px,1fr)); gap: 10px; margin: 0; }
html.tc-app body .trace-filter-card > .row > div { width: auto; min-width: 0; margin: 0; padding: 0; }
html.tc-app body .trace-filter-card > .row > div:last-child { grid-column: 1 / -1; justify-self: end; }
html.tc-app body.principal-body .trace-filter-card .form-label { display: flex; align-items: center; gap: 3px; font-size: .75rem; font-weight: 400; white-space: nowrap; }
html.tc-app body.principal-body .trace-filter-card :is(.form-control,.form-select) { font-size: .8rem; border-radius: 5px; min-height: 36px; }
.app-empty-state-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 15px; border: 1px solid var(--tc-panel-border); border-radius: 10px; color: var(--app-accent); background: var(--tc-panel-bg-soft); }
.app-empty-state strong { display: block; font-size: .9rem; font-weight: 400; color: var(--tc-text-main); }
.app-empty-state p { font-size: .78rem; margin-top: 8px; color: var(--tc-text-muted); }
@container (max-width: 650px) {
    html.tc-app body .trace-filter-card > .row { grid-template-columns: repeat(3,minmax(0,1fr)); }
    html.tc-app body .trace-filter-card > .row > div:first-child { grid-column: 1 / -1; }
}
@container (max-width: 420px) {
    html.tc-app body .trace-filter-card > .row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    html.tc-app body .trace-filter-card > .row > div:last-child { justify-self: end; width: auto; }
}
html.tc-app body .ia-warning { font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
html.tc-app body .principal-chatbot-toggle { width: 44px; height: 44px; border-radius: 12px; bottom: 20px; right: 20px; box-shadow: 0 4px 16px #0002; }
html.tc-app body .principal-chatbot { bottom: 20px; right: 20px; }
/* Settings pages use a compact section rail beside the shared navigation. */
html.tc-app body .admin-layout { display: block; }
html.tc-app body :is(.admin-sidebar,.account-sidebar) { border: 0; background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
html.tc-app body :is(.admin-user,.account-sidebar-user) { padding: 15px 0; border-bottom: 1px solid var(--tc-panel-border); margin-bottom: 16px; }
html.tc-app body :is(.admin-nav-item,.account-nav-item) { border-radius: 6px; padding: 11px 12px; font-size: .84rem; border: 0; }
html.tc-app body :is(.admin-nav-item,.account-nav-item):is(.is-active,.active) { background: var(--tc-panel-bg-soft); color: var(--app-accent); box-shadow: inset 3px 0 var(--app-accent); }
html.tc-app body .admin-sidebar { position: static; margin-bottom: 24px; }
html.tc-app body :is(.admin-user,.account-sidebar-user) { display: none; }
html.tc-app body :is(.admin-nav,.account-nav) { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 10px; border-bottom: 1px solid var(--tc-panel-border); scrollbar-width: thin; }
html.tc-app body :is(.admin-nav-item,.account-nav-item) { flex: 0 0 auto; width: auto; white-space: nowrap; }
html.tc-app body :is(.admin-nav-item,.account-nav-item):is(.is-active,.active) { box-shadow: inset 0 -2px var(--app-accent); }
html.tc-app body .account-layout > :is(.col-lg-3,.col-lg-9) { width: 100%; }
html.tc-app body .admin-panel-header h2, html.tc-app body .account-panel h2 { font-size: 1.2rem; font-weight: 500; }
html.tc-app body .classes-summary article { border-radius: 8px; border: 1px solid var(--tc-panel-border); box-shadow: none; }
html.tc-app body .access-hero { display: grid; align-items: center; }
html.tc-app body .access-card { border-radius: 12px; box-shadow: 0 8px 36px #00000008; }
html.tc-app body .access-intro h1 { font-size: clamp(2rem,3vw,3rem); font-weight: 400; }
html.tc-app body .access-hero .min-vh-100 { min-height: 0 !important; }
html.tc-app body .about-hero { padding-top: 32px; }
/* New home: product introduction with a clearly labeled sample workspace. */
.home-welcome { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 26px; }
.home-welcome h1 { font-size: 1.55rem; font-weight: 500; letter-spacing: -.03em; margin: 0; }
.home-welcome p { margin: 5px 0 0; font-size: .85rem; color: var(--tc-text-muted); }
.home-release { font-size: calc(11px * var(--app-text-scale, 1)); padding: 5px 10px; border: 1px solid var(--tc-panel-border); border-radius: 5px; color: var(--tc-text-muted); white-space: nowrap; }
.home-feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 35px; padding: clamp(24px,3vw,46px); border: 1px solid var(--tc-panel-border); border-radius: 12px; background: var(--tc-panel-bg-solid); position: relative; overflow: hidden; }
.home-feature-copy { align-self: center; position: relative; z-index: 1; }
.home-kicker { display: flex; gap: 7px; align-items: center; color: var(--app-accent); font-size: calc(10px * var(--app-text-scale, 1)); letter-spacing: .11em; text-transform: uppercase; font-weight: 500; }
.home-feature h2 { font-size: clamp(1.9rem,3vw,3.1rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 400; margin: 19px 0 18px; max-width: 520px; }
.home-feature h2 span { color: var(--app-accent); }
.home-feature-copy > p { font-size: .92rem; line-height: 1.7; color: var(--tc-text-muted); max-width: 470px; }
.home-feature-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 25px; }
html.tc-app .home-feature-actions .btn { padding: 11px 15px; }
.home-feature-note { display: flex; gap: 7px; align-items: center; margin-top: 16px; font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
.home-example { align-self: center; background: var(--tc-panel-bg-soft); border: 1px solid var(--tc-panel-border); border-radius: 10px; padding: 17px; transform: rotate(-1.5deg); box-shadow: 0 14px 35px #00000008; }
.home-example-top { display: flex; justify-content: space-between; gap: 10px; font-size: calc(11px * var(--app-text-scale, 1)); color: var(--tc-text-muted); padding: 0 0 15px; border-bottom: 1px solid var(--tc-panel-border); }
.home-example-top strong { font-weight: 500; color: var(--tc-text-main); }
.home-example-head { display: flex; justify-content: space-between; align-items: center; margin: 19px 0 13px; }
.home-example-head h3 { font-size: calc(14px * var(--app-text-scale, 1)); font-weight: 500; margin: 0; }
.home-example-head > span { font-size: calc(9px * var(--app-text-scale, 1)); color: #49846b; padding: 3px 7px; background: #51a47b14; border-radius: 4px; }
.home-artifact { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--tc-panel-border); border-radius: 7px; background: var(--tc-panel-bg-solid); }
.home-artifact-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: #a895e323; color: var(--app-accent); font-size: calc(13px * var(--app-text-scale, 1)); }
.home-artifact-meta { min-width: 0; }
.home-artifact-meta small { display: block; font-size: calc(9px * var(--app-text-scale, 1)); letter-spacing: .04em; color: var(--tc-text-muted); }
.home-artifact-meta strong { display: block; font-size: calc(12px * var(--app-text-scale, 1)); font-weight: 400; }
.home-artifact-check { margin-left: auto; color: #52987d; font-size: calc(12px * var(--app-text-scale, 1)); }
.home-connector { height: 24px; display: flex; gap: 9px; align-items: center; padding-left: 29px; color: var(--tc-text-muted); font-size: calc(9px * var(--app-text-scale, 1)); }
.home-connector::before { content: ''; height: 24px; border-left: 1px dashed var(--tc-panel-border); }
.home-example-bottom { margin-top: 16px; display: flex; align-items: center; gap: 6px; font-size: calc(10px * var(--app-text-scale, 1)); color: var(--tc-text-muted); }
.home-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 16px; }
.home-section-title h2 { font-size: 1.05rem; margin: 0; font-weight: 500; }
.home-section-title span { color: var(--tc-text-muted); font-size: calc(12px * var(--app-text-scale, 1)); }
.home-action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.home-action-card { display: flex; align-items: flex-start; gap: 14px; padding: 23px 20px; border: 1px solid var(--tc-panel-border); border-radius: 9px; color: var(--tc-text-main); background: var(--tc-panel-bg-solid); text-decoration: none; }
.home-action-card > i:first-child { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; background: var(--tc-panel-bg-soft); border: 1px solid var(--tc-panel-border); border-radius: 8px; color: var(--app-accent); font-size: calc(15px * var(--app-text-scale, 1)); }
.home-action-card h3 { font-size: .9rem; margin: 1px 0 7px; font-weight: 500; }
.home-action-card p { font-size: .78rem; color: var(--tc-text-muted); line-height: 1.6; margin: 0; }
.home-action-card > i:last-child { font-size: calc(11px * var(--app-text-scale, 1)); margin-top: 10px; margin-left: auto; color: var(--tc-text-muted); }
.home-action-card:hover { border-color: var(--app-accent); color: var(--tc-text-main); }
.home-workflow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 24px 0 0; gap: 20px; border-top: 1px solid var(--tc-panel-border); }
.home-workflow-step { display: flex; gap: 12px; }
.home-workflow-step > span { font-size: calc(11px * var(--app-text-scale, 1)); color: var(--app-accent); background: var(--tc-panel-bg-solid); border: 1px solid var(--tc-panel-border); border-radius: 50%; width: 25px; height: 25px; flex-shrink: 0; display: grid; place-items: center; }
.home-workflow-step h3 { font-size: .84rem; font-weight: 500; margin: 2px 0 6px; }
.home-workflow-step p { font-size: .75rem; color: var(--tc-text-muted); line-height: 1.5; margin: 0; }
@media (min-width: 1200px) {
    html.tc-app body .principal-layout { grid-template-columns: minmax(300px,.9fr) minmax(0,2.1fr); }
    html.tc-app body .principal-layout.artifacts-collapsed { grid-template-columns: minmax(48px,0fr) minmax(0,3fr); }
    html.tc-app body .principal-layout.artifacts-collapsed .principal-panel-left { padding: 9px; }
}
@media (min-width: 961px) {
    html.tc-app.app-nav-collapsed { --app-sidebar-width: 72px; }
    .app-nav-collapsed .app-sidebar { padding-inline: 10px; }
    .app-nav-collapsed .app-brand { padding-inline: 8px; }
    .app-nav-collapsed :is(.app-brand-copy,.app-nav-link span,.app-nav-label,.app-recent-projects,.app-sidebar-signature,.app-nav-search span,.app-nav-search kbd) { display: none; }
    .app-nav-collapsed .app-nav-link { justify-content: center; padding: 13px 0; }
    .app-nav-collapsed .app-nav-search { justify-content: center; padding: 10px 0; }
}
@media (max-width: 1199px) {
    .app-breadcrumb-root,.app-breadcrumb-divider { display: none; }
    html.tc-app body .admin-layout { grid-template-columns: 165px minmax(0,1fr); gap: 16px; }
    .home-feature { gap: 22px; padding: 28px; }
    .home-feature h2 { font-size: 2.2rem; }
    .home-action-card { padding: 17px 14px; gap: 10px; }
    .home-action-card > i:last-child { display: none; }
}
@media (max-width: 960px) {
    html.tc-app { --app-sidebar-width: 0px; }
    .app-sidebar { width: 238px; transform: translateX(-100%); visibility: hidden; }
    .app-mobile-menu { display: inline-grid; }
    .app-nav-open .app-sidebar { transform: translateX(0); visibility: visible; }
    .app-nav-open body { overflow: hidden; }
    .app-nav-open .app-sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 1045; border: 0; background: #10132266; }
    .app-topbar { padding-inline: 16px; }
    .app-sidebar-collapse { display: none !important; }
    html.tc-app body > main { padding: 26px 20px 32px; }
    html.tc-app body .admin-layout { grid-template-columns: 1fr; }
    html.tc-app body .admin-sidebar .admin-user { display: none; }
    html.tc-app body .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
    html.tc-app body .admin-nav-item { width: auto; }
    html.tc-app body .account-sidebar-user { display: none; }
    html.tc-app body .account-nav { display: flex; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 700px) {
    .home-feature { grid-template-columns: 1fr; gap: 28px; }
    .home-example { transform: none; }
    .home-action-grid { grid-template-columns: 1fr; }
    .home-workflow { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-release { display: none; }
    .home-feature h2 { font-size: 2.4rem; }
    .app-topbar-location { gap: 8px; }
    .app-topbar-tools { gap: 0; }
    .app-project-divider,.app-current-page:has(+ .app-project-divider),.app-mode-badge { display: none; }
    html.tc-app .app-project-name input { width: min(26vw,150px); font-size: calc(12px * var(--app-text-scale, 1)); }
    html.tc-app body .principal-action-buttons .traceceni-toolbar-help-anchor { flex: 1 1 calc(50% - 10px); }
    html.tc-app body .principal-project-tools { flex: 1 1 calc(50% - 10px); }
    html.tc-app body .principal-toolbar-button { width: 100% !important; justify-content: center; }
    .workspace-page-heading { align-items: flex-start; flex-wrap: wrap; }
    .workspace-system-identity { max-width: 100%; align-items: flex-start; text-align: left; }
    .workspace-page-heading h1 { font-size: 1.5rem; }
    .workspace-live-badge { display: none; }
    html.tc-app body .principal-panel { padding: 17px; }
    html.tc-app body > main { padding: 23px 16px 30px; }
    html.tc-app footer.app-footer { padding: 15px 16px; flex-wrap: wrap; font-size: calc(10px * var(--app-text-scale, 1)); }
}
@media (max-width: 420px) {
    .app-sign-in { font-size: calc(11px * var(--app-text-scale, 1)); gap: 4px; padding: 6px; }
    .app-tool-divider { margin-inline: 3px; }
    .app-topbar { padding-inline: 8px; }
    .app-icon-button { width: 30px; }
    .home-feature { padding: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
    .app-sidebar, .app-topbar, html.tc-app body { transition: width 180ms ease, left 180ms ease, padding-left 180ms ease, transform 180ms ease; }
    .app-nav-link,.home-action-card { transition: background-color 140ms ease,border-color 140ms ease; }
    .app-command-dialog[open] { animation: tc-content-enter 150ms ease; }
}
@media print {
    html.tc-app body { padding: 0 !important; }
    .app-sidebar,.app-topbar,.app-sidebar-scrim,.app-footer,.app-command-dialog { display: none !important; }
}
/* Administration belongs to the shared navigation, never above its content. */
html.tc-app body .admin-layout { display:block; }
html.tc-app .app-admin-toggle { display:flex; gap:8px; justify-content:space-between; align-items:center; width:100%; border:0; background:transparent; color:#bfc5df; padding:8px 12px 8px 40px; text-align:left; font:inherit; font-size:.68rem; }
.app-admin-toggle[aria-expanded="false"] i { transform:rotate(-90deg); }
html.tc-app .app-admin-submenu .admin-nav { display:grid; gap:3px; padding:4px 0 8px 22px; border:0; background:transparent; }
html.tc-app .app-admin-submenu .admin-nav-item { display:block; width:100%; text-align:left; border:0; border-radius:6px; padding:9px 10px; background:transparent; color:#c7cadb; box-shadow:none; font:inherit; font-size:.74rem; }
html.tc-app .app-admin-submenu .admin-nav-item span { display:flex; gap:10px; align-items:center; color:inherit; }
html.tc-app .app-admin-submenu .admin-nav-item i { width:17px; flex-shrink:0; color:inherit; font-size:.8rem; }
html.tc-app .app-admin-submenu .admin-nav-item:is(:hover,.is-active) { color:#fff; background:#b7adfa26; }
html.tc-app .app-admin-submenu .admin-nav-item.is-active { box-shadow:inset 3px 0 #b7adfa; }
html.tc-app .app-admin-submenu[hidden] { display:none; }
html.tc-app.app-nav-collapsed :is(.app-admin-submenu,.app-admin-toggle) { display:none; }
html.tc-app body #recentProjectsList :is(a,button,span) { color:#c7cadb !important; background:transparent; }
html.tc-app body #recentProjectsList a:hover { color:#fff !important; background:#ffffff12; }
html.tc-app body #recentProjectsList .dropdown-item { white-space:normal; overflow-wrap:anywhere; }
html.tc-app body .app-footer { flex-wrap:wrap; gap:12px 24px; min-height:76px; padding-block:14px; }
html.tc-app body .app-footer-institutions { display:flex !important; align-items:center; gap:16px; padding:7px 12px; background:#fff; border-radius:6px; flex-shrink:0; }
html.tc-app body .app-footer-institutions img { display:block !important; width:auto; height:36px; max-width:120px; object-fit:contain; visibility:visible !important; opacity:1 !important; }
html.tc-app[data-theme="dark"] body :is(.text-dark,.btn-outline-dark) { color:var(--tc-text-main) !important; }
html.tc-app[data-theme="dark"] body :is(.bg-light,.text-bg-light) { background:var(--tc-panel-bg-soft) !important; color:var(--tc-text-main) !important; }
html.tc-app body :is(.form-control,.form-select,.input-group-text,.btn) { font-size:calc(14px * var(--app-text-scale,1)); }
html.tc-app .app-accessibility-menu { width:300px; max-width:calc(100vw - 24px); padding:14px; color:var(--tc-text-main); }
.app-text-controls { padding:8px 0 12px; }
.app-text-controls > div { display:flex; align-items:center; gap:12px; margin-top:8px; }
.app-text-controls output { min-width:54px; text-align:center; }
.app-accessibility-option { display:flex; align-items:center; gap:10px; padding:8px 0; cursor:pointer; font-size:.85rem; }
.app-accessibility-option input { width:18px; height:18px; accent-color:var(--tc-button-bg); }
html.tc-app :focus-visible { outline:3px solid #8c76ed !important; outline-offset:3px; }
html.tc-app[data-accessibility-font] body, html.tc-app[data-accessibility-font] body :is(p,span,a,button,input,select,textarea,label,h1,h2,h3,h4,h5,small,strong,td,th) { font-family:Arial,Helvetica,sans-serif !important; }
html[data-accessibility-links] a[href] { text-decoration:underline !important; text-underline-offset:3px; }
html[data-accessibility-motion] *, html[data-accessibility-motion] *::before, html[data-accessibility-motion] *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
html.tc-app[data-accessibility-contrast] {
 --tc-text-main:#111 !important; --tc-text-muted:#333 !important; --tc-panel-bg-solid:#fff !important; --tc-panel-bg-soft:#f4f4f4 !important; --tc-panel-border:#555 !important; --tc-bg-main:#fff !important; --tc-button-bg:#242052 !important; --tc-button-text:#fff !important; --tc-primary:#242052 !important;
}
html.tc-app[data-theme="dark"][data-accessibility-contrast] { --tc-text-main:#fff !important; --tc-text-muted:#e6e6e6 !important; --tc-panel-bg-solid:#101010 !important; --tc-panel-bg-soft:#242424 !important; --tc-panel-border:#bdbdbd !important; --tc-bg-main:#000 !important; --tc-button-bg:#d5ccff !important; --tc-button-text:#101010 !important; --tc-primary:#d5ccff !important; }
html.tc-app[data-accessibility-contrast] body :is(.text-muted,.principal-muted,.form-text) { color:var(--tc-text-muted) !important; opacity:1; }
html.tc-app[data-accessibility-contrast] .app-sidebar { --app-sidebar-text:#fff; }
html.tc-app[data-accessibility-contrast] .app-sidebar :is(.app-nav-label,.app-brand-copy small,.app-sidebar-signature,.app-nav-link i) { color:#e4e5ee; }
@media(max-width:960px) { html.tc-app.app-nav-collapsed :is(.app-admin-toggle,.app-admin-submenu:not([hidden])) { display:block; } }
@media(max-width:540px) { .app-footer-institutions { width:100%; justify-content:center; } html.tc-app .app-topbar { padding-inline:10px; } .app-topbar-tools { gap:2px; } .app-breadcrumb-root { display:none; } }
.github-connection-strip { display:flex; align-items:center; gap:14px; padding:14px 18px; margin:0 0 24px; border:1px solid var(--tc-panel-border); border-radius:9px; background:var(--tc-panel-bg-solid); }
.github-connection-strip > i { font-size:1.7rem; color:var(--tc-text-main); }
.github-connection-strip > div { flex:1; }
.github-connection-strip strong { font-size:.9rem; color:var(--tc-text-main); }
.github-connection-strip p { margin:2px 0 0; font-size:.78rem; color:var(--tc-text-muted); }
.github-instructions { border:1px solid var(--tc-panel-border); border-radius:8px; padding:14px 18px; margin-bottom:20px; background:var(--tc-panel-bg-soft); }
.github-instructions summary { font-weight:500; cursor:pointer; }
.github-instructions ol { margin:12px 0; padding-left:22px; list-style:decimal; }
.github-instructions li { margin-bottom:8px; font-size:.85rem; }
.github-instructions p:last-child { margin-bottom:0; }
.github-connection-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.github-query-action { display:flex; align-items:end; }
.github-query-action button { width:100%; }
.github-feedback { padding-block:16px; overflow-wrap:anywhere; }
.github-preview-heading,.github-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; }
.github-records { max-height:330px; overflow:auto; border:1px solid var(--tc-panel-border); border-radius:8px; }
.github-record { display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--tc-panel-border); }
.github-record:last-child { border-bottom:0; }
.github-record label { display:flex; gap:12px; flex:1; min-width:0; align-items:start; }
.github-record input { margin-top:5px; flex-shrink:0; }
.github-record label span > * { display:block; overflow-wrap:anywhere; }
.github-record label span > span { white-space:pre-wrap; }
.github-record small { color:var(--tc-text-muted); }
.github-record a { flex-shrink:0; font-size:.75rem; }
@media(max-width:650px) { .github-connection-strip { flex-wrap:wrap; } .github-connection-strip button { width:100%; } .github-connection-form { grid-template-columns:1fr; } .github-record { align-items:start; flex-direction:column; } .github-pagination { flex-wrap:wrap; } }
.app-submenu-chevron { margin-left:auto; font-size:.65rem !important; }
#adminSubmenuToggle[aria-expanded="false"] .app-submenu-chevron { transform:rotate(-90deg); }
.app-nav-collapsed #adminSubmenuToggle .app-submenu-chevron { display:none; }
html.tc-app[data-theme="dark"] body :is(main,.modal,.app-footer) a:not(.btn):not(.dropdown-item) { color:var(--tc-interactive-ink,var(--tc-text-main)); }
html.tc-app[data-theme="dark"] body .btn-close { filter:invert(1) grayscale(1) brightness(2); opacity:.85; }
.github-instructions li { list-style:decimal; }
html.tc-app body > main { background:var(--app-canvas) !important; background-image:none !important; }
html.tc-app body .app-admin-submenu .admin-nav-item { white-space:normal; line-height:1.35; font-weight:400; }
html.tc-app body .app-admin-submenu .admin-nav-item span { font-weight:400; }
html.tc-app body .app-admin-submenu .admin-nav-item.is-active { background:#b7adfa26 !important; color:#fff !important; }
@media(min-width:961px) { html.tc-app:not(.app-nav-collapsed) { --app-sidebar-width:calc(238px * max(1,var(--app-text-scale,1))); } }
html.tc-app .app-sidebar .app-nav-link { white-space:normal; }
html.tc-app[data-theme="dark"] body :is(.btn-outline-secondary,.btn-outline-dark,.btn-outline-primary) { color:var(--tc-text-main) !important; border-color:var(--tc-text-muted) !important; }
html.tc-app[data-theme="dark"] body :is(.btn-outline-secondary,.btn-outline-dark,.btn-outline-primary):hover { background:var(--tc-panel-bg-soft) !important; color:var(--tc-text-main) !important; }
html.tc-app body.principal-body .app-footer { padding-right:76px; }
html.tc-app body .app-footer-links { flex-wrap:wrap; }
html.tc-app .app-accessibility-menu { max-height:calc(100dvh - 80px); overflow-y:auto; overscroll-behavior:contain; }
/* Account uses a compact tab strip and a vertically flowing appearance editor. */
html.tc-app body .account-layout { display:block; }
html.tc-app body .account-tabs-shell { padding:0; margin-bottom:22px; border-bottom:1px solid var(--tc-panel-border); }
.account-tabs-shell .account-user { display:none; }
html.tc-app body .account-tabs-shell .account-nav { display:flex; flex-direction:row; gap:8px; overflow-x:auto; padding:0 0 8px; }
html.tc-app body .account-tabs-shell .account-nav-item { width:auto; flex:0 0 auto; padding:12px 18px; background:transparent; color:var(--tc-text-muted); border-radius:7px; white-space:nowrap; font-weight:400; }
html.tc-app body .account-tabs-shell .account-nav-item.is-active { color:var(--tc-text-main) !important; background:var(--tc-panel-bg-soft) !important; box-shadow:inset 0 -3px var(--tc-button-bg); }
html.tc-app body .account-theme-card { display:block !important; padding:22px; border-radius:10px; }
html.tc-app body .account-theme-card-heading { margin-bottom:20px; align-items:start; }
html.tc-app body .account-theme-card > .form-label { display:block; margin-bottom:6px; }
html.tc-app body .account-theme-card > select { max-width:480px; margin:0 0 20px; }
html.tc-app body .account-custom-presets-section { border-top:1px solid var(--tc-panel-border); padding-top:18px; }
html.tc-app body .account-custom-preset-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); align-items:start; }
html.tc-app body .account-custom-preset-item { border-radius:8px; min-height:120px; padding:16px; }
html.tc-app body .account-custom-theme-grid > label { border-radius:7px; }
html.tc-app body .account-custom-theme-grid .account-theme-field-wide { grid-column:1 / -1; }
html.tc-app body .workspace-theme-preview { display:grid; grid-template-columns:52px minmax(0,1fr); padding:0; border-radius:10px; overflow:hidden; background:var(--preview-gradient); color:var(--preview-text); border:1px solid var(--tc-panel-border); font-size:.76rem; }
.workspace-theme-preview .preview-rail { display:flex; flex-direction:column; align-items:center; gap:14px; padding:18px 6px; background:var(--preview-sidebar,#202232); color:#fff; }
.workspace-theme-preview .preview-rail strong { font-size:1.2rem; color:white; }
.preview-nav-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:6px; color:var(--preview-accent,#c4baf5); }
.preview-nav-icon.is-active { background:#ffffff20; }
.preview-workspace { min-width:0; }
.preview-topbar { display:flex; justify-content:space-between; padding:14px; background:var(--preview-surface); border-bottom:1px solid color-mix(in srgb,var(--preview-text) 15%,transparent); }
.preview-canvas { padding:18px 14px; }
html.tc-app .workspace-theme-preview :is(h3,p,strong,small,span) { color:inherit; }
html.tc-app .workspace-theme-preview h3 { font-size:1.1rem; margin:4px 0 10px; }
html.tc-app .workspace-theme-preview p { font-size:.78rem; line-height:1.5; }
.preview-actions { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
html.tc-app .workspace-theme-preview .preview-button { padding:8px 10px; border:0; border-radius:6px; background:var(--preview-button); color:var(--preview-button-text); font:inherit; }
html.tc-app .workspace-theme-preview .preview-button:is(:hover,.is-hover) { background:var(--preview-button-hover); color:var(--preview-button-hover-text,var(--preview-button-text)); }
.preview-panel { border:1px solid color-mix(in srgb,var(--preview-text) 18%,transparent); padding:14px; background:var(--preview-surface); border-radius:8px; }
.preview-table-row { display:flex; justify-content:space-between; gap:8px; border-top:1px solid color-mix(in srgb,var(--preview-text) 15%,transparent); padding-top:10px; margin-top:10px; }
.preview-footer { display:flex; justify-content:space-between; gap:8px; align-items:center; padding:10px; background:var(--preview-surface); }
.preview-logos { display:flex; gap:7px; padding:4px; background:#fff; border-radius:4px; }
.preview-logos img { width:46px; height:24px; object-fit:contain; }
html.tc-app .app-brand-symbol { background:var(--app-nav-accent,#b7adfa); }
html.tc-app .app-sidebar .app-nav-link.is-current { background:var(--app-nav-active-bg,#b7adfa1f); }
html.tc-app .app-sidebar .app-nav-link.is-current i { color:var(--app-nav-accent,#bbb0ff); }
html.tc-app body .app-admin-submenu .admin-nav-item.is-active { background:var(--app-nav-active-bg,#b7adfa26) !important; box-shadow:inset 3px 0 var(--app-nav-accent,#b7adfa); }
html.tc-app .account-theme-modal .modal-body > .row { align-items:start; }
@media(max-width:600px) { html.tc-app body .account-theme-card-heading { flex-wrap:wrap; } html.tc-app body .account-tabs-shell .account-nav-item { padding:10px 12px; } }
/* Short, interruptible transitions. Motion preferences override these below. */
html.tc-app body :is(.app-nav-link,.account-nav-item,.admin-nav-item,.btn,.account-custom-preset-item,.github-connection-strip) { transition:background-color 180ms ease,border-color 180ms ease,box-shadow 180ms ease,color 180ms ease,transform 180ms ease; }
html.tc-app body .btn:active:not(:disabled) { transform:scale(.98); }
html.tc-app .app-sidebar { transition:width 240ms cubic-bezier(.2,.75,.25,1),transform 240ms cubic-bezier(.2,.75,.25,1); }
html.tc-app .app-topbar { transition:left 240ms cubic-bezier(.2,.75,.25,1),background-color 200ms ease; }
html.tc-app body { transition:padding-left 240ms cubic-bezier(.2,.75,.25,1),background-color 200ms ease; }
html.tc-app .modal.fade .modal-dialog { transition:transform 230ms cubic-bezier(.2,.75,.25,1); }
html.tc-app .modal.fade:not(.show) .modal-dialog { transform:translateY(12px) scale(.985); }
html.tc-app .modal.show .modal-dialog { transform:none; }
@media(prefers-reduced-motion:reduce) { html.tc-app *,html.tc-app *::before,html.tc-app *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
html.tc-app[data-accessibility-motion] *,html.tc-app[data-accessibility-motion] *::before,html.tc-app[data-accessibility-motion] *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }

/* Evidence workspace: the same surfaces and contrast tokens as Principal. */
.devops-dialog { width:calc(100vw - 48px); max-width:1540px; }
html.tc-app .devops-dialog .modal-body { padding:24px; background:var(--tc-bg-main); }
.devops-intro { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:14px; }
.devops-intro p { margin:0; max-width:570px; color:var(--tc-text-muted); }
.devops-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.devops-metrics > div { display:flex; align-items:center; gap:12px; padding:15px 18px; border:1px solid var(--tc-panel-border); border-radius:9px; background:var(--tc-panel-bg-solid); }
.devops-metrics strong { font-size:1.7rem; font-weight:500; }
.devops-metrics span { font-size:.78rem; color:var(--tc-text-muted); }
.devops-controls { display:grid; grid-template-columns:2fr 1fr; gap:16px; margin:16px 0 20px; }
.devops-workspace { display:grid; grid-template-columns:260px minmax(0,1fr); gap:18px; align-items:start; }
.devops-requirements { position:sticky; top:0; max-height:70vh; overflow:auto; border:1px solid var(--tc-panel-border); border-radius:9px; background:var(--tc-panel-bg-solid); }
html.tc-app .devops-req { display:block; width:100%; padding:16px; border:0; border-bottom:1px solid var(--tc-panel-border); background:transparent; color:var(--tc-text-main); text-align:left; font:inherit; transition:background-color 160ms ease; }
.devops-req > span:first-child { display:flex; justify-content:space-between; gap:10px; }
.devops-req small { color:var(--tc-text-muted); font-size:.7rem; }
.devops-req-description { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:5px 0; font-size:.8rem; }
html.tc-app .devops-req:is(:hover,.active) { background:var(--tc-panel-bg-soft); }
html.tc-app .devops-req.active { box-shadow:inset 3px 0 var(--tc-button-bg); }
.devops-detail { min-width:0; padding:22px; border:1px solid var(--tc-panel-border); border-radius:10px; background:var(--tc-panel-bg-solid); }
.devops-detail-heading { display:flex; justify-content:space-between; align-items:start; gap:12px; margin-bottom:20px; }
html.tc-app .devops-detail-heading h3 { font-size:1.05rem; font-weight:500; line-height:1.5; white-space:pre-wrap; max-height:150px; overflow:auto; margin:8px 0 0; }
.devops-lifecycle { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; list-style:none; padding:0; margin:0 0 16px; }
.devops-lifecycle li { padding:12px; display:flex; flex-direction:column; gap:5px; border:1px solid var(--tc-panel-border); border-radius:8px; background:var(--tc-panel-bg-soft); }
.devops-lifecycle strong { font-weight:500; font-size:.76rem; }
.devops-lifecycle small { font-size:.65rem; color:var(--tc-text-muted); }
.devops-stage-icon { width:27px; height:27px; border-radius:7px; display:grid; place-items:center; border:1px solid var(--tc-panel-border); color:var(--tc-text-muted); }
.devops-lifecycle .has-evidence .devops-stage-icon { color:var(--tc-button-text); background:var(--tc-button-bg); border-color:transparent; }
.devops-badge { display:inline-block; padding:3px 8px; border:1px solid var(--tc-panel-border); border-radius:20px; font-size:.65rem; white-space:nowrap; color:var(--tc-text-main); background:var(--tc-panel-bg-soft); }
.devops-badge.good { border-color:#378967; }
.devops-badge.attention { border-color:#bb9048; }
.devops-gaps { padding:15px 18px; border:1px solid var(--tc-panel-border); border-left:3px solid #bb9048; border-radius:7px; background:var(--tc-panel-bg-soft); font-size:.8rem; }
.devops-gaps ul { list-style:disc; padding-left:20px; margin:8px 0 0; }
.devops-section { border-top:1px solid var(--tc-panel-border); margin-top:20px; padding-top:16px; }
.devops-section > summary { cursor:pointer; font-size:.91rem; font-weight:500; margin-bottom:14px; }
.devops-section > summary span { color:var(--tc-text-muted); margin-left:8px; font-weight:400; }
.devops-evidence-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.devops-evidence { border:1px solid var(--tc-panel-border); border-radius:8px; padding:14px; min-width:0; font-size:.78rem; overflow-wrap:anywhere; }
.devops-evidence > p { margin:8px 0; white-space:pre-wrap; max-height:120px; overflow:auto; font-size:.78rem; }
.devops-path { padding:8px 0; font-size:.7rem; overflow-wrap:anywhere; }
.devops-path span { color:var(--tc-text-muted); }
.devops-test { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--tc-panel-border); }
.devops-test small { font-size:.7rem; color:var(--tc-text-muted); }
.devops-test button { margin-left:auto; }
.devops-pipeline-form,.devops-link-form { display:grid; grid-template-columns:1.4fr 1fr auto; gap:12px; align-items:end; margin-bottom:12px; }
.devops-link-form { grid-template-columns:2fr 1fr; }
.devops-link-reason { grid-column:1 / -1; }
.devops-link-form .btn { justify-self:start; }
.devops-method { padding:16px; border:1px solid var(--tc-panel-border); border-radius:9px; font-size:.78rem; color:var(--tc-text-muted); }
.devops-method summary { color:var(--tc-text-main); cursor:pointer; }
.devops-method p { font-size:.78rem; margin:10px 0 0; }
.devops-empty { padding:55px 24px; text-align:center; }
.devops-empty > i { font-size:2.6rem; color:var(--tc-text-muted); margin-bottom:20px; }
html.tc-app .devops-empty h3 { font-size:1.1rem; margin:0 0 12px; }
.devops-empty p { font-size:.85rem; }
@media(max-width:1100px) { .devops-workspace { grid-template-columns:210px minmax(0,1fr); } .devops-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .devops-intro { flex-wrap:wrap; } .devops-pipeline-form { grid-template-columns:1fr 1fr; } .devops-evidence-grid { grid-template-columns:1fr; } }
@media(max-width:700px) { .devops-workspace,.devops-controls { grid-template-columns:1fr; } .devops-requirements { position:static; max-height:210px; } .devops-lifecycle { grid-template-columns:repeat(2,minmax(0,1fr)); } .devops-detail { padding:14px; } html.tc-app .devops-dialog .modal-body { padding:14px; } .devops-metrics > div { padding:10px; } .devops-pipeline-form,.devops-link-form { grid-template-columns:1fr; } .github-connection-strip { flex-wrap:wrap; } }

/* Prominent, consistent progress. No invented completion percentages. */
html.tc-app body .spinner-border { width:1.5rem;height:1.5rem;border-width:2px;flex-shrink:0;vertical-align:middle; }
html.tc-app body .spinner-border-sm,
html.tc-app body .btn .spinner-border { width:1rem; height:1rem; border-width:2px; }
html.tc-app body .app-loading-status > .spinner-border { width:1.5rem; height:1.5rem; border-width:2px; }
html.tc-app body .app-loading-status {
 display:flex;align-items:center;gap:16px;padding:18px 20px!important;margin:16px 0!important;
 min-height:76px;border:1px solid var(--tc-panel-border);border-left:4px solid var(--tc-button-bg);
 border-radius:10px;background:var(--tc-panel-bg-soft);color:var(--tc-text-main)!important;font-size:.95rem!important;
 box-shadow:0 4px 18px #0000000a;
}
.app-loading-spinner { display:none; }
.app-loading-status > .app-loading-spinner { display:inline-block; }
.app-loading-copy { flex:1;overflow-wrap:anywhere; }
.app-loading-status progress { width:120px;accent-color:var(--tc-button-bg); }
.app-status-error { color:var(--bs-danger,#c94f63); }
.feedback-save-status { display:flex;align-items:center;gap:.5rem;color:var(--tc-text-main);min-height:1.5em; }
.feedback-save-status:empty { display:none; }
.traceceni-action-help { display:inline-flex;align-items:center;gap:.35rem;max-width:100%;vertical-align:middle; }
.traceceni-action-help:has(> .w-100) { display:flex;width:100%; }
.traceceni-action-help > .btn { min-width:0; }
html.tc-app body #apiTokenHelp .accordion-header { display:flex;align-items:center;padding-right:.75rem;gap:.35rem; }
html.tc-app body #apiTokenHelp .accordion-button { min-width:0;flex:1; }
html.tc-app body :is(h2,h3,label) > .traceceni-info-trigger { margin-inline-start:.3rem;vertical-align:middle; }
/* Native file controls need both colors; inheriting only text breaks dark presets. */
html.tc-app body .form-control[type="file"]::file-selector-button {
 background:var(--tc-panel-bg-soft);color:var(--tc-text-main);
 border-inline-end:1px solid var(--tc-panel-border);
}
html.tc-app body .form-control[type="file"]:hover:not(:disabled):not([readonly])::file-selector-button {
 background:var(--tc-panel-bg-solid);color:var(--tc-text-main);
}
html.tc-app body .traceceni-data-loading { max-width:min(560px,calc(100vw - 32px));padding:12px 18px;gap:10px;font-size:.85rem;min-height:48px;border:1px solid var(--tc-panel-border);box-shadow:0 12px 45px #00000030; }
html.tc-app body :is(.project-loading-box,.traceceni-page-loading-card) { min-width:min(280px,90vw);padding:24px; }
html.tc-app body :is(.project-loading-box,.traceceni-page-loading-card) .spinner-border { width:1.75rem;height:1.75rem;border-width:2px; }
html.tc-app body :is([role="status"],.alert,.text-center):has(> .spinner-border):not(.btn):not(.app-loading-status):not(.agent-settings-current) { font-size:.92rem; }
/* Shared contrast contract: the same tokens cover every screen and custom preset. */
html.theme-palette-changing *, html.theme-palette-changing *::before, html.theme-palette-changing *::after,
html.theme-palette-changing input::file-selector-button { transition:none !important; }
html.tc-app body { color:var(--tc-text-main); }
html.tc-app body :is(.text-muted,.text-secondary,.form-text) { color:var(--tc-text-muted) !important; }
html.tc-app body :is(.text-primary,.btn-link) { color:var(--tc-interactive-ink,var(--tc-text-main)) !important; }
html.tc-app body :is(main,.modal,.app-footer) a:not(.btn):not(.dropdown-item):not(.app-nav-link) { color:var(--tc-interactive-ink,var(--tc-text-main)); }
html.tc-app body code { color:var(--tc-interactive-ink,var(--tc-text-main)); }
html.tc-app body input::placeholder, html.tc-app body textarea::placeholder { color:var(--tc-control-placeholder);opacity:1; }
html.tc-app body :is(.btn-primary,.btn-dark,.btn-principal-primary,.btn-principal-dark,.btn-projects-primary,.btn-hero-primary,.button,.btn-account-primary,.classes-preset-action,.admin-card-action):is(:hover,:focus,:active,.active):not(:disabled):not(.disabled) {
 background:var(--tc-button-hover) !important;border-color:var(--tc-button-hover) !important;
 color:var(--tc-button-hover-text,var(--tc-button-text)) !important;
}
html.tc-app body :is(.btn-outline-primary,.btn-outline-dark,.btn-outline-secondary,.btn-hero-outline) {
 background:transparent !important;color:var(--tc-interactive-ink,var(--tc-text-main)) !important;border-color:var(--tc-control-border) !important;
}
html.tc-app body :is(.btn-outline-primary,.btn-outline-dark,.btn-outline-secondary,.btn-hero-outline):is(:hover,:focus-visible,:active,.active) {
 background:var(--tc-interactive-hover) !important;color:var(--tc-text-main) !important;
}
html.tc-app body .text-success { color:var(--tc-status-success,#198754) !important; }
html.tc-app body .text-danger { color:var(--tc-status-danger,#dc3545) !important; }
html.tc-app body .text-warning { color:var(--tc-status-warning,#9a6700) !important; }
html.tc-app body .text-info { color:var(--tc-status-info,#087990) !important; }
html.tc-app body .dropdown-item.text-danger:is(:hover,:focus) { background:var(--tc-panel-bg-soft) !important;color:var(--tc-status-danger,#dc3545) !important; }
/* These semantic badges keep Bootstrap's light fill, so their ink stays dark. */
html.tc-app body .badge:is(.bg-warning,.bg-info,.text-bg-warning,.text-bg-info) { color:#111 !important; }
html.tc-app body .btn-outline-success { --feedback-ink:var(--tc-status-success,#198754);--feedback-on:var(--tc-on-success,#fff); }
html.tc-app body .btn-outline-danger { --feedback-ink:var(--tc-status-danger,#dc3545);--feedback-on:var(--tc-on-danger,#fff); }
html.tc-app body .btn-outline-warning { --feedback-ink:var(--tc-status-warning,#9a6700);--feedback-on:var(--tc-on-warning,#fff); }
html.tc-app body .btn-outline-info { --feedback-ink:var(--tc-status-info,#087990);--feedback-on:var(--tc-on-info,#fff); }
html.tc-app body :is(.btn-outline-success,.btn-outline-danger,.btn-outline-warning,.btn-outline-info) { color:var(--feedback-ink);border-color:var(--feedback-ink); }
html.tc-app body :is(.btn-outline-success,.btn-outline-danger,.btn-outline-warning,.btn-outline-info):is(:hover,:focus-visible,:active,.active) { background:var(--feedback-ink);color:var(--feedback-on); }
html.tc-app body .alert { background:var(--tc-panel-bg-soft);color:var(--tc-text-main);border-color:var(--tc-control-border); }
html.tc-app body .alert :is(.alert-link,a) { color:var(--tc-interactive-ink,var(--tc-text-main));text-decoration:underline; }
html.tc-app body .alert-success { border-inline-start:4px solid var(--tc-status-success,#198754); }
html.tc-app body .alert-danger { border-inline-start:4px solid var(--tc-status-danger,#dc3545); }
html.tc-app body .alert-warning { border-inline-start:4px solid var(--tc-status-warning,#9a6700); }
html.tc-app body .alert-info { border-inline-start:4px solid var(--tc-status-info,#087990); }
html.tc-app body input[type="file"]::file-selector-button { background:var(--tc-panel-bg-soft);color:var(--tc-text-main);border-color:var(--tc-control-border);font:inherit; }
html.tc-app body .traceceni-info-trigger { display:inline-grid;place-items:center;vertical-align:middle;flex-shrink:0;line-height:1;opacity:1;color:var(--tc-text-muted);width:1.45rem;height:1.45rem;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer; }
html.tc-app body :is(h1,h2,h3,label):has(> .traceceni-info-trigger) { display:flex;align-items:center;gap:.35rem;max-width:100%; }
html.tc-app body :is(h1,h2,h3,label):has(> .traceceni-info-trigger) > .traceceni-info-trigger { margin-inline-start:0; }
html.tc-app body .traceceni-toolbar-help-anchor:has(> :is(.btn-primary,.btn-principal-primary,.btn-dark,.btn-principal-dark)) > .traceceni-info-trigger { color:var(--tc-button-text);background:var(--tc-button-bg); }
html.tc-app body .principal-action-buttons :is(.traceceni-toolbar-help-anchor,.principal-project-tools) > .traceceni-info-trigger { width:1rem;height:1rem; }
html.tc-app body :is(.admin-section-loader,.admin-inline-loader,.admin-rag-viewer-loading,.account-general-loader,.access-form-loader,.about-loader) { color:var(--tc-text-main);gap:.65rem; }
html.tc-app body .access-form-loader { background:var(--tc-panel-bg-soft); }
html.tc-app body :is(.admin-section-loader,.admin-inline-loader,.admin-rag-viewer-loading,.account-general-loader,.access-form-loader,.about-loader) > .spinner-border { width:1.5rem;height:1.5rem;border-width:2px;color:var(--tc-interactive-ink,var(--tc-text-main)) !important; }
html.tc-app body .admin-panel.is-form-loading::after { border-top-color:var(--tc-interactive-ink,var(--tc-text-main)); }
html.tc-app body :is(.admin-rag-index-status,.admin-rag-normalized,.admin-model-default-badge,.admin-feedback-status,.about-author-role,.admin-role-chip.is-admin),
html.tc-app body .admin-feedback-user-counts :is(.is-accepted,.is-rejected) { background:var(--tc-panel-bg-soft); }
html.tc-app body #autoSaveStatus.is-saving { color:var(--tc-interactive-ink,var(--tc-text-main)) !important; }
html.tc-app body #autoSaveStatus.is-error { color:var(--tc-status-danger,var(--tc-text-main)) !important; }
/* High contrast must also override derived tokens and form surfaces. */
html.tc-app[data-accessibility-contrast] {
 --tc-control-bg:var(--tc-panel-bg-solid) !important;--tc-control-text:var(--tc-text-main) !important;
 --tc-control-placeholder:var(--tc-text-muted) !important;--tc-control-border:var(--tc-text-muted) !important;
 --tc-panel-bg:var(--tc-panel-bg-solid) !important;--tc-panel-bg-modal:var(--tc-panel-bg-solid) !important;
 --tc-header-bg:var(--tc-panel-bg-solid) !important;--tc-footer-bg:var(--tc-bg-main) !important;
 --tc-table-head-bg:var(--tc-panel-bg-soft) !important;--tc-table-row-bg:var(--tc-panel-bg-solid) !important;
 --tc-table-row-hover:var(--tc-panel-bg-soft) !important;--tc-interactive-hover:var(--tc-panel-bg-soft) !important;
 --tc-interactive-ink:var(--tc-text-main) !important;--tc-button-hover:var(--tc-button-bg) !important;
 --tc-button-hover-text:var(--tc-button-text) !important;--tc-text-soft:var(--tc-text-muted) !important;
 --tc-status-success:#146c43 !important;--tc-status-danger:#b42332 !important;--tc-status-warning:#735000 !important;--tc-status-info:#00677c !important;
 --tc-on-success:#fff !important;--tc-on-danger:#fff !important;--tc-on-warning:#fff !important;--tc-on-info:#fff !important;
}
html.tc-app[data-theme="dark"][data-accessibility-contrast] {
 --tc-status-success:#8de0b4 !important;--tc-status-danger:#ff9d9d !important;--tc-status-warning:#ffd277 !important;--tc-status-info:#81d9ed !important;
 --tc-on-success:#000 !important;--tc-on-danger:#000 !important;--tc-on-warning:#000 !important;--tc-on-info:#000 !important;
}
/* The matrix owns its action bar; the artifact panel remains independent. */
html.tc-app .principal-panel-right .principal-toolbar { margin:14px 0 20px!important;padding:16px 0;border-top:1px solid var(--tc-panel-border);border-bottom:1px solid var(--tc-panel-border); }
html.tc-app .principal-panel-right .principal-toolbar > .col-auto { padding:0;max-width:100%; }
html.tc-app .principal-panel-right .principal-action-group { width:100%; }
html.tc-app .principal-panel-right .principal-action-buttons { flex-wrap:wrap;gap:8px; }
.trace-matrix-toolbar { flex-wrap:wrap; }
.relation-type-help { margin:10px 0 0;padding:12px 14px;border-left:3px solid var(--tc-button-bg);border-radius:5px;background:var(--tc-panel-bg-soft);color:var(--tc-text-main);font-size:.8rem;line-height:1.6; }
.relation-type-help:empty { display:none; }
#relationEditorFromDescription,#relationEditorToDescription,#devopsArtifactDescription { max-height:120px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere; }
#relationEditorForm { display:flex;flex-direction:column;min-height:0;overflow:hidden; }
#relationEditorForm > .modal-body { overflow-y:auto; }
#relationEditorForm > .modal-footer { flex-shrink:0; }
.devops-lifecycle li { padding:0; }
.devops-lifecycle button { display:flex;flex-direction:column;gap:6px;padding:13px;width:100%;height:100%;border:0;border-radius:8px;color:var(--tc-text-main);background:transparent;text-align:left;transition:background-color 160ms,transform 160ms;font:inherit; }
.devops-lifecycle button:hover { background:var(--tc-interactive-hover);transform:translateY(-2px); }
.devops-lifecycle button:focus-visible { outline:3px solid var(--tc-button-bg);outline-offset:2px; }
.devops-stage-link { font-size:.65rem;color:var(--tc-text-muted);margin-top:auto; }
.devops-legend { padding:14px 16px;border:1px dashed var(--tc-panel-border);border-radius:8px;font-size:.8rem;margin:18px 0; }
.devops-legend p { font-size:.78rem;margin:8px 0 0;line-height:1.6; }
.devops-stage-card { margin-top:18px;padding:20px;border:1px solid var(--tc-panel-border);border-radius:10px;background:var(--tc-panel-bg-soft);scroll-margin-top:18px; }
.devops-stage-card > summary { display:list-item;font-size:1rem;padding:0;margin:0; }
.devops-stage-card[open] > summary { margin-bottom:12px; }
.devops-stage-card > summary:focus-visible { outline:2px solid var(--tc-button-bg);outline-offset:5px; }
.devops-card-help { font-size:.8rem;color:var(--tc-text-muted);margin:0 0 18px;line-height:1.6;max-width:850px; }
.devops-stage-card .devops-evidence { background:var(--tc-panel-bg-solid); }
.devops-plan-data { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0; }
.devops-plan-data dt { font-size:.74rem;color:var(--tc-text-muted);font-weight:400; }
.devops-plan-data dd { margin:3px 0 0;font-size:.86rem;overflow-wrap:anywhere; }
.devops-test { background:var(--tc-panel-bg-solid);border:1px solid var(--tc-panel-border);border-radius:8px;padding:14px;margin:10px 0; }
.devops-test > div { flex:1;min-width:180px; }
.devops-test > div p { margin:6px 0 0; }
.devops-link-form > div { min-width:0; }
.devops-link-form .form-select { width:100%;text-overflow:ellipsis; }
@media(max-width:700px){ .devops-stage-card { padding:14px; } .devops-plan-data { grid-template-columns:1fr; } html.tc-app .principal-panel-right .principal-action-buttons .btn { flex:1 1 160px; } }

.trace-graph-toolbar { display:flex;align-items:end;flex-wrap:wrap;gap:14px; }
.trace-graph-toolbar > div:first-child { flex:1;min-width:180px; }
.trace-graph-layout { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:18px; }
.trace-graph-canvas { overflow:hidden;border:1px solid var(--tc-panel-border);border-radius:12px;background:#111827; }
#traceGraphSvg { display:block;width:100%;height:65vh;min-height:400px;touch-action:none; }
#traceGraphSvg [role="button"] { cursor:pointer; }
#traceGraphSvg [role="button"]:focus { outline:none;filter:drop-shadow(0 0 5px #fff); }
#traceGraphSvg.is-panning { cursor:grabbing; }
.trace-graph-details { border:1px solid var(--tc-panel-border);border-radius:12px;padding:20px;background:var(--tc-panel-bg-soft);overflow:auto;max-height:65vh;overflow-wrap:anywhere; }
html.tc-app .trace-graph-details h3 { font-size:1.1rem;margin-bottom:12px; }
html.tc-app .trace-graph-details h4 { font-size:.9rem;margin:20px 0 12px; }
.graph-description { white-space:pre-wrap; }
.graph-relation-choice { display:block;width:100%;text-align:left;border:1px solid var(--tc-panel-border);border-radius:8px;padding:10px;margin:8px 0;color:var(--tc-text-main);background:var(--tc-panel-bg-solid);font:inherit;overflow-wrap:anywhere; }
.devops-recommendations { margin:20px 0;padding:18px;border:1px solid var(--tc-panel-border);border-left:4px solid var(--tc-button-bg);border-radius:10px; }
.devops-recommendation { display:flex;gap:18px;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--tc-panel-border); }
.devops-recommendation:last-child { border-bottom:0;padding-bottom:0; }
.devops-recommendation p { margin:4px 0 0;font-size:.8rem; }
.devops-recommendation-actions { display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0;max-width:45%; }
.devops-view-controls { display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 18px; }
.devops-view-controls .form-select { width:auto; }
.devops-infinity { position:relative;margin:0 0 24px;aspect-ratio:2.25;min-height:340px;border-radius:12px;background:var(--tc-panel-bg-soft);overflow:hidden; }
.devops-infinity > svg { position:absolute;inset:0;width:100%;height:100%; }
.devops-infinity button { position:absolute;transform:translate(-50%,-50%);width:20%;min-height:78px;border:1px solid var(--tc-panel-border);border-radius:12px;background:var(--tc-panel-bg-solid);color:var(--tc-text-main);padding:10px;font:inherit; }
.devops-infinity button strong,.devops-infinity button small { display:block;font-size:.76rem; }
.devops-infinity button small { margin-top:5px;font-size:.65rem;color:var(--tc-text-muted); }
.devops-infinity .has-evidence { border-color:var(--tc-button-bg);box-shadow:0 0 0 2px var(--tc-panel-bg-soft); }
.devops-infinity button:focus-visible { outline:3px solid var(--tc-button-bg);outline-offset:3px; }
.devops-infinity button:hover { box-shadow:0 4px 16px #0002; }
.devops-infinity-label { position:absolute;top:43%;font-size:.8rem;font-weight:500;color:var(--tc-text-muted);pointer-events:none; }
.devops-infinity-label.dev { left:21%; }.devops-infinity-label.ops { right:21%; }
.devops-manual-evidence { margin-top:14px;border:1px dashed var(--tc-panel-border);padding:14px;border-radius:8px; }
@media(max-width:800px){.trace-graph-layout{grid-template-columns:1fr}.trace-graph-details{max-height:340px}.devops-recommendation{align-items:start;flex-direction:column}.devops-recommendation-actions{max-width:100%}.devops-infinity{min-height:420px}.devops-infinity button{width:23%;padding:6px}.devops-infinity button strong{font-size:.64rem}}

/* Shared select affordance: explicit longhands prevent background shorthands
   elsewhere from tiling the arrow. currentColor follows every custom preset. */
html.tc-app body select:not([multiple]):not([size]),
html.tc-app body select[size="1"]:not([multiple]) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem !important;
    background-image: linear-gradient(45deg, transparent 38%, currentColor 38%, currentColor 62%, transparent 62%), linear-gradient(135deg, transparent 38%, currentColor 38%, currentColor 62%, transparent 62%) !important;
    background-position: right 1.05rem center, right .75rem center !important;
    background-size: .3rem .3rem, .3rem .3rem !important;
    background-repeat: no-repeat !important;
    color: var(--tc-control-text) !important;
    background-color: var(--tc-control-bg) !important;
    border-color: var(--tc-control-border) !important;
    text-overflow: ellipsis;
}
html.tc-app body select:is([multiple],[size]):not([size="1"]) {
    background-image: none !important;
    color: var(--tc-control-text) !important;
    background-color: var(--tc-control-bg) !important;
}
html.tc-app body select option,
html.tc-app body select optgroup {
    background-color: var(--tc-control-bg) !important;
    color: var(--tc-control-text) !important;
}
/* Modal selects can sit inside narrow grid/flex columns (including rows built
   dynamically in Admin). Keep the closed control within its column; let the
   native option popup use the browser's viewport-aware scrolling. */
html.tc-app body .modal :is(select, .form-select) {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
}
html.tc-app body .modal :is(select, .form-select) option,
html.tc-app body .modal :is(select, .form-select) optgroup {
    max-width: min(88vw, 36rem);
    white-space: normal;
    overflow-wrap: anywhere;
}
html.tc-app body.principal-body #accordionImportedArtifacts .artifact-accordion-header {
    grid-template-columns: minmax(0,1fr) 36px 24px;
    gap: 8px;
    padding: 12px;
}
html.tc-app body.principal-body #accordionImportedArtifacts .btn-add-manual-artifact {
    min-width: 36px;
    width: 36px !important;
    height: 36px !important;
}
html.tc-app body.principal-body #accordionImportedArtifacts .artifact-collapse-icon {
    display: grid;
    place-items: center;
    width: 24px;
    margin: 0 !important;
    font-size: .8rem;
    color: var(--tc-control-text);
}
@media (max-width: 650px) {
    html.tc-app body.principal-body #accordionImportedArtifacts .artifact-accordion-header {
        grid-template-columns: minmax(0,1fr) 44px 24px;
    }
    html.tc-app body.principal-body #accordionImportedArtifacts .btn-add-manual-artifact {
        min-width: 44px;
        width: 44px !important;
        height: 44px !important;
    }
}

/* Keep Bootstrap tab text legible across dark custom presets and page themes. */
html.tc-app body .nav-tabs { border-color: var(--tc-panel-border) !important; }
html.tc-app body .nav-tabs .nav-link {
    color: var(--tc-interactive-ink, var(--tc-text-main)) !important;
    border-color: transparent !important;
}
html.tc-app body .nav-tabs .nav-link:is(:hover, :focus-visible) {
    color: var(--tc-text-main) !important;
    background: var(--tc-interactive-hover) !important;
    border-color: var(--tc-panel-border) !important;
}
html.tc-app body .nav-tabs .nav-link.active {
    color: var(--tc-text-main) !important;
    background: var(--tc-panel-bg-solid) !important;
    border-color: var(--tc-panel-border) var(--tc-panel-border) var(--tc-panel-bg-solid) !important;
}

/* The avatar image must fill the circular control without its legacy navbar offset. */
html.tc-app body .app-profile-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 3px;
    overflow: hidden;
    border: 1px solid var(--tc-panel-border);
    border-radius: 50%;
    background: var(--tc-panel-bg-soft);
}
html.tc-app body .app-profile-button .user-menu-avatar {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    vertical-align: initial;
}
html.tc-app body .app-topbar .dropdown-menu.show { display: block !important; }
