/**
 * Cyber Career Lab — design system + application styles.
 *
 * Structure:
 *   1. Tokens
 *   2. App canvas (standalone page)
 *   3. Base / reset (scoped to .ccs-app)
 *   4. Components  (reusable: card, button, badge, severity, status, progress,
 *                   empty state, panel, stat, icon button, avatar)
 *   5. Layout      (shell, sidebar, topbar, content, grids)
 *   6. Views       (dashboard, login gate)
 *   7. Responsive
 *
 * Everything is scoped under .ccs-app so styles never leak into the theme.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

.ccs-app,
.ccs-app-body {
	--ccs-bg: #080b12;
	--ccs-sidebar: #0b0f17;
	--ccs-card: #111620;
	--ccs-card-elevated: #151b26;
	--ccs-border: #202938;
	--ccs-border-strong: #2b3648;
	--ccs-text: #f5f7fa;
	--ccs-text-muted: #9aa6b2;
	--ccs-text-subtle: #6b7785;

	--ccs-accent: #38bdf8;
	--ccs-accent-hover: #0ea5e9;
	--ccs-accent-soft: rgba(56, 189, 248, 0.1);
	--ccs-accent-ink: #04121c;

	--ccs-success: #22c55e;
	--ccs-success-soft: rgba(34, 197, 94, 0.12);
	--ccs-warning: #f59e0b;
	--ccs-warning-soft: rgba(245, 158, 11, 0.12);
	--ccs-danger: #ef4444;
	--ccs-danger-soft: rgba(239, 68, 68, 0.12);
	--ccs-critical: #dc2626;

	--ccs-radius-sm: 8px;
	--ccs-radius: 10px;
	--ccs-radius-lg: 12px;

	--ccs-space-1: 4px;
	--ccs-space-2: 8px;
	--ccs-space-3: 12px;
	--ccs-space-4: 16px;
	--ccs-space-5: 24px;
	--ccs-space-6: 32px;
	--ccs-space-7: 48px;

	--ccs-sidebar-w: 260px;
	--ccs-topbar-h: 64px;

	--ccs-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ccs-font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

/* ==========================================================================
   2. App canvas (when the simulator replaces the theme)
   ========================================================================== */

html:has(body.ccs-app-body) {
	margin-top: 0 !important; /* admin-bar offset */
	background: var(--ccs-bg, #080b12);
}

body.ccs-app-body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background: var(--ccs-bg);
	color: var(--ccs-text);
	font-family: var(--ccs-font);
}

body.ccs-app-body.ccs-nav-open {
	overflow: hidden;
}

/* ==========================================================================
   3. Base / reset
   ========================================================================== */

.ccs-app {
	box-sizing: border-box;
	color: var(--ccs-text);
	font-family: var(--ccs-font);
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ccs-app *,
.ccs-app *::before,
.ccs-app *::after {
	box-sizing: inherit;
}

/* The hidden attribute must always win over component display rules. */
.ccs-app [hidden] {
	display: none !important;
}

/* :where() keeps this reset at low specificity so components always win. */
.ccs-app :where(h1, h2, h3, h4, p, ul, ol, li, dl, dd, figure) {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	list-style: none;
}

.ccs-app :where(a) {
	color: inherit;
	text-decoration: none;
}

.ccs-app button {
	font-family: inherit;
}

.ccs-app .ccs-icon {
	display: block;
	flex-shrink: 0;
}

.ccs-app :focus-visible {
	outline: 2px solid var(--ccs-accent);
	outline-offset: 2px;
}

/* ==========================================================================
   4. Components
   ========================================================================== */

/* Card ------------------------------------------------------------------- */

.ccs-card {
	background: var(--ccs-card);
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius-lg);
	padding: var(--ccs-space-5);
}

.ccs-card--elevated {
	background: var(--ccs-card-elevated);
}

/* Buttons ---------------------------------------------------------------- */

