/* Combat Clarity styles on top of Bootstrap + tokens.css. Colours only via --cc-* tokens (light + dark come for free);
   design plan: reference/design/combat-clarity-design/DESIGN_PLAN.md. Components are prefixed cc-. */

/* ---------- Base ---------- */
body {
	background: var(--cc-bg);
	color: var(--cc-text);
	-webkit-font-smoothing: antialiased;
}

main.container-fluid, .cc-navbar > .container-fluid, .app-footer > .container-fluid, .cc-strip > .container-fluid {
	max-width: var(--cc-page-max);
}

table, .cc-num, .cc-stat, .cc-tnum {
	font-feature-settings: "tnum" 1, "cv11" 1;
	font-variant-numeric: tabular-nums;
}

main h1, main .cc-h1 { font-size: var(--cc-fs-display); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
main h2.h5, main .cc-h2 { font-size: var(--cc-fs-h2); line-height: 1.4; font-weight: 600; }
main h3.h6, main .cc-h3, .card-header { font-size: var(--cc-fs-h3); font-weight: 600; }
.prose, .analysis { max-width: 70ch; }
code { font-size: .875em; }
a { text-underline-offset: 2px; }

.breadcrumb { --bs-breadcrumb-divider-color: var(--cc-text-muted); --bs-breadcrumb-item-active-color: var(--cc-text-muted);
	font-size: var(--cc-fs-small); margin-bottom: .5rem; }

.cc-ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.cc-ic-sm { width: 1em; height: 1em; vertical-align: -.15em; }
.cc-ic-lg { width: 2.5rem; height: 2.5rem; }

/* ---------- Navbar (light, 64 px) ---------- */
.cc-navbar {
	background: var(--cc-surface);
	border-bottom: 1px solid var(--cc-border);
	min-height: 64px;
	--bs-navbar-color: var(--cc-text-muted);
	--bs-navbar-hover-color: var(--cc-text);
	--bs-navbar-active-color: var(--cc-accent-strong);
	--bs-navbar-brand-color: var(--cc-text);
	--bs-navbar-brand-hover-color: var(--cc-text);
}
.cc-brand { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em; }
.cc-brand b { font-weight: 700; color: var(--cc-accent-strong); }
.cc-nav { gap: 2px; }
.cc-nav .nav-link { display: flex; align-items: center; gap: 6px; padding: 6px 12px !important; border-radius: var(--cc-radius-pill);
	font-weight: 500; font-size: .875rem; }
.cc-nav .nav-link.active { background: var(--cc-accent-soft); color: var(--cc-accent-strong); }
.cc-nav .nav-link:hover:not(.active) { background: var(--cc-surface-2); }
.cc-nav .nav-link .cc-ic, .cc-nav .nav-link .bi { width: 18px; height: 18px; font-size: 1rem; line-height: 1; }
.cc-nav-tools { margin-left: .5rem; }

.cc-toggle { display: inline-flex; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-pill); padding: 3px; background: var(--cc-surface-2); }
.cc-toggle button { border: 0; background: transparent; color: var(--cc-text-muted); border-radius: var(--cc-radius-pill);
	padding: 3px 9px; line-height: 1; display: flex; align-items: center; }
.cc-toggle button[aria-pressed="true"] { background: var(--cc-surface); color: var(--cc-accent-strong); box-shadow: var(--cc-shadow-1); }
.cc-toggle button:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 1px; }
.cc-btn-icon { --bs-btn-padding-x: 9px; --bs-btn-padding-y: 5px; --bs-btn-bg: var(--cc-surface); --bs-btn-border-color: var(--cc-border);
	--bs-btn-color: var(--cc-text-muted); --bs-btn-hover-bg: var(--cc-surface); --bs-btn-hover-border-color: var(--cc-accent);
	--bs-btn-hover-color: var(--cc-accent-strong); --bs-btn-active-bg: var(--cc-accent-soft); --bs-btn-active-border-color: var(--cc-accent);
	--bs-btn-active-color: var(--cc-accent-strong); line-height: 1; }
