/**
 * Behavior Compass — shared structural stylesheet.
 *
 * Skin-neutral. Everything here is driven by CSS custom properties that each
 * theme sets on :root. Layout, geometry, touch targets, motion and
 * accessibility live here; only color/type/flourish differ per theme.
 *
 * Variable contract a theme must define on :root:
 *   --bc-bg --bc-fg --bc-muted --bc-line --bc-surface --bc-surface-2
 *   --bc-border --bc-pos --bc-neg --bc-badge-fg --bc-accent
 *   --bc-font-display --bc-font-body --bc-font-mono --bc-radius
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bc-bg);
	color: var(--bc-fg);
	font-family: var(--bc-font-body);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100dvh;
}

/* ─── Shell ─────────────────────────────────────────────────────────────── */
.bc-app {
	width: 100%;
	max-width: 1560px;
	margin: 0 auto;
	padding: clamp(8px, 1.4vw, 14px) clamp(12px, 2.4vw, 24px) 24px;
}

.bc-top {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 40px;
	align-items: start;
	gap: clamp(4px, 1.2vw, 10px);
	margin-bottom: clamp(6px, 1.2vw, 10px);
	text-align: center;
}
.bc-brand {
	grid-column: 2;
	min-width: 0;
}
.bc-title {
	margin: 0;
	font-family: var(--bc-font-display);
	letter-spacing: var(--bc-title-tracking, 0.04em);
	line-height: 1;
	font-size: clamp(22px, 2.9vw, 40px);
	max-width: 100%;
	color: var(--bc-title-color, var(--bc-fg));
	overflow-wrap: normal;
	word-break: normal;
	text-transform: uppercase;
}
.bc-subtitle {
	margin: 3px 0 0;
	font-family: var(--bc-font-mono);
	font-size: clamp(10px, 1.1vw, 12px);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bc-muted);
}

/* ─── Console (subject + status + timer + actions in one bar) ───────────── */
.bc-console {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 8px 12px;
	margin-bottom: clamp(8px, 1.3vw, 12px);
	background: var(--bc-surface);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
}
.bc-subject-field {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 240px;
	min-width: 0;
}
.bc-subject-label {
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bc-muted);
	white-space: nowrap;
}
#bc-subject {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	border-bottom: 1.5px solid var(--bc-border);
	color: var(--bc-fg);
	font-family: var(--bc-font-body);
	font-size: 15px;
	padding: 7px 2px;
	transition: border-color 0.2s;
}
#bc-subject::placeholder {
	color: var(--bc-muted);
	opacity: 0.7;
}
#bc-subject:focus {
	outline: none;
	border-bottom-color: var(--bc-accent);
}
#bc-status {
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--bc-accent);
	white-space: nowrap;
}