.ccs-app .ccs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ccs-space-2);
	min-height: 40px;
	padding: 0 var(--ccs-space-4);
	border: 1px solid transparent;
	border-radius: var(--ccs-radius-sm);
	background: transparent;
	color: var(--ccs-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ccs-app .ccs-btn--primary {
	background: var(--ccs-accent);
	color: var(--ccs-accent-ink);
}

.ccs-app .ccs-btn--primary:hover {
	background: var(--ccs-accent-hover);
	color: var(--ccs-accent-ink);
}

.ccs-app .ccs-btn--secondary {
	background: var(--ccs-card-elevated);
	border-color: var(--ccs-border-strong);
}

.ccs-app .ccs-btn--secondary:hover {
	border-color: var(--ccs-text-subtle);
}

.ccs-app .ccs-btn--ghost {
	color: var(--ccs-text-muted);
}

.ccs-app .ccs-btn--ghost:hover {
	background: var(--ccs-card-elevated);
	color: var(--ccs-text);
}

.ccs-app .ccs-btn--lg {
	min-height: 46px;
	padding: 0 var(--ccs-space-5);
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ccs-app .ccs-btn--block {
	width: 100%;
}

.ccs-app .ccs-btn:disabled,
.ccs-app .ccs-btn[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Icon button ------------------------------------------------------------ */

.ccs-app .ccs-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--ccs-radius-sm);
	background: transparent;
	color: var(--ccs-text-muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ccs-app .ccs-icon-btn:hover {
	background: var(--ccs-card-elevated);
	color: var(--ccs-text);
}

/* Badge ------------------------------------------------------------------ */

.ccs-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--ccs-space-1);
	padding: 2px 8px;
	border: 1px solid var(--ccs-border);
	border-radius: 999px;
	color: var(--ccs-text-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.ccs-badge--accent {
	border-color: transparent;
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
}

/* Severity (for incidents — Milestone 4+) -------------------------------- */

.ccs-sev {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	border-radius: var(--ccs-radius-sm);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ccs-sev::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.ccs-sev--low      { background: var(--ccs-success-soft); color: var(--ccs-success); }
.ccs-sev--medium   { background: var(--ccs-warning-soft); color: var(--ccs-warning); }
.ccs-sev--high     { background: var(--ccs-danger-soft);  color: var(--ccs-danger); }
.ccs-sev--critical { background: var(--ccs-critical);     color: #fff; }

/* Status pill + dot ------------------------------------------------------ */

.ccs-status-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--ccs-space-2);
	height: 32px;
	padding: 0 var(--ccs-space-3);
	border: 1px solid var(--ccs-border);
	border-radius: 999px;
	color: var(--ccs-text-muted);
	font-size: 13px;
	white-space: nowrap;
}

.ccs-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ccs-text-subtle);
}

.ccs-dot--success { background: var(--ccs-success); }
.ccs-dot--warning { background: var(--ccs-warning); }
.ccs-dot--danger  { background: var(--ccs-danger); }

/* Progress --------------------------------------------------------------- */

.ccs-progress {
	height: 6px;
	border-radius: 999px;
	background: var(--ccs-border);
	overflow: hidden;
}

.ccs-progress__bar {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ccs-accent);
}

/* Avatar ----------------------------------------------------------------- */

.ccs-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ccs-card-elevated);
	border: 1px solid var(--ccs-border-strong);
	color: var(--ccs-text);
	font-size: 12px;
	font-weight: 600;
}

/* Panel (card with header) ----------------------------------------------- */

.ccs-panel {
	display: flex;
	flex-direction: column;
	padding: 0;
}

.ccs-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccs-space-3);
	padding: var(--ccs-space-4) var(--ccs-space-5);
	border-bottom: 1px solid var(--ccs-border);
}

.ccs-panel__title {
	font-size: 15px;
	font-weight: 600;
}

/* Empty state ------------------------------------------------------------ */

.ccs-empty {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--ccs-space-2);
	padding: var(--ccs-space-7) var(--ccs-space-5);
	text-align: center;
}

.ccs-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: var(--ccs-space-2);
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius);
	background: var(--ccs-card-elevated);
	color: var(--ccs-text-muted);
}

.ccs-empty__title {
	font-size: 14px;
	font-weight: 600;
}

.ccs-empty__text {
	max-width: 340px;
	color: var(--ccs-text-muted);
	font-size: 13px;
}

/* Stat ------------------------------------------------------------------- */

.ccs-stat {
	display: flex;
	flex-direction: column;
	gap: var(--ccs-space-2);
	padding: var(--ccs-space-5);
}

.ccs-stat__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccs-space-2);
}

.ccs-stat__label {
	color: var(--ccs-text-muted);
	font-size: 13px;
	font-weight: 500;
}

.ccs-stat__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: var(--ccs-radius-sm);
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
}

.ccs-stat__icon--critical { background: var(--ccs-danger-soft);  color: var(--ccs-danger); }
.ccs-stat__icon--success  { background: var(--ccs-success-soft); color: var(--ccs-success); }

.ccs-stat__value {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.ccs-stat__meta {
	color: var(--ccs-text-subtle);
	font-size: 12px;
}

.ccs-stat .ccs-progress {
	margin-top: var(--ccs-space-1);
}

/* Inline notice ---------------------------------------------------------- */

.ccs-notice {
	min-height: 18px;
	color: var(--ccs-text-muted);
	font-size: 13px;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */

.ccs-shell {
	display: grid;
	grid-template-columns: var(--ccs-sidebar-w) minmax(0, 1fr);
	min-height: 100vh;
	background: var(--ccs-bg);
}

/* Sidebar ---------------------------------------------------------------- */

.ccs-sidebar {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow-y: auto;
	background: var(--ccs-sidebar);
	border-right: 1px solid var(--ccs-border);
	scrollbar-width: thin;
	scrollbar-color: var(--ccs-border) transparent;
}

.ccs-sidebar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--ccs-topbar-h);
	padding: 0 var(--ccs-space-5);
	border-bottom: 1px solid var(--ccs-border);
	flex-shrink: 0;
}

.ccs-sidebar__close {
	display: none !important;
}

.ccs-brand {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-3);
}

.ccs-brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--ccs-radius-sm);
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
}

.ccs-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.ccs-brand__name {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ccs-brand__sub {
	color: var(--ccs-text-subtle);
	font-size: 11px;
}

.ccs-role {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	margin: var(--ccs-space-4);
	padding: var(--ccs-space-3) var(--ccs-space-4);
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius);
	background: var(--ccs-card);
}