:root[data-density="compact"] .cc-when-comfortable, :root:not([data-density="compact"]) .cc-when-compact { display: none; }
[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

.app-footer { color: var(--cc-text-muted); border-top: 1px solid var(--cc-border); background: var(--cc-surface); }

/* ---------- Bootstrap components, restyled ---------- */
.card { box-shadow: var(--cc-shadow-1); }
.card-header { background: var(--cc-surface); border-bottom-color: var(--cc-border); padding-top: 14px; padding-bottom: 14px; }
.alert { border-radius: var(--cc-radius); border: 0; }
.list-group-item { padding: var(--cc-cell-y) var(--cc-cell-x); }

.btn { font-weight: 600; border-radius: 8px; }
.btn:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; box-shadow: none; }
.btn-primary {
	--bs-btn-color: var(--cc-on-accent); --bs-btn-hover-color: var(--cc-on-accent); --bs-btn-active-color: var(--cc-on-accent);
	--bs-btn-disabled-color: var(--cc-on-accent);
	--bs-btn-bg: var(--cc-accent); --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--cc-accent-hover);
	--bs-btn-hover-border-color: transparent; --bs-btn-active-bg: var(--cc-accent-hover); --bs-btn-active-border-color: transparent;
	--bs-btn-disabled-bg: var(--cc-accent); --bs-btn-disabled-border-color: transparent;
	background-image: linear-gradient(135deg, var(--cc-btn-a), var(--cc-btn-b));
	box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 2px 6px color-mix(in srgb, var(--cc-btn-b) 25%, transparent);
	transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 14px color-mix(in srgb, var(--cc-btn-b) 30%, transparent); }
.btn-outline-primary, .btn-outline-secondary, .btn-secondary, .btn-light {
	--bs-btn-color: var(--cc-text); --bs-btn-bg: var(--cc-surface); --bs-btn-border-color: var(--cc-border-strong);
	--bs-btn-hover-color: var(--cc-accent-strong); --bs-btn-hover-bg: var(--cc-surface); --bs-btn-hover-border-color: var(--cc-accent);
	--bs-btn-active-color: var(--cc-accent-strong); --bs-btn-active-bg: var(--cc-accent-soft); --bs-btn-active-border-color: var(--cc-accent);
	--bs-btn-disabled-color: var(--cc-text-muted); --bs-btn-disabled-bg: var(--cc-surface); --bs-btn-disabled-border-color: var(--cc-border);
}
.btn-outline-secondary { --bs-btn-color: var(--cc-text-muted); }
.btn-outline-danger, .btn-danger {
	--bs-btn-color: var(--cc-high-text); --bs-btn-bg: var(--cc-surface); --bs-btn-border-color: var(--cc-border-strong);
	--bs-btn-hover-color: var(--cc-high-text); --bs-btn-hover-bg: var(--cc-high-soft); --bs-btn-hover-border-color: var(--cc-high);
	--bs-btn-active-color: var(--cc-high-text); --bs-btn-active-bg: var(--cc-high-soft); --bs-btn-active-border-color: var(--cc-high);
}
.btn-success, .btn-outline-success {
	--bs-btn-color: var(--cc-better-text); --bs-btn-bg: var(--cc-surface); --bs-btn-border-color: var(--cc-border-strong);
	--bs-btn-hover-color: var(--cc-better-text); --bs-btn-hover-bg: var(--cc-better-soft); --bs-btn-hover-border-color: var(--cc-better);
}
.btn-ghost { --bs-btn-color: var(--cc-text-muted); --bs-btn-hover-bg: var(--cc-surface-2); --bs-btn-hover-color: var(--cc-text); }
.btn-link { --bs-btn-color: var(--cc-accent); --bs-btn-hover-color: var(--cc-accent-hover); font-weight: 500; }
.cc-spark { animation: cc-twinkle 2.4s ease-in-out infinite; transform-origin: 10.5px 10.5px; transform-box: view-box; }
@keyframes cc-twinkle { 50% { opacity: .55; transform: scale(.85); } }

/* ---------- Data tables (C13) ---------- */
.table { font-size: var(--cc-fs-cell); }
.table > :not(caption) > * > * { padding: var(--cc-cell-y) var(--cc-cell-x); border-bottom-color: var(--cc-border); }
.table-sm > :not(caption) > * > * { padding: var(--cc-cell-sm-y) var(--cc-cell-sm-x); }
.table > thead > tr > th, .table > thead > tr > td {
	background: var(--cc-surface-2); color: var(--cc-text-subtle); font-size: var(--cc-fs-small); font-weight: 600;
	text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; vertical-align: bottom;
}
.table-sticky thead th { position: sticky; top: 0; z-index: 1; }
.table .cc-row-you > * { background: var(--cc-accent-soft) !important; font-weight: 600; }
.table .cc-row-ref > * { color: var(--cc-text-muted); font-style: italic; }
.card > .table, .card-body.p-0 > .table, .card > .table-responsive > .table { margin-bottom: 0; }

/* ---------- Semantic colours (no Bootstrap colour utilities in templates) ---------- */
.cc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--cc-radius-pill);
	font-size: var(--cc-fs-small); font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--cc-surface-2); color: var(--cc-text-subtle); }