/* ─── Timer (compact pill inside the console; highlighted while running) ── */
.bc-timer {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 4px 10px;
	background: var(--bc-surface-2);
	border: 1.5px solid var(--bc-border);
	border-radius: var(--bc-radius);
	box-shadow: none;
	transition:
		box-shadow 0.3s,
		border-color 0.3s;
}
.bc-timer.is-running {
	border-color: var(--bc-accent);
	animation: bc-timer-pulse 2s ease-in-out infinite;
}
@keyframes bc-timer-pulse {
	0%,
	100% {
		box-shadow:
			0 0 0 1px color-mix(in srgb, var(--bc-accent) 30%, transparent),
			0 0 14px color-mix(in srgb, var(--bc-accent) 22%, transparent);
	}
	50% {
		box-shadow:
			0 0 0 1px color-mix(in srgb, var(--bc-accent) 45%, transparent),
			0 0 30px color-mix(in srgb, var(--bc-accent) 45%, transparent);
	}
}
.bc-timer-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--bc-muted);
	flex-shrink: 0;
	transition: background 0.3s;
}
.bc-timer.is-running .bc-timer-dot {
	background: var(--bc-accent);
	animation: bc-timer-blink 1.1s steps(1) infinite;
}
@keyframes bc-timer-blink {
	0%,
	60% {
		opacity: 1;
	}
	61%,
	100% {
		opacity: 0.25;
	}
}
.bc-timer-clock {
	font-family: var(--bc-font-mono);
	font-size: clamp(18px, 2.4vw, 24px);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	color: var(--bc-fg);
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}
.bc-timer.is-running .bc-timer-clock {
	color: var(--bc-accent);
}
.bc-timer-controls {
	display: flex;
	gap: 8px;
}
/* Export/Clear live in the timer bar — compact toolbar sizing, pushed right */
.bc-timer-actions {
	display: flex;
	gap: 8px;
	margin-left: auto;
}
.bc-timer-actions .bc-btn {
	position: relative;
	flex: 0 0 auto;
	min-height: 34px;
	padding: 0 14px;
	font-size: 11px;
	letter-spacing: 0.12em;
}
.bc-timer-btn {
	position: relative;
	min-height: 34px;
	padding: 0 14px;
	border-radius: var(--bc-radius);
	border: 1.5px solid var(--bc-accent);
	background: var(--bc-accent);
	color: var(--bc-badge-fg);
	font-family: var(--bc-font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		filter 0.2s,
		background 0.2s,
		color 0.2s,
		border-color 0.2s,
		transform 0.12s;
}
.bc-timer-btn:hover {
	filter: brightness(1.08);
}
/* 44px touch targets without 44px of chrome — invisible hit-area extension */
.bc-timer-btn::before,
.bc-timer-actions .bc-btn::before {
	content: "";
	position: absolute;
	inset: -5px;
}
.bc-timer-btn:active {
	transform: translateY(1px);
}
.bc-timer-btn--ghost {
	background: transparent;
	color: var(--bc-fg);
	border-color: var(--bc-border);
}
.bc-timer-btn--ghost:hover {
	filter: none;
	border-color: var(--bc-fg);
}

/* ─── Compass stage (the dominant element) ──────────────────────────────── */
.bc-stage {
	width: 100%;
	display: flex;
	justify-content: center;
	margin: 0 0 6px;
}
.bc-workspace {
	display: grid;
	gap: clamp(12px, 1.4vw, 20px);
	align-items: start;
}
.bc-instrument {
	min-width: 0;
}
@media (min-width: 980px) {
	.bc-workspace {
		grid-template-columns: minmax(600px, 1.45fr) minmax(340px, 0.75fr);
	}
	.bc-instrument {
		position: sticky;
		top: 10px;
	}
	.bc-side {
		position: sticky;
		top: 10px;
		max-height: calc(100dvh - 20px);
		overflow: auto;
	}
}
@media (min-width: 1440px) {
	.bc-workspace {
		grid-template-columns: minmax(640px, 1.35fr) minmax(430px, 0.85fr);
	}
}
.bc-compass {
	width: 100%;
	max-width: min(96vw, 900px);
}
.bc-svg {
	width: 100%;
	max-height: min(76vh, 840px);
	height: auto;
	display: block;
	overflow: visible;
	transform-origin: center;
	animation: bc-face-in 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bc-face-is-booting {
	will-change: transform, opacity;
}
@keyframes bc-face-in {
	from {
		opacity: 0;
		transform: scale(0.965);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* The thick hex frame — follows the theme accent, with the theme's glow. */
.bc-hex-border {
	filter: var(--bc-glow-filter, none);
}
/* Faint machined lip just inside the frame — gives the steel bezel dimension. */
.bc-hex-inner {
	stroke: var(--bc-fg);
	opacity: 0.1;
	animation: bc-label-reveal 760ms ease-out both;
}
.bc-cross {
	opacity: 0.5;
	animation: bc-crosshair-settle 900ms ease-out both;
}

.bc-sector-label {
	font-family: var(--bc-font-mono);
	font-size: 48px;
	font-weight: 700;
	letter-spacing: 0.08em;
	dominant-baseline: middle;
	animation: bc-label-reveal 620ms ease-out both;
	/* Labels ride the grey frame; a background-colored halo cuts each glyph out
	   so they stay readable against the bezel on every theme (esp. light ones,
	   where dark text on grey frame was only ~2.3:1). */
	paint-order: stroke;
	stroke: var(--bc-bg);
	stroke-width: 7px;
	stroke-linejoin: round;
	stroke-linecap: round;
}
.bc-ghost-label {
	font-family: var(--bc-font-mono);
	font-size: 30px;
	letter-spacing: 0.08em;
	opacity: 0.5;
	dominant-baseline: middle;
	animation: bc-label-reveal 760ms ease-out both;
}

@keyframes bc-crosshair-settle {
	from {
		opacity: 0;
		stroke-dasharray: 10 16;
	}
	to {
		opacity: 0.5;
		stroke-dasharray: 0 0;
	}
}

@keyframes bc-label-reveal {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Inline trait codes — tap to cycle neutral → positive → negative → clear. */
.bc-trait {
	cursor: pointer;
	outline: none;
}
.bc-trait-hitbox {
	pointer-events: all;
}
@keyframes bc-trait-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
.bc-trait-code {
	font-family: var(--bc-font-mono);
	font-size: 41px;
	font-weight: 500;
	letter-spacing: 0.04em;
	dominant-baseline: middle;
	transform-box: fill-box;
	transform-origin: center;
	transition:
		fill 0.18s ease,
		font-weight 0.18s ease,
		transform 0.16s ease;
	user-select: none;
}

@media (max-width: 520px) {
	.bc-title {
		font-size: clamp(12px, 3.5vw, 16px);
		letter-spacing: 0;
	}
	.bc-app {
		padding-top: 10px;
	}
	/* Console stacks: subject row, then timer pill, then actions — each full
	   width so buttons stay big enough to tap one-handed. */
	.bc-console {
		align-items: stretch;
	}
	#bc-status {
		flex: 1 0 100%;
		text-align: right;
	}
	.bc-timer {
		flex: 1 1 100%;
		justify-content: space-between;
	}
	.bc-timer-actions {
		flex: 1 1 100%;
		margin-left: 0;
	}
	.bc-timer-actions .bc-btn {
		flex: 1;
	}
	.bc-compass {
		max-width: 100%;
	}
	.bc-svg {
		max-height: 52vh;
	}
}
.bc-trait-box {
	transform-box: fill-box;
	transform-origin: center;
	transition:
		stroke 0.18s ease,
		fill 0.18s ease;
}
/* ON traits glow green */
.bc-trait-box.is-on {
	filter: drop-shadow(
		0 0 5px color-mix(in srgb, var(--bc-pos) 75%, transparent)
	);
}
/* Adjectives logged on the compass face, around the ADJ hub */
.bc-adj-word {
	font-family: var(--bc-font-mono);
	font-size: 34px;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.bc-trait:hover .bc-trait-code,
.bc-trait:focus-visible .bc-trait-code {
	fill: var(--bc-accent);
	transform: scale(1.14);
}
.bc-trait:focus-visible .bc-trait-box {
	stroke: var(--bc-accent);
	stroke-dasharray: 3 3;
}
.bc-trait-code.bc-pop {
	animation: bc-svg-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bc-trait-box.bc-pop {
	animation: bc-box-pop 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bc-svg-pop {
	0% {
		transform: scale(0.82);
	}
	55% {
		transform: scale(1.16);
	}
	100% {
		transform: scale(1);
	}
}
@keyframes bc-box-pop {
	0% {
		transform: scale(0.6);
		opacity: 0;
	}
	60% {
		transform: scale(1.08);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Center ADJ trigger (up = positive / down = negative). */
.bc-adj-trigger {
	cursor: pointer;
	outline: none;
}
.bc-adj-center-label {
	font-family: var(--bc-font-mono);
	font-size: 46px;
	font-weight: 700;
	letter-spacing: 0.08em;
	dominant-baseline: central;
}
.bc-adj-center-badge {
	font-family: var(--bc-font-mono);
	font-size: 15px;
}
.bc-adj-trigger:hover .bc-adj-center-label,
.bc-adj-trigger:focus-visible .bc-adj-center-label {
	fill: var(--bc-accent);
}
.bc-arrow-up,
.bc-arrow-dn {
	transform-box: fill-box;
	transform-origin: center;
}

/* ─── Readout (full width under the compass) ────────────────────────────── */
.bc-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
/* Right column: trait rail card + adjectives card stacked */
.bc-side {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

/* Readout — last-tapped trait, in full context. */
.bc-readout {
	min-height: 96px;
}
.bc-readout-empty {
	padding: 12px;
	background: var(--bc-surface);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	color: var(--bc-muted);
	font-size: 14.5px;
	line-height: 1.5;
}
.bc-readout-card {
	padding: 12px;
	background: var(--bc-surface);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	animation: bc-fade-up 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bc-readout-card.is-on {
	border-color: color-mix(in srgb, var(--bc-pos) 45%, var(--bc-border));
	background: color-mix(in srgb, var(--bc-pos) 7%, var(--bc-surface));
}
.bc-readout-top {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}
.bc-readout-code {
	font-family: var(--bc-font-mono);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0.06em;
}
.bc-readout-name {
	font-size: 17px;
	font-weight: 600;
}
.bc-readout-sector {
	display: block;
	margin-top: 3px;
	font-family: var(--bc-font-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bc-muted);
}
.bc-readout-desc {
	margin-top: 10px;
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--bc-fg);
}
.bc-fear-label {
	font-family: var(--bc-font-mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--bc-neg);
	margin-right: 6px;
}
.bc-fear-text {
	color: var(--bc-fg);
	opacity: 0.95;
}
.bc-readout-fear {
	margin-top: 7px;
	font-size: 14.5px;
	line-height: 1.5;
}
.bc-readout-tier {
	margin-left: auto;
	font-family: var(--bc-font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--bc-muted);
	border: 1px solid var(--bc-border);
	border-radius: 999px;
	padding: 2px 8px;
	white-space: nowrap;
}
.bc-breakdown-toggle {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 8px 10px;
	font-family: var(--bc-font-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--bc-accent);
	background: transparent;
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	cursor: pointer;
}
.bc-breakdown-toggle:hover,
.bc-breakdown-toggle:focus-visible {
	outline: none;
	border-color: var(--bc-accent);
}
.bc-readout-breakdown {
	display: none;
}
.bc-readout-breakdown.is-open {
	display: block;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--bc-border);
}
.bc-breakdown-note {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--bc-fg);
	opacity: 0.85;
	padding-left: 10px;
	border-left: 2px solid var(--bc-border);
	margin-bottom: 12px;
}
.bc-breakdown-sec {
	margin-bottom: 12px;
}
.bc-breakdown-sec:last-child {
	margin-bottom: 0;
}
.bc-breakdown-label {
	font-family: var(--bc-font-mono);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--bc-muted);
	margin-bottom: 4px;
}
.bc-breakdown-text {
	font-size: 15px;
	line-height: 1.55;
	color: var(--bc-fg);
}
.bc-breakdown-list {
	margin: 0;
	padding-left: 18px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--bc-fg);
}
.bc-breakdown-list li {
	margin-bottom: 5px;
}
.bc-readout-state {
	margin-top: 12px;
	font-family: var(--bc-font-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
}
.bc-readout-state.is-on {
	color: var(--bc-pos);
}
.bc-readout-state.is-off {
	color: var(--bc-muted);
}
.bc-readout-stack {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.bc-readout-stacktitle {
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	color: var(--bc-muted);
}
.bc-readout-item {
	padding: 10px;
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	background: var(--bc-surface);
}
.bc-readout-itemhead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}
.bc-readout-itemcode {
	font-family: var(--bc-font-mono);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
}
.bc-readout-itemname {
	font-size: 14.5px;
	font-weight: 600;
}
.bc-readout-itemsector {
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--bc-muted);
}
.bc-readout-itemdesc {
	margin-top: 6px;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--bc-fg);
	opacity: 0.95;
}
.bc-readout-itemfear {
	margin-top: 5px;
	font-size: 14px;
	line-height: 1.45;
}

@keyframes bc-fade-up {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─── Adjectives zone ───────────────────────────────────────────────────── */
.bc-adj-zone {
	padding: 12px;
	background: var(--bc-surface);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
}
.bc-adj-title {
	font-family: var(--bc-font-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--bc-accent);
	margin-bottom: 6px;
}
.bc-adj-hint {
	font-size: 14px;
	line-height: 1.5;
	color: var(--bc-fg);
	opacity: 0.8;
	margin-bottom: 10px;
}
.bc-adj-group {
	margin-top: 12px;
}
.bc-adj-group:first-of-type {
	margin-top: 0;
}
.bc-adj-label {
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	margin-bottom: 7px;
}
.bc-adj-group.is-positive .bc-adj-label {
	color: var(--bc-pos);
}
.bc-adj-group.is-negative .bc-adj-label {
	color: var(--bc-neg);
}
.bc-adj-row {
	display: flex;
	gap: 8px;
}
.bc-adj-input {
	flex: 1;
	min-width: 0;
	min-height: 40px;
	background: var(--bc-surface-2);
	border: 1.5px solid var(--bc-border);
	border-radius: var(--bc-radius);
	color: var(--bc-fg);
	font-family: var(--bc-font-body);
	font-size: 14px;
	padding: 0 10px;
	transition: border-color 0.2s;
}
.bc-adj-input::placeholder {
	color: var(--bc-muted);
	opacity: 0.7;
}
.bc-adj-group.is-positive .bc-adj-input:focus {
	outline: none;
	border-color: var(--bc-pos);
}
.bc-adj-group.is-negative .bc-adj-input:focus {
	outline: none;
	border-color: var(--bc-neg);
}
.bc-adj-add {
	min-height: 40px;
	padding: 0 12px;
	border-radius: var(--bc-radius);
	border: 1.5px solid var(--bc-border);
	background: transparent;
	color: var(--bc-fg);
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	font-weight: 700;
	cursor: pointer;
	transition:
		border-color 0.2s,
		color 0.2s,
		background 0.2s;
}
.bc-adj-group.is-positive .bc-adj-add:hover {
	border-color: var(--bc-pos);
	color: var(--bc-pos);
}
.bc-adj-group.is-negative .bc-adj-add:hover {
	border-color: var(--bc-neg);
	color: var(--bc-neg);
}
.bc-adj-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 10px;
}
.bc-adj-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 30px;
	padding: 0 9px;
	border-radius: var(--bc-radius);
	border: 1.5px solid;
	background: transparent;
	cursor: pointer;
	font-family: var(--bc-font-body);
	font-size: 12px;
	transition:
		opacity 0.2s,
		background 0.2s;
}
.bc-adj-chip.is-positive {
	border-color: var(--bc-pos);
	color: var(--bc-pos);
	background: color-mix(in srgb, var(--bc-pos) 10%, transparent);
}
.bc-adj-chip.is-negative {
	border-color: var(--bc-neg);
	color: var(--bc-neg);
	background: color-mix(in srgb, var(--bc-neg) 10%, transparent);
}
.bc-adj-chip:hover {
	opacity: 0.75;
}
.bc-adj-chip-x {
	font-size: 14px;
	line-height: 1;
	opacity: 0.7;
}

/* ─── Trait rail ────────────────────────────────────────────────────────── */
.bc-summary {
	margin-top: 0;
	background: var(--bc-surface);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	padding: clamp(10px, 1.2vw, 14px);
}
.bc-summary-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 2px 0;
	margin: 0 0 8px;
	background: transparent;
	border: none;
	color: var(--bc-muted);
	font-family: var(--bc-font-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-align: left;
	cursor: pointer;
}
.bc-summary-title:hover {
	color: var(--bc-fg);
}
.bc-summary-chevron {
	font-size: 11px;
	transition: transform 0.2s ease;
}
.bc-summary.is-open .bc-summary-title .bc-summary-chevron {
	transform: rotate(180deg);
}
.bc-summary-body {
	display: none;
}
.bc-summary.is-open .bc-summary-body {
	display: block;
}
@media (min-width: 980px) {
	.bc-summary-body {
		display: block;
	}
	.bc-summary-title {
		cursor: default;
	}
	.bc-summary-title .bc-summary-chevron {
		display: none;
	}
}
.bc-summary-sector {
	padding: 10px 0;
	border-top: 1px solid var(--bc-border);
	margin-bottom: 0;
}
.bc-summary-sector.is-open .bc-summary-chevron {
	transform: rotate(180deg);
}
.bc-summary-sector .bc-summary-traits {
	display: none;
}
.bc-summary-sector.is-open .bc-summary-traits {
	display: grid;
}
.bc-summary-sector .bc-summary-note {
	display: none;
}
.bc-summary-sector.is-open .bc-summary-note {
	display: block;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--bc-fg);
	opacity: 0.8;
	padding: 2px 2px 10px;
}
.bc-summary-sector:last-child {
	margin-bottom: 0;
}
.bc-summary-head {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin: 0;
	padding: 4px 0;
	background: transparent;
	border: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.bc-summary-head:hover .bc-summary-count {
	color: var(--bc-fg);
}
.bc-summary-sector.is-open .bc-summary-head {
	margin-bottom: 8px;
}
/* Sector headers are thumb targets on phones */
@media (max-width: 520px) {
	.bc-summary-head {
		padding: 13px 0;
	}
}
.bc-summary-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}
.bc-summary-name {
	font-family: var(--bc-font-mono);
	font-size: 13.5px;
	letter-spacing: 0.08em;
	font-weight: 700;
	flex: 1;
}
.bc-summary-count {
	font-family: var(--bc-font-mono);
	font-size: 12px;
	color: var(--bc-muted);
}
.bc-summary-traits {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.bc-summary-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
	min-height: 38px;
	padding: 7px 8px;
	margin: 0;
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	background: var(--bc-surface-2);
	color: var(--bc-fg);
	cursor: pointer;
	text-align: left;
	transition:
		border-color 0.18s ease,
		background 0.18s ease,
		transform 0.12s ease;
}
.bc-summary-row:hover,
.bc-summary-row:focus-visible {
	outline: none;
	border-color: var(--bc-accent);
}
.bc-summary-row:active {
	transform: translateY(1px);
}
.bc-summary-rowcode {
	font-family: var(--bc-font-mono);
	font-size: 14.5px;
	font-weight: 700;
}
.bc-summary-row.is-on {
	border-color: var(--bc-pos);
	background: color-mix(in srgb, var(--bc-pos) 14%, var(--bc-surface-2));
}
.bc-summary-row.is-on .bc-summary-rowcode {
	color: var(--bc-pos);
}
.bc-summary-rowname {
	font-size: 14px;
	color: var(--bc-fg);
	opacity: 0.95;
	line-height: 1.25;
}
.bc-summary-rowdesc {
	font-size: 13px;
	line-height: 1.4;
	color: var(--bc-fg);
	opacity: 0.9;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}
.bc-summary-rowfear {
	font-size: 12.5px;
	line-height: 1.4;
	margin-top: 2px;
}
@media (max-width: 680px) {
	.bc-summary-traits {
		grid-template-columns: 1fr;
	}
}

/* ─── Actions ───────────────────────────────────────────────────────────── */
.bc-btn {
	flex: 1;
	min-height: 50px;
	border-radius: var(--bc-radius);
	border: 1.5px solid var(--bc-border);
	background: transparent;
	color: var(--bc-fg);
	font-family: var(--bc-font-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	cursor: pointer;
	transition:
		background 0.2s,
		border-color 0.2s,
		color 0.2s,
		transform 0.12s;
}
.bc-btn:active {
	transform: translateY(1px);
}
.bc-btn--primary {
	background: var(--bc-accent);
	border-color: var(--bc-accent);
	color: var(--bc-badge-fg);
}
.bc-btn--primary:hover {
	filter: brightness(1.06);
}
.bc-btn--primary:disabled {
	opacity: 0.6;
	cursor: default;
}
.bc-btn--ghost:hover {
	border-color: var(--bc-fg);
}

.bc-foot {
	margin-top: 14px;
	text-align: center;
	font-family: var(--bc-font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: var(--bc-muted);
	opacity: 0.7;
}

/* ─── Motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