.ccs-role__label {
	color: var(--ccs-text-subtle);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ccs-role__title {
	margin-bottom: var(--ccs-space-1);
	font-size: 15px;
	font-weight: 600;
}

.ccs-nav {
	flex: 1;
	padding: 0 var(--ccs-space-3);
}

.ccs-nav__group + .ccs-nav__group {
	margin-top: var(--ccs-space-4);
}

.ccs-nav__heading {
	padding: var(--ccs-space-2) var(--ccs-space-3);
	color: var(--ccs-text-subtle);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ccs-nav__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ccs-app .ccs-nav__link {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-3);
	height: 38px;
	padding: 0 var(--ccs-space-3);
	border-radius: var(--ccs-radius-sm);
	color: var(--ccs-text-muted);
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ccs-app a.ccs-nav__link:hover {
	background: var(--ccs-card);
	color: var(--ccs-text);
}

.ccs-app .ccs-nav__link.is-current {
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
}

.ccs-app .ccs-nav__link.is-disabled {
	color: var(--ccs-text-subtle);
	cursor: default;
}

.ccs-nav__label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ccs-nav__tag {
	padding: 1px 6px;
	border: 1px solid var(--ccs-border);
	border-radius: 4px;
	color: var(--ccs-text-subtle);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ccs-sidebar__foot {
	padding: var(--ccs-space-3);
	border-top: 1px solid var(--ccs-border);
	flex-shrink: 0;
}

/* Main column ------------------------------------------------------------ */

.ccs-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ccs-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccs-space-4);
	height: var(--ccs-topbar-h);
	padding: 0 var(--ccs-space-6);
	border-bottom: 1px solid var(--ccs-border);
	background: var(--ccs-bg);
}

.ccs-topbar__left,
.ccs-topbar__right {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-3);
	min-width: 0;
}

.ccs-topbar__menu {
	display: none !important;
}

.ccs-topbar__title {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.ccs-topbar__crumb {
	color: var(--ccs-text-subtle);
	font-size: 12px;
}

.ccs-app .ccs-topbar__heading {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ccs-user {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-2);
	padding-left: var(--ccs-space-3);
	border-left: 1px solid var(--ccs-border);
}

.ccs-user__name {
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 500;
}

.ccs-content {
	width: 100%;
	max-width: 1560px;
	padding: var(--ccs-space-6);
}

/* Grids ------------------------------------------------------------------ */

.ccs-grid {
	display: grid;
	gap: var(--ccs-space-4);
	margin-bottom: var(--ccs-space-4);
}

.ccs-grid--stats {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ccs-grid--main {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ccs-grid__wide { grid-column: span 2; }
.ccs-grid__full { grid-column: 1 / -1; }

/* Overlay (mobile nav) --------------------------------------------------- */

.ccs-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(4, 6, 10, 0.7);
}

.ccs-overlay[hidden] {
	display: none;
}

/* ==========================================================================
   6. Views
   ========================================================================== */

/* Page header ------------------------------------------------------------ */

.ccs-page-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--ccs-space-5);
	margin-bottom: var(--ccs-space-6);
}

.ccs-app .ccs-page-title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
}

.ccs-page-subtitle {
	margin-top: var(--ccs-space-1) !important;
	color: var(--ccs-text-muted);
	font-size: 15px;
}

.ccs-page-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--ccs-space-2);
	flex-shrink: 0;
}

.ccs-page-actions .ccs-notice {
	text-align: right;
}

/* Login gate ------------------------------------------------------------- */

.ccs-gate {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: var(--ccs-space-5) var(--ccs-space-4);
	background: var(--ccs-bg);
}

.ccs-gate__inner {
	width: 100%;
	max-width: 400px;
}

.ccs-gate__brand {
	justify-content: center;
	margin-bottom: var(--ccs-space-5);
}

.ccs-gate__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--ccs-space-6);
	text-align: center;
}

.ccs-app .ccs-gate__title {
	margin-bottom: var(--ccs-space-2);
	font-size: 20px;
	font-weight: 700;
}

.ccs-gate__text {
	margin-bottom: var(--ccs-space-5) !important;
	color: var(--ccs-text-muted);
}

/* ==========================================================================
   6b. Components added in Milestones 2–12
   ========================================================================== */

/* Utilities --------------------------------------------------------------- */

.ccs-mono { font-family: var(--ccs-font-mono); font-size: 0.92em; }
.ccs-muted { color: var(--ccs-text-muted); }
.ccs-small { font-size: 12px; }
.ccs-nowrap { white-space: nowrap; }
.ccs-break { word-break: break-word; overflow-wrap: anywhere; }
.ccs-app .ccs-table td.ccs-wide { min-width: 240px; }
.ccs-accent { color: var(--ccs-accent); }
.ccs-text--success { color: var(--ccs-success) !important; }
.ccs-text--warning { color: var(--ccs-warning) !important; }
.ccs-text--danger  { color: var(--ccs-danger) !important; }
.ccs-text--muted   { color: var(--ccs-text-muted) !important; }
.ccs-hr { border: 0; border-top: 1px solid var(--ccs-border); margin: var(--ccs-space-4) 0; }

.ccs-app .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

.ccs-eyebrow {
	margin-bottom: var(--ccs-space-1) !important;
	color: var(--ccs-text-muted);
	font-size: 13px;
}