.cc-badge .cc-ic, .cc-badge .bi { width: 14px; height: 14px; font-size: .8rem; }
.cc-badge--better, .cc-badge--ok { background: var(--cc-better-soft); color: var(--cc-better-text); }
.cc-badge--worse { background: var(--cc-worse-soft); color: var(--cc-worse-text); }
.cc-badge--high { background: var(--cc-high-soft); color: var(--cc-high-text); }
.cc-badge--medium { background: var(--cc-medium-soft); color: var(--cc-medium-text); }
.cc-badge--low, .cc-badge--neutral { background: var(--cc-low-soft); color: var(--cc-low-text); }
.cc-badge--accent { background: var(--cc-accent-soft); color: var(--cc-accent-strong); }
.cc-badge--solid { background: var(--cc-accent); color: var(--cc-on-accent); }
.cc-text--better, .cc-text--ok { color: var(--cc-better-text) !important; }
.cc-text--worse { color: var(--cc-worse-text) !important; }
.cc-text--high { color: var(--cc-high-text) !important; }
.cc-text--medium { color: var(--cc-medium-text) !important; }
.cc-text--muted { color: var(--cc-text-muted) !important; }
.cc-text--accent { color: var(--cc-accent-strong) !important; }
.cc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cc-ref); flex: none; }
.cc-dot--better, .cc-dot--ok { background: var(--cc-better); }
.cc-dot--worse { background: var(--cc-worse); }
.cc-dot--high { background: var(--cc-high); }
.cc-dot--medium { background: var(--cc-medium); }
.cc-dot--neutral { background: var(--cc-ref); }

/* ---------- C16 status pill, key badge, result pill ---------- */
.cc-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--cc-radius-pill); padding: 2px 10px 2px 7px;
	font-size: var(--cc-fs-small); font-weight: 600; white-space: nowrap; background: var(--cc-surface-2); color: var(--cc-text-subtle); }
.cc-pill .cc-ic, .cc-pill .bi { width: 15px; height: 15px; font-size: .85rem; }
.cc-pill--done, .cc-pill--better { background: var(--cc-better-soft); color: var(--cc-better-text); }
.cc-pill--failed, .cc-pill--high { background: var(--cc-high-soft); color: var(--cc-high-text); }
.cc-pill--worse { background: var(--cc-worse-soft); color: var(--cc-worse-text); }
.cc-pill--paused, .cc-pill--medium, .cc-pill--partial { background: var(--cc-medium-soft); color: var(--cc-medium-text); }
.cc-pill--running, .cc-pill--queued, .cc-pill--accent { background: var(--cc-accent-soft); color: var(--cc-accent-strong); }
.cc-pill--running::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: cc-pulse 1.2s infinite; }
@keyframes cc-pulse { 50% { opacity: .3; } }
.cc-key { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: var(--cc-radius-pill);
	background: var(--cc-surface); border: 1px solid var(--cc-border); font-weight: 600; white-space: nowrap; }
.cc-key-lvl, .cc-lvl { display: inline-grid; place-items: center; min-width: 34px; height: 26px; border-radius: var(--cc-radius-pill);
	background: linear-gradient(135deg, var(--cc-btn-a), var(--cc-btn-b)); color: var(--cc-on-accent); font-size: .8125rem;
	font-weight: 700; padding: 0 8px; font-variant-numeric: tabular-nums; }
.cc-lvl { height: 22px; min-width: 30px; font-size: .75rem; padding: 0 6px; vertical-align: .05em; }
h1 .cc-lvl { height: 30px; min-width: 44px; font-size: 1rem; vertical-align: .2em; }

/* ---------- C14 player chip ---------- */
.cc-player { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cc-class { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc-ref); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); flex: none; }
.cc-player small { color: var(--cc-text-muted); }
.cc-player .cc-ic { width: 16px; height: 16px; color: var(--cc-text-muted); }
.cc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 8px; background: var(--cc-surface-2);
	font-size: .84rem; font-weight: 500; }
.cc-class--deathknight { background: var(--class-deathknight); } .cc-class--demonhunter { background: var(--class-demonhunter); }
.cc-class--druid { background: var(--class-druid); } .cc-class--evoker { background: var(--class-evoker); }
.cc-class--hunter { background: var(--class-hunter); } .cc-class--mage { background: var(--class-mage); }
.cc-class--monk { background: var(--class-monk); } .cc-class--paladin { background: var(--class-paladin); }
.cc-class--priest { background: var(--class-priest); } .cc-class--rogue { background: var(--class-rogue); }
.cc-class--shaman { background: var(--class-shaman); } .cc-class--warlock { background: var(--class-warlock); }
.cc-class--warrior { background: var(--class-warrior); }

/* ---------- C1 stat tile + C2 delta ---------- */
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cc-stat { background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-1);
	padding: 14px 16px; min-width: 0; }
.cc-stat-label { display: flex; align-items: center; gap: 7px; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
	font-weight: 600; color: var(--cc-text-muted); }
.cc-stat-label .cc-ic, .cc-stat-label .bi { width: 16px; height: 16px; color: var(--cc-accent); font-size: .95rem; }
.cc-stat-value { font-size: var(--cc-fs-stat); font-weight: 600; line-height: 1.2; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-stat-value small { font-size: .55em; font-weight: 500; color: var(--cc-text-muted); }
.cc-stat-sub { font-size: .8125rem; color: var(--cc-text-muted); margin-top: 2px; }
.cc-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: .8125rem; white-space: nowrap; color: var(--cc-text-muted); }
.cc-delta--better { color: var(--cc-better-text); }
.cc-delta--worse { color: var(--cc-worse-text); }

/* ---------- C3 bullet bar ---------- */
.cc-bar { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cc-bar-track { position: relative; display: inline-block; width: var(--w, 100px); height: 8px; border-radius: 4px; background: var(--cc-surface-2);
	box-shadow: inset 0 0 0 1px var(--cc-border); flex: none; }
.cc-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(min(var(--v, 0), 100) * 1%); border-radius: 4px; background: var(--cc-ref); }
.cc-bar--better .cc-bar-fill { background: var(--cc-better); }
.cc-bar--worse .cc-bar-fill { background: var(--cc-worse); }
.cc-bar--accent .cc-bar-fill { background: var(--cc-accent); }
.cc-bar-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; left: calc(min(var(--t, 100), 100) * 1% - 1px); background: var(--cc-text-subtle); border-radius: 1px; }
.cc-bar-tick--q { background: var(--cc-ref); width: 1px; }
.cc-bar-num { min-width: 3.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- C4 diverging bar ---------- */
.cc-diverge { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cc-diverge-track { position: relative; display: inline-block; width: var(--w, 140px); height: 10px; flex: none; }
.cc-diverge-track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--cc-border-strong); }
.cc-diverge-track::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--cc-surface-2); }
.cc-diverge-fill { position: absolute; top: 0; bottom: 0; z-index: 1; border-radius: 3px; }
.cc-diverge--worse .cc-diverge-fill { right: 50%; width: calc(min(var(--v, 0), 100) * .5%); background: var(--cc-worse); }
.cc-diverge--better .cc-diverge-fill { left: 50%; width: calc(min(var(--v, 0), 100) * .5%); background: var(--cc-better); }
.cc-diverge--neutral .cc-diverge-fill { left: calc(50% - 1px); width: 2px; background: var(--cc-ref); }

/* ---------- C5 composition bar ---------- */
.cc-split { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--cc-surface-2); font-size: .75rem; font-weight: 600; }
.cc-split > span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap;
	width: calc(var(--v) * 1%); color: var(--cc-on-accent); padding: 0 4px; }
.cc-split .cc-seg-1 { background: var(--cc-chart-1); }
.cc-split .cc-seg-2 { background: var(--cc-chart-2); }
.cc-split .cc-seg-3 { background: var(--cc-chart-3); }
.cc-split .cc-seg-4 { background: var(--cc-chart-4); }
.cc-split .cc-seg-5 { background: var(--cc-chart-5); }
.cc-split-row { display: grid; grid-template-columns: 7rem 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--cc-fs-small); color: var(--cc-text-muted); }
.cc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.cc-legend .cc-c1 { background: var(--cc-chart-1); } .cc-legend .cc-c2 { background: var(--cc-chart-2); }
.cc-legend .cc-c3 { background: var(--cc-chart-3); } .cc-legend .cc-c4 { background: var(--cc-chart-4); }
.cc-legend .cc-c5 { background: var(--cc-chart-5); }

/* ---------- C6 pull timeline ---------- */
.cc-timeline { position: relative; padding-top: 8px; }
.cc-tl-row { position: relative; height: 34px; background: var(--cc-surface-2); border-radius: 6px; }
.cc-tl-row--ref { height: 14px; margin-top: 18px; background: transparent; }
.cc-tl-row--ref::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; border-top: 1px dashed var(--cc-border-strong); }
.cc-tl-pull { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; background: color-mix(in srgb, var(--cc-accent) 30%, var(--cc-surface));
	border: 1px solid color-mix(in srgb, var(--cc-accent) 45%, transparent); cursor: pointer; padding: 0; min-width: 3px; overflow: hidden; }