.ccs-section-title {
	margin: 0 0 var(--ccs-space-4) !important;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
}

.ccs-section-title:not(:first-child) { margin-top: var(--ccs-space-6) !important; }

.ccs-subtitle {
	margin: var(--ccs-space-5) 0 var(--ccs-space-3) !important;
	color: var(--ccs-text-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ccs-help {
	margin-top: var(--ccs-space-1) !important;
	color: var(--ccs-text-muted);
	font-size: 12px;
}

.ccs-prose p { margin-bottom: var(--ccs-space-3) !important; color: var(--ccs-text); line-height: 1.65; }
.ccs-prose p:last-child { margin-bottom: 0 !important; }

/* Links & small buttons --------------------------------------------------- */

.ccs-app .ccs-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ccs-accent);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}
.ccs-app .ccs-link:hover { text-decoration: underline; }
.ccs-app .ccs-link--danger { color: var(--ccs-danger); }

.ccs-app .ccs-btn--sm { min-height: 32px; padding: 0 var(--ccs-space-3); font-size: 13px; }
.ccs-btn-row { display: flex; flex-wrap: wrap; gap: var(--ccs-space-2); justify-content: flex-end; }

.ccs-notice.is-error { color: var(--ccs-danger); }

/* Sidebar extras ---------------------------------------------------------- */

.ccs-role__meta { display: flex; align-items: center; gap: var(--ccs-space-2); }
.ccs-role__readiness { color: var(--ccs-text-muted); font-size: 12px; }

.ccs-nav__count {
	min-width: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.ccs-app a.ccs-status-pill:hover { border-color: var(--ccs-border-strong); color: var(--ccs-text); }

/* Status & tags ----------------------------------------------------------- */

.ccs-status {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border: 1px solid var(--ccs-border);
	border-radius: 999px;
	color: var(--ccs-text-muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.ccs-status--assigned    { border-color: transparent; background: var(--ccs-accent-soft); color: var(--ccs-accent); }
.ccs-status--in_progress { border-color: transparent; background: var(--ccs-warning-soft); color: var(--ccs-warning); }
.ccs-status--submitted   { border-color: transparent; background: var(--ccs-success-soft); color: var(--ccs-success); }

.ccs-tag {
	display: inline-flex;
	align-items: center;
	padding: 1px 7px;
	border: 1px solid var(--ccs-border);
	border-radius: 4px;
	color: var(--ccs-text-muted);
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}
.ccs-tag--success { border-color: transparent; background: var(--ccs-success-soft); color: var(--ccs-success); }
.ccs-tag--danger  { border-color: transparent; background: var(--ccs-danger-soft); color: var(--ccs-danger); }
.ccs-tag--warning { border-color: transparent; background: var(--ccs-warning-soft); color: var(--ccs-warning); }
.ccs-tag--accent  { border-color: transparent; background: var(--ccs-accent-soft); color: var(--ccs-accent); }

.ccs-progress--success .ccs-progress__bar { background: var(--ccs-success); }
.ccs-progress--warning .ccs-progress__bar { background: var(--ccs-warning); }
.ccs-progress--danger  .ccs-progress__bar { background: var(--ccs-danger); }

.ccs-score-pill {
	display: inline-block;
	min-width: 40px;
	padding: 2px 8px;
	border-radius: var(--ccs-radius-sm);
	font-family: var(--ccs-font-mono);
	font-weight: 700;
	text-align: center;
}
.ccs-score-pill--success { background: var(--ccs-success-soft); color: var(--ccs-success); }
.ccs-score-pill--warning { background: var(--ccs-warning-soft); color: var(--ccs-warning); }
.ccs-score-pill--danger  { background: var(--ccs-danger-soft); color: var(--ccs-danger); }

/* Callouts ---------------------------------------------------------------- */

.ccs-callout {
	margin: var(--ccs-space-4) 0;
	padding: var(--ccs-space-3) var(--ccs-space-4);
	border: 1px solid var(--ccs-border);
	border-left: 3px solid var(--ccs-text-subtle);
	border-radius: var(--ccs-radius-sm);
	background: var(--ccs-card);
	color: var(--ccs-text-muted);
	font-size: 13px;
}
.ccs-callout--info    { border-left-color: var(--ccs-accent); }
.ccs-callout--warning { border-left-color: var(--ccs-warning); }

/* Lists ------------------------------------------------------------------- */

.ccs-list { display: flex; flex-direction: column; }

.ccs-list__item {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-3);
	padding: var(--ccs-space-3) var(--ccs-space-5);
	border-bottom: 1px solid var(--ccs-border);
}
.ccs-list__item:last-child { border-bottom: 0; }

.ccs-list__body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ccs-list__title { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

.ccs-skill-list { display: flex; flex-direction: column; gap: var(--ccs-space-4); padding: var(--ccs-space-5); }
.ccs-card > .ccs-skill-list,
.ccs-breakdown .ccs-skill-list { padding: 0; }
.ccs-panel > .ccs-skill-list { padding: var(--ccs-space-5); }
.ccs-skill-list__row { display: flex; justify-content: space-between; gap: var(--ccs-space-3); margin-bottom: 6px; font-size: 13px; }
.ccs-skill-list--detailed li { padding-bottom: var(--ccs-space-4); border-bottom: 1px solid var(--ccs-border); }
.ccs-skill-list--detailed li:last-child { padding-bottom: 0; border-bottom: 0; }
.ccs-skill-list__row .ccs-tag { margin-left: var(--ccs-space-2); }

.ccs-feed { display: flex; flex-direction: column; }
.ccs-feed__item {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-3);
	padding: var(--ccs-space-3) var(--ccs-space-5);
	border-bottom: 1px solid var(--ccs-border);
	font-size: 13px;
}
.ccs-feed__item:last-child { border-bottom: 0; }
.ccs-feed__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px;
	border-radius: var(--ccs-radius-sm);
	background: var(--ccs-card-elevated);
	color: var(--ccs-text-muted);
}
.ccs-feed__text { flex: 1; min-width: 0; }
.ccs-feed__time { color: var(--ccs-text-subtle); font-size: 12px; white-space: nowrap; }

.ccs-bullets { display: flex; flex-direction: column; gap: var(--ccs-space-3); }
.ccs-bullets li { position: relative; padding-left: 18px; font-size: 14px; }
.ccs-bullets li::before {
	content: "";
	position: absolute; left: 0; top: 8px;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--ccs-text-subtle);
}
.ccs-bullets--success li::before { background: var(--ccs-success); }
.ccs-bullets--danger li::before { background: var(--ccs-danger); }
.ccs-bullets__detail { display: block; margin-top: 2px; color: var(--ccs-text-muted); font-size: 13px; }