.cc-tl-pull--boss { background: var(--cc-accent); border-color: var(--cc-accent-hover); }
.cc-tl-pull:hover, .cc-tl-pull:focus-visible { outline: 2px solid var(--cc-accent-strong); outline-offset: 1px; z-index: 2; }
.cc-tl-down { position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--v, 0) * 1%);
	background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--cc-surface) 70%, transparent) 3px 6px); }
.cc-tl-lust { position: absolute; top: -7px; height: 4px; border-radius: 2px; background: var(--cc-medium); }
.cc-tl-death { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; color: var(--cc-high); z-index: 3; pointer-events: none;
	background: var(--cc-surface); border-radius: 50%; padding: 1px; }
.cc-tl-cd { position: absolute; bottom: -10px; width: 2px; height: 6px; margin-left: -1px; background: var(--cc-better); border-radius: 1px; }
.cc-tl-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--cc-text-subtle); border-radius: 1px; }
.cc-tl-axis { position: relative; height: 18px; margin-top: 14px; font-size: .75rem; color: var(--cc-text-muted); font-variant-numeric: tabular-nums; }
.cc-tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.cc-tl-label { font-size: var(--cc-fs-small); color: var(--cc-text-muted); font-weight: 600; margin: 0 0 4px; }
.cc-legend .cc-l-boss { background: var(--cc-accent); } .cc-legend .cc-l-trash { background: color-mix(in srgb, var(--cc-accent) 30%, var(--cc-surface)); }
.cc-legend .cc-l-lust { background: var(--cc-medium); height: 4px; } .cc-legend .cc-l-cd { background: var(--cc-better); width: 3px; }
.cc-legend .cc-l-down { background: repeating-linear-gradient(135deg, var(--cc-ref) 0 2px, transparent 2px 4px); }
.cc-legend .cc-l-ref { border-top: 2px dashed var(--cc-border-strong); height: 0; border-radius: 0; }
.cc-legend .cc-ic { width: 14px; height: 14px; color: var(--cc-high); vertical-align: -2px; margin-right: 3px; }

/* ---------- C7 finding card, C8 improvement card ---------- */
.cc-finding { --sev: var(--cc-low); display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--cc-border); border-left: 4px solid var(--sev);
	background: var(--cc-surface); border-radius: 0 var(--cc-radius) var(--cc-radius) 0; }
.cc-finding + .cc-finding { margin-top: 8px; }
.cc-finding > .cc-ic, .cc-finding > .bi { color: var(--sev); margin-top: 2px; width: 20px; height: 20px; font-size: 1.1rem; }
.cc-finding-title { font-weight: 600; }
.cc-finding-text { color: var(--cc-text-muted); font-size: .875rem; }
.cc-finding--high { --sev: var(--cc-high); }
.cc-finding--medium { --sev: var(--cc-medium); }
.cc-finding--low { --sev: var(--cc-low); }
.cc-finding--ok { --sev: var(--cc-ok); }
.cc-improve { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface); }
.cc-improve + .cc-improve { margin-top: 10px; }
.cc-improve-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
	background: var(--cc-accent-soft); color: var(--cc-accent-strong); font-weight: 700; }
.cc-improve-title { font-weight: 600; }
.cc-improve-body { min-width: 0; flex: 1; }
.cc-improve-body p:last-child, .cc-improve-body ul:last-child { margin-bottom: 0; }
.cc-improve details > summary { color: var(--cc-accent); font-size: .875rem; font-weight: 500; cursor: pointer; margin-top: 4px; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cc-chips .cc-chip { font-size: .8125rem; font-variant-numeric: tabular-nums; }
.cc-well { list-style: none; padding: 0; margin: 0; }
.cc-well li { display: flex; gap: 8px; padding: 3px 0; }
.cc-well li::before { content: "\F26E"; font-family: bootstrap-icons; color: var(--cc-better); }

/* ---------- C9 scorecard tile ---------- */
.cc-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.cc-score { background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-1); }
.cc-score > summary { list-style: none; cursor: pointer; padding: 12px 14px; }
.cc-score > summary::-webkit-details-marker { display: none; }
.cc-score-head { display: flex; align-items: center; gap: 8px; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
	font-weight: 600; color: var(--cc-text-muted); }
.cc-score-head .cc-count { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cc-score-main { margin-top: 4px; font-size: 1.125rem; font-weight: 600; }
.cc-score-main small { font-size: .78rem; font-weight: 500; color: var(--cc-text-muted); display: block; }
.cc-score[open] > summary { border-bottom: 1px solid var(--cc-border); }
.cc-score-list { padding: 8px 14px 12px; font-size: .84rem; }
.cc-score-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; align-items: center; }

/* ---------- C10 section, C11 subnav, C12 tabs ---------- */
.cc-section { background: var(--cc-surface); border: 1px solid var(--cc-border); border-radius: var(--cc-radius); box-shadow: var(--cc-shadow-1);
	margin-bottom: 24px; scroll-margin-top: 120px; }
.cc-section-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; padding: var(--cc-card-pad) var(--cc-card-pad) 0; }
.cc-section-head h2, .cc-section-head h3 { margin: 0; font-size: var(--cc-fs-h2); font-weight: 600; }
.cc-section-head h3 { font-size: var(--cc-fs-h3); }
.cc-section-head p { margin: 2px 0 0; color: var(--cc-text-muted); font-size: .875rem; max-width: 80ch; }
.cc-section-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cc-section-body { padding: var(--cc-card-pad); overflow-x: auto; }
.cc-section-body > .table:last-child, .cc-section-body > .table-responsive:last-child > .table { margin-bottom: 0; }
.cc-section-flush { padding-top: 12px; overflow-x: auto; }
.cc-section-flush .table { margin-bottom: 0; }
details.cc-more { border-top: 1px solid var(--cc-border); }
details.cc-more > summary { cursor: pointer; padding: 10px var(--cc-card-pad); color: var(--cc-accent); font-weight: 500; font-size: .875rem; list-style: none; }
details.cc-more > summary::before { content: "\F285"; font-family: bootstrap-icons; display: inline-block; margin-right: 6px; transition: transform .15s; font-size: .75rem; }
details.cc-more[open] > summary::before { transform: rotate(90deg); }
details.cc-more > summary::-webkit-details-marker { display: none; }
details.cc-more > .cc-more-body { padding: 0 var(--cc-card-pad) var(--cc-card-pad); overflow-x: auto; }
.cc-subnav { position: sticky; top: 0; z-index: 1010; background: color-mix(in srgb, var(--cc-bg) 92%, transparent); backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--cc-border); margin-bottom: 20px; }
.cc-tabs { --bs-nav-link-color: var(--cc-text-muted); --bs-nav-link-hover-color: var(--cc-text); border-bottom: 0; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.cc-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 12px 12px 10px; font-weight: 500;
	display: flex; align-items: center; gap: 6px; white-space: nowrap; background: transparent; }
.cc-tabs .nav-link.active { color: var(--cc-accent-strong); border-bottom-color: var(--cc-accent); background: transparent; }
.cc-tabs .nav-link .cc-ic { width: 18px; height: 18px; }
.cc-tabs--sub { border-bottom: 1px solid var(--cc-border); margin-bottom: 16px; }
.cc-tabs--sub .nav-link { padding: 8px 10px; font-size: .9rem; }
.cc-tab-pane:not(.active) { display: none; }

/* ---------- C15 action toolbar, C17 empty state ---------- */
.cc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.cc-toolbar form { margin: 0; }
.cc-link-ext { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: .875rem; text-decoration: none; }
.cc-empty { text-align: center; padding: 28px 16px; }
.cc-empty > .cc-ic, .cc-empty > .bi { width: 40px; height: 40px; font-size: 2.2rem; color: var(--cc-accent); }
.cc-empty p { color: var(--cc-text-muted); max-width: 52ch; margin: 8px auto 14px; }

/* ---------- Page header ---------- */
.cc-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 6px; }
.cc-page-head h1 { margin: 0; }
.cc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--cc-text-muted); font-size: .875rem; margin-bottom: 20px; }

/* ---------- Status strip ---------- */
.cc-strip { background: var(--cc-medium-soft); color: var(--cc-medium-text); font-size: .875rem; padding: 6px 0; margin-bottom: -.5rem; margin-top: .5rem; }
.cc-strip--high { background: var(--cc-high-soft); color: var(--cc-high-text); }
.cc-strip a { color: inherit; font-weight: 600; }

/* ---------- Existing helpers ---------- */
tr.row-link { cursor: pointer; }
.input-wide { max-width: 40rem; }
.scroll-box { max-height: 24rem; overflow-y: auto; }
.help-toc { top: 80px; }
.help-content section { scroll-margin-top: 80px; }

/* Claude's run analysis (markdown rendered on the run page) */
.analysis h2 { font-size: 1.1rem; margin-top: 1.25rem; }
.analysis h2:first-child { margin-top: 0; }
.analysis h3 { font-size: 1rem; margin-top: 1rem; }
.analysis table { width: auto; }