.ccs-delta-list { display: flex; flex-direction: column; gap: var(--ccs-space-2); }
.ccs-delta-list li { display: flex; justify-content: space-between; gap: var(--ccs-space-3); padding: 6px 0; border-bottom: 1px solid var(--ccs-border); font-size: 13px; }
.ccs-delta-list li:last-child { border-bottom: 0; }
.ccs-delta { margin-left: var(--ccs-space-2); font-weight: 700; }

.ccs-inline-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.ccs-steps-list { counter-reset: ccs-step; display: flex; flex-direction: column; gap: var(--ccs-space-3); }
.ccs-steps-list li { counter-increment: ccs-step; position: relative; padding-left: 34px; color: var(--ccs-text-muted); }
.ccs-steps-list li strong { color: var(--ccs-text); }
.ccs-steps-list li::before {
	content: counter(ccs-step);
	position: absolute; left: 0; top: 0;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--ccs-accent-soft);
	color: var(--ccs-accent);
	font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
}

/* Definition lists -------------------------------------------------------- */

.ccs-dl { display: grid; gap: var(--ccs-space-2); margin: 0; }
.ccs-dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: var(--ccs-space-3); font-size: 13px; }
.ccs-dl dt { color: var(--ccs-text-muted); }
.ccs-dl dd { margin: 0; word-break: break-word; }
.ccs-dl--stack > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-bottom: var(--ccs-space-3); border-bottom: 1px solid var(--ccs-border); }
.ccs-dl--stack > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ccs-dl--stack dt { color: var(--ccs-text); font-weight: 600; }
.ccs-dl--stack dd { color: var(--ccs-text-muted); }
.ccs-dl--review > div, .ccs-dl--compare > div { grid-template-columns: 200px minmax(0, 1fr); padding: var(--ccs-space-2) 0; border-bottom: 1px solid var(--ccs-border); }

/* Tables ------------------------------------------------------------------ */

.ccs-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ccs-app .ccs-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 13px;
}
.ccs-app .ccs-table th,
.ccs-app .ccs-table td {
	padding: 10px var(--ccs-space-4);
	border: 0;
	border-bottom: 1px solid var(--ccs-border);
	background: transparent;
	color: var(--ccs-text);
	text-align: left;
	vertical-align: top;
}
.ccs-app .ccs-table th {
	position: sticky; top: 0;
	background: var(--ccs-card-elevated);
	color: var(--ccs-text-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.ccs-app .ccs-table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.ccs-app .ccs-table td.ccs-table__action,
.ccs-app .ccs-table th.ccs-table__action {
	position: sticky;
	right: 0;
	z-index: 1;
	width: 1%;
	text-align: right;
	white-space: nowrap;
	background: var(--ccs-card);
	box-shadow: -1px 0 0 var(--ccs-border);
}
.ccs-app .ccs-table th.ccs-table__action { z-index: 2; background: var(--ccs-card-elevated); }
.ccs-app .ccs-table tr.ccs-row--key td.ccs-table__action { background: #121d1d; }
.ccs-app .ccs-table td.ccs-table__action:only-child { position: static; box-shadow: none; }
.ccs-app .ccs-table td.ccs-table__action .ccs-tag + .ccs-tag { margin-left: 4px; }

.ccs-app .ccs-table tr.ccs-row--key td { background: rgba(34, 197, 94, 0.05); }
.ccs-app .ccs-table tr.ccs-row--key td:first-child { box-shadow: inset 3px 0 0 var(--ccs-success); }
.ccs-app .ccs-table tr.ccs-row-note td {
	padding-top: 0;
	color: var(--ccs-text-muted);
	font-size: 12px;
	font-style: italic;
}

/* Evidence button --------------------------------------------------------- */

.ccs-app .ccs-ev-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 10px;
	border: 1px solid var(--ccs-border-strong);
	border-radius: var(--ccs-radius-sm);
	background: transparent;
	color: var(--ccs-text-muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}
.ccs-app .ccs-ev-btn:hover { border-color: var(--ccs-accent); color: var(--ccs-text); }
.ccs-app .ccs-ev-btn[aria-pressed="true"] { border-color: var(--ccs-accent); background: var(--ccs-accent-soft); color: var(--ccs-accent); }
.ccs-app .ccs-ev-btn:disabled { opacity: 0.6; cursor: wait; }

/* Tickets (incident queue) ----------------------------------------------- */

.ccs-tickets { display: flex; flex-direction: column; }

.ccs-ticket {
	display: flex;
	align-items: center;
	gap: var(--ccs-space-5);
	padding: var(--ccs-space-5);
	border-bottom: 1px solid var(--ccs-border);
	box-shadow: inset 3px 0 0 var(--ccs-text-subtle);
}
.ccs-ticket:last-child { border-bottom: 0; }
.ccs-ticket--low      { box-shadow: inset 3px 0 0 var(--ccs-success); }
.ccs-ticket--medium   { box-shadow: inset 3px 0 0 var(--ccs-warning); }
.ccs-ticket--high     { box-shadow: inset 3px 0 0 var(--ccs-danger); }
.ccs-ticket--critical { box-shadow: inset 3px 0 0 var(--ccs-critical); }

.ccs-ticket__main { flex: 1; min-width: 0; }
.ccs-ticket__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ccs-space-2); margin-bottom: var(--ccs-space-2); font-size: 13px; }
.ccs-app .ccs-ticket__title { margin-bottom: var(--ccs-space-1); font-size: 16px; font-weight: 600; }
.ccs-ticket__desc { margin-bottom: var(--ccs-space-3) !important; color: var(--ccs-text-muted); }
.ccs-ticket__facts { display: flex; flex-wrap: wrap; gap: var(--ccs-space-2) var(--ccs-space-6); margin: 0; }
.ccs-ticket__facts dt { color: var(--ccs-text-subtle); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ccs-ticket__facts dd { margin: 2px 0 0; font-size: 13px; }

/* Workspace --------------------------------------------------------------- */

.ccs-inc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccs-space-5);
	margin-bottom: var(--ccs-space-4);
}
.ccs-inc-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ccs-space-2); margin-bottom: var(--ccs-space-2); }
.ccs-app .ccs-inc-head__title { margin-bottom: var(--ccs-space-1); font-size: 22px; font-weight: 700; }

.ccs-workspace__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--ccs-space-4);
	align-items: start;
}
.ccs-workspace__main { min-width: 0; }
.ccs-workspace__side {
	position: sticky;
	top: calc(var(--ccs-topbar-h) + var(--ccs-space-4));
	display: flex;
	flex-direction: column;
	gap: var(--ccs-space-4);
}
.ccs-panel__body { padding: var(--ccs-space-4) var(--ccs-space-5); }

.ccs-tabs {
	display: flex;
	gap: 2px;
	margin-bottom: var(--ccs-space-3);
	padding: 4px;
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius);
	background: var(--ccs-sidebar);
	overflow-x: auto;
	scrollbar-width: thin;
}
.ccs-app .ccs-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 0;
	border-radius: var(--ccs-radius-sm);
	background: transparent;
	color: var(--ccs-text-muted);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}
.ccs-app .ccs-tab:hover { color: var(--ccs-text); }
.ccs-app .ccs-tab[aria-selected="true"] { background: var(--ccs-card-elevated); color: var(--ccs-text); box-shadow: inset 0 0 0 1px var(--ccs-border-strong); }
.ccs-tab__count {
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ccs-border);
	color: var(--ccs-text-muted);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
}
.ccs-tabpanel--flush { padding: 0; overflow: hidden; }
.ccs-tabpanel[hidden] { display: none; }

.ccs-entities { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--ccs-space-3); }
.ccs-entity { padding: var(--ccs-space-4); border: 1px solid var(--ccs-border); border-radius: var(--ccs-radius); background: var(--ccs-card-elevated); }
.ccs-entity__head { display: flex; align-items: center; gap: var(--ccs-space-2); margin-bottom: var(--ccs-space-3); }
.ccs-entity .ccs-dl > div { grid-template-columns: 100px minmax(0, 1fr); }

.ccs-tabpanel .ccs-table-wrap { border: 1px solid var(--ccs-border); border-radius: var(--ccs-radius-sm); }
.ccs-tabpanel--flush .ccs-table-wrap { border: 0; border-radius: 0; }

.ccs-evlist { display: flex; flex-direction: column; gap: var(--ccs-space-3); max-height: 340px; overflow-y: auto; }
.ccs-evlist--detailed { max-height: none; }
.ccs-evlist__item { padding: var(--ccs-space-3); border: 1px solid var(--ccs-border); border-radius: var(--ccs-radius-sm); background: var(--ccs-card-elevated); }
.ccs-evlist__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ccs-space-2); margin-bottom: 4px; font-size: 11px; }
.ccs-evlist__text { margin-bottom: 6px !important; font-size: 13px; }
.ccs-evlist__empty { color: var(--ccs-text-muted); font-size: 13px; }