/* ---------- Talent trees (/runs/{id}/talents): SimC's grid on dark panels ---------- */
.talent-tree { background: var(--cc-tree-bg); max-width: 100%; overflow-x: auto; border: 1px solid var(--cc-tree-border);
	border-radius: var(--cc-radius); padding: .75rem 1rem 1rem; color: var(--cc-tree-text); }
.talent-tree-title { font-weight: 600; margin-bottom: .75rem; }
.talent-tree-subtitle { font-weight: 400; font-size: .8rem; color: var(--cc-tree-muted); margin-left: .4rem; }
.talent-grid { display: grid; grid-template-columns: repeat(var(--cols), 40px); grid-auto-rows: 40px; gap: 12px 10px; }
.talent-node { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cc-tree-node-border);
	background: var(--cc-tree-node); display: flex; align-items: center; justify-content: center; cursor: default; }
.talent-node.choice { border-radius: 30%; }
.talent-node img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.talent-initials { font-size: .7rem; font-weight: 600; color: var(--cc-tree-muted); }
.talent-share, .talent-rank { position: absolute; font-size: .65rem; line-height: 1; padding: 2px 3px; border-radius: 4px;
	background: var(--cc-tree-badge); color: var(--cc-tree-missing); z-index: 1; }
.talent-share { right: -8px; bottom: -6px; }
.talent-rank { left: -8px; bottom: -6px; color: var(--cc-tree-you); }
.talent-node.status-both { border-color: var(--cc-tree-both); box-shadow: 0 0 6px color-mix(in srgb, var(--cc-tree-both) 60%, transparent); }
.talent-node.status-you { border-color: var(--cc-tree-you); }
.talent-node.status-you-rare { border-color: var(--cc-tree-rare); box-shadow: 0 0 6px color-mix(in srgb, var(--cc-tree-rare) 70%, transparent); }
.talent-node.status-missing { border-color: var(--cc-tree-missing); border-style: dashed; box-shadow: 0 0 6px color-mix(in srgb, var(--cc-tree-missing) 60%, transparent); }
.talent-node.status-missing img { filter: grayscale(.7); opacity: .65; }
.talent-node.status-top img { filter: grayscale(1); opacity: .5; }
.talent-node.status-top { border-color: var(--cc-tree-top); }
.talent-node.status-none img { filter: grayscale(1); opacity: .25; }
.talent-node.status-none .talent-initials { opacity: .4; }
.talent-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; margin-right: .35rem; vertical-align: -1px; }
.talent-dot.status-both { border-color: var(--cc-tree-both); }
.talent-dot.status-you { border-color: var(--cc-tree-you); }
.talent-dot.status-you-rare { border-color: var(--cc-tree-rare); }
.talent-dot.status-missing { border-color: var(--cc-tree-missing); border-style: dashed; }
.talent-dot.status-top { border-color: var(--cc-tree-top); }

/* ---------- Motion, print ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
	.cc-navbar, .app-footer, .cc-toolbar, .cc-subnav, .btn, form, .cc-strip { display: none !important; }
	.cc-tab-pane, details > * { display: block !important; }
	body { background: #fff; }
	.cc-section, .card, .cc-stat { box-shadow: none; break-inside: avoid; }
}
.progress-bar.cc-bar-high { background-color: var(--cc-high); }
.table .cc-row-worse > * { background: var(--cc-worse-soft) !important; }
.table .cc-row-high > * { background: var(--cc-high-soft) !important; }
.table .cc-row-boss > * { background: color-mix(in srgb, var(--cc-accent-soft) 60%, var(--cc-surface)) !important; }
.table .cc-row-sub > * { background: var(--cc-surface-2) !important; }
.cc-tl-axis span:first-child { transform: none; }
.cc-tl-axis span:last-child { transform: translateX(-100%); }
.cc-tl-death { pointer-events: auto; cursor: default; display: grid; place-items: center; }
.cc-tl-death .cc-ic { width: 12px; height: 12px; vertical-align: 0; }
.cc-tl-death--other { color: var(--cc-text-muted); }
.cc-tabs { scrollbar-width: none; }
.cc-tabs::-webkit-scrollbar { display: none; }

/* Runs list */
.table .cc-row-day > td { background: var(--cc-bg) !important; color: var(--cc-text-muted); font-size: var(--cc-fs-small); font-weight: 600;
	text-transform: uppercase; letter-spacing: .04em; padding-top: 14px; }