/* Form fields ------------------------------------------------------------- */

.ccs-app .ccs-input {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ccs-border-strong);
	border-radius: var(--ccs-radius-sm);
	background: var(--ccs-bg);
	color: var(--ccs-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: none;
	resize: vertical;
}
.ccs-app .ccs-input:focus { border-color: var(--ccs-accent); outline: none; box-shadow: 0 0 0 3px var(--ccs-accent-soft); }
.ccs-app .ccs-input[readonly] { opacity: 0.8; }
.ccs-notes { min-height: 180px; font-size: 13px; }

.ccs-field { margin-bottom: var(--ccs-space-5); }
.ccs-field:last-child { margin-bottom: 0; }
.ccs-label { display: block; font-weight: 600; }
.ccs-field .ccs-input { margin-top: var(--ccs-space-2); }

.ccs-save-state { color: var(--ccs-text-subtle); font-size: 12px; }

/* Choice cards ------------------------------------------------------------ */

.ccs-choices { display: grid; gap: var(--ccs-space-2); }
.ccs-choices--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.ccs-app .ccs-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--ccs-space-3);
	margin: 0;
	padding: var(--ccs-space-3) var(--ccs-space-4);
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius);
	background: var(--ccs-card-elevated);
	cursor: pointer;
	transition: border-color 0.15s ease;
}
.ccs-app .ccs-choice:hover { border-color: var(--ccs-border-strong); }
.ccs-app .ccs-choice:has(input:checked) { border-color: var(--ccs-accent); background: var(--ccs-accent-soft); }
.ccs-app .ccs-choice input { flex-shrink: 0; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ccs-accent); }
.ccs-choice__body { display: flex; flex-direction: column; gap: 2px; }
.ccs-choice__title { font-weight: 600; font-size: 14px; }
.ccs-choice__desc { color: var(--ccs-text-muted); font-size: 12px; }

/* Stepper ----------------------------------------------------------------- */

.ccs-app fieldset.ccs-step { min-width: 0; margin: 0 0 var(--ccs-space-4); }
.ccs-app fieldset.ccs-step legend { float: left; width: 100%; }
.ccs-app fieldset.ccs-step legend + * { clear: both; }
.ccs-step[hidden] { display: none !important; }

.ccs-stepper__nav { display: flex; gap: var(--ccs-space-2); margin-bottom: var(--ccs-space-4); overflow-x: auto; }
.ccs-stepper__navitem {
	display: flex;
	flex: 1;
	align-items: center;
	gap: var(--ccs-space-2);
	min-width: 140px;
	padding: var(--ccs-space-3);
	border: 1px solid var(--ccs-border);
	border-radius: var(--ccs-radius-sm);
	color: var(--ccs-text-muted);
	font-size: 13px;
}
.ccs-stepper__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--ccs-border);
	font-size: 12px; font-weight: 700;
}
.ccs-stepper__navitem.is-current { border-color: var(--ccs-accent); color: var(--ccs-text); }
.ccs-stepper__navitem.is-current .ccs-stepper__num { background: var(--ccs-accent); color: var(--ccs-accent-ink); }
.ccs-stepper__navitem.is-done .ccs-stepper__num { background: var(--ccs-success-soft); color: var(--ccs-success); }

.ccs-stepper__footer { display: flex; align-items: center; gap: var(--ccs-space-3); }
.ccs-stepper__footer .ccs-notice { flex: 1; text-align: right; }
.ccs-stepper__footer [data-ccs-step-prev][hidden] + .ccs-notice { margin-left: 0; }

/* Results ----------------------------------------------------------------- */

.ccs-grid--results { grid-template-columns: 320px minmax(0, 1fr); }
.ccs-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ccs-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ccs-grid--three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ccs-space-6); margin: 0; }

.ccs-score { display: flex; flex-direction: column; justify-content: center; gap: var(--ccs-space-2); }
.ccs-score__value { font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ccs-score__value span { margin-left: 4px; color: var(--ccs-text-subtle); font-size: 22px; font-weight: 600; }
.ccs-score__verdict { color: var(--ccs-text); font-weight: 500; }

.ccs-debrief { margin-bottom: var(--ccs-space-4); }
.ccs-debrief .ccs-dl { margin-bottom: var(--ccs-space-5); }

.ccs-rec { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ccs-space-2); margin-top: var(--ccs-space-2); padding: var(--ccs-space-4); border: 1px solid var(--ccs-border); border-radius: var(--ccs-radius); background: var(--ccs-card-elevated); }
.ccs-rec__meta { display: flex; align-items: center; gap: var(--ccs-space-2); }
.ccs-rec__title { font-weight: 600; }

.ccs-stat__value--sm { font-size: 20px; }

/* Score history chart ----------------------------------------------------- */

.ccs-chart {
	display: flex;
	align-items: flex-end;
	gap: var(--ccs-space-3);
	height: 240px;
	padding: var(--ccs-space-5) var(--ccs-space-5) var(--ccs-space-3);
	overflow-x: auto;
}
.ccs-app .ccs-chart__bar {
	display: flex;
	flex: 0 0 56px;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: 4px;
	height: 100%;
}
.ccs-chart__fill { width: 32px; border-radius: 4px 4px 0 0; background: var(--ccs-accent); }
.ccs-chart__fill--success { background: var(--ccs-success); }
.ccs-chart__fill--warning { background: var(--ccs-warning); }
.ccs-chart__fill--danger { background: var(--ccs-danger); }
.ccs-chart__value { font-size: 12px; font-weight: 700; }
.ccs-chart__label { color: var(--ccs-text-subtle); font-size: 10px; }

/* Career ------------------------------------------------------------------ */

.ccs-career-now { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ccs-space-5); margin-bottom: var(--ccs-space-4); }
.ccs-career-now__title { margin-top: var(--ccs-space-1) !important; font-size: 22px; font-weight: 700; }
.ccs-req { display: flex; flex-direction: column; gap: 4px; margin-top: var(--ccs-space-2); font-size: 13px; }
.ccs-req li { color: var(--ccs-text-muted); }
.ccs-req li::before { content: "○ "; }
.ccs-req li.is-met { color: var(--ccs-success); }
.ccs-req li.is-met::before { content: "● "; }

.ccs-roadmap { display: flex; flex-direction: column; gap: var(--ccs-space-3); }
.ccs-roadmap__item { display: flex; align-items: center; gap: var(--ccs-space-4); padding: var(--ccs-space-4) var(--ccs-space-5); }
.ccs-roadmap__item > div { flex: 1; }
.ccs-roadmap__item.is-locked { opacity: 0.6; }
.ccs-roadmap__item.is-current { border-color: var(--ccs-accent); }
.ccs-roadmap__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--ccs-card-elevated);
	border: 1px solid var(--ccs-border-strong);
	font-weight: 700;
}
.ccs-roadmap__item.is-done .ccs-roadmap__num { background: var(--ccs-success-soft); border-color: transparent; color: var(--ccs-success); }
.ccs-roadmap__item.is-current .ccs-roadmap__num { background: var(--ccs-accent); border-color: transparent; color: var(--ccs-accent-ink); }
.ccs-roadmap__title { font-weight: 600; }

.ccs-empty--page { padding: 80px var(--ccs-space-5); }

/* ==========================================================================
   7. Responsive
   ========================================================================== */

@media (max-width: 1200px) {
	.ccs-grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
	.ccs-workspace__grid { grid-template-columns: minmax(0, 1fr); }
	.ccs-workspace__side { position: static; }
	.ccs-grid--results { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
	.ccs-grid--two,
	.ccs-grid--three-cols { grid-template-columns: minmax(0, 1fr); }

	.ccs-shell {
		grid-template-columns: minmax(0, 1fr);
	}

	.ccs-sidebar {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 100;
		width: min(var(--ccs-sidebar-w), 85vw);
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 0.2s ease, visibility 0.2s;
	}

	.ccs-shell.is-nav-open .ccs-sidebar {
		transform: translateX(0);
		visibility: visible;
	}

	.ccs-sidebar__close,
	.ccs-topbar__menu {
		display: inline-flex !important;
	}

	.ccs-topbar { padding: 0 var(--ccs-space-4); }

	.ccs-content { padding: var(--ccs-space-5) var(--ccs-space-4); }

	.ccs-grid--main { grid-template-columns: minmax(0, 1fr); }

	.ccs-grid__wide { grid-column: auto; }
}

@media (max-width: 640px) {
	.ccs-page-head {
		flex-direction: column;
		align-items: stretch;
		margin-bottom: var(--ccs-space-5);
	}

	.ccs-app .ccs-page-title { font-size: 22px; }

	.ccs-page-actions { align-items: stretch; }

	.ccs-page-actions .ccs-notice { text-align: left; }

	.ccs-app .ccs-btn--lg { width: 100%; }

	.ccs-user__name,
	.ccs-status-pill { display: none; }

	.ccs-user { padding-left: 0; border-left: 0; }

	.ccs-stat { padding: var(--ccs-space-4); }

	.ccs-stat__value { font-size: 24px; }

	.ccs-grid--3 { grid-template-columns: minmax(0, 1fr); }

	.ccs-ticket { flex-direction: column; align-items: stretch; gap: var(--ccs-space-3); padding: var(--ccs-space-4); }
	.ccs-ticket__action .ccs-btn { width: 100%; }

	.ccs-inc-head { flex-direction: column; align-items: stretch; }
	.ccs-inc-head__actions .ccs-btn { width: 100%; }

	.ccs-list__item { flex-wrap: wrap; padding: var(--ccs-space-3) var(--ccs-space-4); }

	.ccs-dl--review > div,
	.ccs-dl--compare > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }

	.ccs-stepper__navitem { min-width: auto; }
	.ccs-stepper__label { display: none; }
	.ccs-stepper__navitem.is-current .ccs-stepper__label { display: inline; }

	.ccs-stepper__footer { flex-wrap: wrap; }
	.ccs-stepper__footer .ccs-notice { order: -1; flex-basis: 100%; text-align: left; }

	.ccs-btn-row { justify-content: stretch; }
	.ccs-btn-row .ccs-btn { flex: 1; }

	.ccs-score__value { font-size: 52px; }
}

@media (max-width: 380px) {
	.ccs-grid--stats { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.ccs-app *,
	.ccs-sidebar { transition: none !important; }
}