.cc-sev { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.cc-text--low { color: var(--cc-low-text) !important; }
.cc-spark { display: block; width: 100%; height: 28px; margin-top: 4px; }
.cc-spark polyline { stroke: var(--cc-accent); stroke-width: 2; }

/* Characters: best run per dungeon as tiles */
.cc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cc-tile { display: block; padding: 12px 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface);
	color: var(--cc-text); text-decoration: none; transition: border-color .12s, transform .12s; }
.cc-tile:hover { border-color: var(--cc-accent); transform: translateY(-1px); color: var(--cc-text); }
.cc-tile .cc-bar-track { width: 100%; }
.cc-pick { cursor: pointer; }
.table .cc-picked > * { background: var(--cc-accent-soft) !important; }
@media (min-width: 1200px) { .cc-sticky { position: sticky; top: 76px; } }
fieldset legend.cc-h3 { font-size: var(--cc-fs-h3); font-weight: 600; margin-bottom: .5rem; }

/* Jobs: one row per job */
.cc-job { display: grid; grid-template-columns: minmax(16rem, 2fr) minmax(18rem, 3fr) auto; gap: 8px 20px; align-items: center;
	padding: 14px var(--cc-card-pad); border-bottom: 1px solid var(--cc-border); }
.cc-job:last-child { border-bottom: 0; }
.cc-job-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-job-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cc-job-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cc-job-actions form { margin: 0; }
.cc-job-edit { grid-column: 1 / -1; }
.cc-job-edit > summary { color: var(--cc-accent); cursor: pointer; width: max-content; }
.cc-pill--success { background: var(--cc-better-soft); color: var(--cc-better-text); }
@media (max-width: 991px) { .cc-job { grid-template-columns: 1fr; } .cc-job-actions { justify-content: flex-start; } }
.cc-vnav .list-group-item { border-radius: 8px; border: 0; margin-bottom: 2px; font-weight: 500; color: var(--cc-text-muted); background: transparent; }
.cc-vnav .list-group-item.active { background: var(--cc-accent-soft); color: var(--cc-accent-strong); }
.cc-vnav .list-group-item:hover:not(.active) { background: var(--cc-surface-2); color: var(--cc-text); }
.cc-tab-pane > .card { height: auto !important; }
.help-content p, .help-content li, .help-content dd { max-width: 70ch; }

/* Focus rings in the accent colour everywhere (keyboard only) */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .nav-link:focus-visible, .list-group-item:focus-visible {
	outline: 2px solid var(--cc-accent); outline-offset: 2px; box-shadow: none; }

/* Login */
.cc-login { padding-top: 48px; padding-bottom: 48px; }
.cc-login-card { width: 100%; max-width: 380px; }
.cc-login .cc-brand { font-size: 1.375rem; }

/* Gap analysis: similar-key and high-key reference sets per boss */
.cc-gap-group + .cc-gap-group { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--cc-border); }

/* Reference strip: you among the reference logs, worse (left) to better (right) */
.cc-strip { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.cc-strip-track { position: relative; display: inline-block; width: var(--w, 140px); height: 14px; }
.cc-strip-track::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--cc-surface-2); border-radius: 1px; }
.cc-strip-range { position: absolute; top: 6px; height: 2px; background: var(--cc-ref); border-radius: 1px; }
.cc-strip-box { position: absolute; top: 3px; height: 8px; background: var(--cc-ref); opacity: .55; border-radius: 2px; min-width: 2px; }
.cc-strip-median { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--cc-text-subtle); border-radius: 1px; }
.cc-strip-you { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cc-text-muted);
  border: 2px solid var(--cc-surface, #fff); box-shadow: 0 0 0 1px var(--cc-text-muted); }
.cc-strip--better .cc-strip-you { background: var(--cc-better); box-shadow: 0 0 0 1px var(--cc-better); }
.cc-strip--worse .cc-strip-you { background: var(--cc-worse); box-shadow: 0 0 0 1px var(--cc-worse); }
.cc-strip-text { font-size: .8125rem; color: var(--cc-text-muted); }
.cc-strip-legend { display: inline-flex; align-items: center; gap: 12px; font-size: .75rem; color: var(--cc-text-muted); }
.cc-strip-legend i { display: inline-block; vertical-align: middle; margin-right: 4px; }
.cc-strip-legend .l-you { width: 9px; height: 9px; border-radius: 50%; background: var(--cc-text-muted); }
.cc-strip-legend .l-median { width: 2px; height: 12px; background: var(--cc-text-subtle); }
.cc-strip-legend .l-box { width: 14px; height: 8px; background: var(--cc-ref); opacity: .55; border-radius: 2px; }
.cc-strip-legend .l-range { width: 14px; height: 2px; background: var(--cc-ref); }
