.trust-shell {
	display: grid;
	gap: 16px;
	min-width: 0;
}

#trustApp [hidden] {
	display: none !important;
}

.trust-intro,
.trust-muted,
.trust-hint,
.trust-chart-note {
	color: var(--muted);
}

.trust-intro {
	font-size: 14px;
	line-height: 1.55;
	margin: 6px 0 0;
}

#trustFlagCountsPanel .main-header {
	flex-wrap: wrap;
	gap: 8px;
}

.trust-flag-period {
	line-height: 1.6;
	margin: 0 0 14px;
}

.trust-flag-columns {
	align-items: start;
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trust-flag-group {
	--flag-color: var(--ok);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 13px;
	min-width: 0;
	overflow: hidden;
}

.trust-flag-group[data-tone="negative"] {
	--flag-color: var(--err);
}

.trust-flag-heading {
	align-items: center;
	background: color-mix(in oklab, var(--flag-color) 7%, var(--surface-2));
	border-bottom: 1px solid var(--border);
	color: var(--flag-color);
	display: flex;
	font-size: 14px;
	gap: 8px;
	line-height: 1.5;
	margin: 0;
	padding: 13px 14px;
}

.trust-flag-list {
	margin: 0;
	padding: 4px 14px;
}

.trust-flag-row {
	align-items: center;
	display: grid;
	font-size: 13px;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr) auto;
	min-height: 46px;
	padding: 9px 0;
}

.trust-flag-row + .trust-flag-row {
	border-top: 1px solid var(--border);
}

.trust-flag-row dt {
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.trust-flag-row dd {
	background: color-mix(in oklab, var(--flag-color) 10%, var(--surface));
	border: 1px solid color-mix(in oklab, var(--flag-color) 22%, var(--border));
	border-radius: 8px;
	color: var(--flag-color);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	margin: 0;
	min-width: 38px;
	padding: 3px 8px;
	text-align: center;
}

.trust-flag-row[data-empty="true"] {
	color: var(--muted);
}

.trust-flag-row[data-empty="true"] dd {
	background: var(--surface);
	border-color: var(--border);
	color: var(--muted);
}

.trust-context-count {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 11px;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 8px 12px;
	margin-top: 14px;
	padding: 12px 14px;
}

.trust-context-count strong {
	font-variant-numeric: tabular-nums;
}

.trust-context-count .trust-muted {
	flex: 1 1 260px;
	font-size: 12px;
	line-height: 1.6;
}

.trust-flag-filter {
	border-bottom: 1px solid var(--border);
	margin-bottom: 18px;
	padding-bottom: 18px;
}

.trust-flag-filter fieldset {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.trust-flag-filter legend {
	float: none;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	margin: 0 0 4px;
	width: auto;
}

.trust-flag-filter p {
	line-height: 1.6;
	margin: 0 0 12px;
}

.trust-flag-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.trust-flag-option {
	--flag-color: var(--muted);
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 9px;
	color: var(--text-soft);
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	gap: 8px;
	line-height: 1.5;
	margin: 0;
	max-width: 100%;
	padding: 8px 10px;
}

.trust-flag-option[data-tone="positive"] {
	--flag-color: var(--ok);
}

.trust-flag-option[data-tone="negative"] {
	--flag-color: var(--err);
}

.trust-flag-option input {
	accent-color: var(--flag-color);
	flex: 0 0 14px;
	height: 14px;
	margin: 0;
	width: 14px;
}

.trust-flag-option span {
	overflow-wrap: anywhere;
}

.trust-flag-option:hover,
.trust-flag-option:has(input:checked) {
	background: color-mix(in oklab, var(--flag-color) 9%, var(--surface));
	border-color: var(--flag-color);
}

.trust-flag-option:has(input:checked) {
	color: var(--flag-color);
}

.trust-flag-option:has(input:focus-visible) {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

.trust-flag-filter fieldset:disabled .trust-flag-option {
	cursor: wait;
	opacity: .6;
}

.trust-filter-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.trust-filter-actions .ui-btn {
	font-size: 12px;
	height: 38px;
	min-width: 100px;
	padding: 8px 14px;
}

.trust-player-scan {
	display: grid;
	gap: 8px;
	margin-top: 18px;
}

.trust-muted {
	font-size: 13px;
}

.trust-hint,
.trust-chart-note {
	font-size: 12px;
	line-height: 1.6;
	margin: 12px 0 0;
}

.trust-notice,
.trust-warnings {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.65;
	margin-top: 14px;
	overflow-wrap: anywhere;
	padding: 11px 13px;
}

.trust-notice[data-type="error"] {
	border-color: color-mix(in oklab, var(--err) 45%, var(--border));
	color: var(--err);
}

.trust-notice[data-type="success"] {
	color: var(--ok);
}

.trust-warnings {
	border-color: color-mix(in oklab, var(--warn) 40%, var(--border));
}

.trust-warnings p {
	margin: 0;
}

.trust-warnings p + p {
	margin-top: 6px;
}

.trust-profile-header {
	flex-wrap: wrap;
}

.trust-projects,
.trust-tags,
.trust-scan-actions,
.trust-event-tags {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.trust-project {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 12px;
}

.trust-project[aria-selected="true"] {
	background: color-mix(in oklab, var(--brand) 13%, var(--surface));
	border-color: var(--brand);
	color: var(--brand);
}

.trust-overview {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(165px, .6fr) minmax(0, 2fr);
}

.trust-score-card {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 13px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 170px;
	padding: 18px 12px;
	text-align: center;
}

.trust-label {
	color: var(--muted);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.trust-score {
	color: var(--brand);
	font-size: clamp(40px, 5vw, 58px);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1.3;
	margin: 4px 0;
}

.trust-score[data-tone="negative"],
.trust-metric-value[data-tone="negative"] {
	color: var(--err);
}

.trust-score[data-tone="neutral"] {
	color: var(--warn);
}

.trust-score[data-tone="empty"],
.trust-metric-value[data-tone="empty"] {
	color: var(--muted);
}

.trust-metric-value[data-tone="positive"] {
	color: var(--ok);
}

.trust-overview-copy {
	align-content: center;
	display: grid;
	gap: 12px;
	min-width: 0;
}

.trust-summary {
	font-size: 14px;
	line-height: 1.7;
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.trust-dates {
	display: grid;
	font-size: 13px;
	gap: 5px;
}

.trust-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
}

.trust-count {
	display: grid;
	gap: 3px;
}

.trust-count strong {
	font-size: 19px;
	font-variant-numeric: tabular-nums;
}

.trust-metrics {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 16px;
}

.trust-metric {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 11px;
	display: grid;
	gap: 7px;
	min-width: 0;
	padding: 12px;
}

.trust-metric-value {
	font-size: 17px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.trust-tags {
	margin-top: 14px;
}

.trust-tag {
	background: color-mix(in oklab, var(--brand) 10%, var(--surface));
	border: 1px solid color-mix(in oklab, var(--brand) 25%, var(--border));
	border-radius: 999px;
	color: var(--brand);
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	max-width: 100%;
	overflow-wrap: anywhere;
	padding: 4px 8px;
}

.trust-tag[data-tone="warning"] {
	background: color-mix(in oklab, var(--warn) 8%, var(--surface));
	border-color: color-mix(in oklab, var(--warn) 28%, var(--border));
	color: var(--warn);
}

.trust-tag[data-tone="negative"] {
	background: color-mix(in oklab, var(--err) 8%, var(--surface));
	border-color: color-mix(in oklab, var(--err) 28%, var(--border));
	color: var(--err);
}

.trust-tag[data-tone="muted"] {
	background: var(--surface-2);
	border-color: var(--border);
	color: var(--muted);
}

.trust-explanation {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.65;
	margin-top: 16px;
}

.trust-explanation summary {
	color: var(--text-soft);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}

.trust-explanation p {
	margin: 9px 0 0;
}

.trust-chart-wrap {
	height: 250px;
	position: relative;
	width: 100%;
}

.trust-chart {
	display: block;
	height: 250px;
	width: 100%;
}

.trust-table-wrap {
	margin-top: 10px;
	max-height: 360px;
	overflow: auto;
}

.trust-table {
	border-collapse: collapse;
	font-size: 12px;
	width: 100%;
}

.trust-table th,
.trust-table td {
	border-bottom: 1px solid var(--border);
	padding: 10px;
	text-align: left;
}

.trust-table th {
	background: var(--surface-2);
	color: var(--text);
	position: sticky;
	top: 0;
}

.trust-events {
	display: grid;
	gap: 12px;
}

.trust-event {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 13px;
	padding: 14px;
}

.trust-event-head,
.trust-scan-top {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
}

.trust-event-identity {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.trust-event-title {
	font-size: 14px;
	overflow-wrap: anywhere;
}

.trust-event-meta {
	color: var(--muted);
	font-size: 11px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.trust-event-tags {
	margin: 12px 0;
}

.trust-event-reason {
	border-left: 2px solid var(--border);
	font-size: 13px;
	line-height: 1.6;
	margin: 12px 0;
	overflow-wrap: anywhere;
	padding-left: 10px;
	white-space: pre-wrap;
}

.trust-event .trust-metrics {
	gap: 8px;
	margin-top: 12px;
}

.trust-event .trust-metric {
	background: var(--surface);
	padding: 10px;
}

.trust-event .trust-summary {
	font-size: 13px;
}

.trust-event-score {
	color: var(--text-soft);
	font-size: 12px;
	line-height: 1.6;
	text-align: right;
}

.trust-pagination {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 16px;
}

.trust-page-label {
	color: var(--muted);
	font-size: 13px;
	min-width: 105px;
	text-align: center;
}

.trust-icon-btn {
	align-items: center;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	height: 40px;
	justify-content: center;
	width: 40px;
}

.trust-icon-btn:hover {
	border-color: var(--brand);
	color: var(--brand);
}

#trustApp button:disabled {
	cursor: not-allowed;
	filter: none;
	opacity: .5;
	transform: none;
}

#trustApp button:focus-visible,
#trustApp summary:focus-visible,
#trustProjectPanel:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

.trust-empty {
	background: var(--surface-2);
	border: 1px dashed var(--border);
	border-radius: 13px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
	padding: 26px 16px;
	text-align: center;
}

.trust-import-state {
	font-size: 13px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.trust-import-state[data-tone="warning"] {
	color: var(--warn);
}

.trust-source-projects {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 12px;
}

.trust-source-project {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	display: grid;
	gap: 8px;
	padding: 12px;
}

.trust-source-project-head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	justify-content: space-between;
}

.trust-source-counts {
	color: var(--text-soft);
	display: flex;
	flex-wrap: wrap;
	font-size: 12px;
	gap: 5px 14px;
	line-height: 1.6;
}

.trust-scan {
	border-top: 1px solid var(--border);
	margin-top: 16px;
	padding-top: 16px;
}

.trust-progress {
	accent-color: var(--brand);
	appearance: none;
	background: var(--surface-2);
	border: 0;
	border-radius: 5px;
	display: block;
	height: 8px;
	margin: 12px 0 9px;
	overflow: hidden;
	width: 100%;
}

.trust-progress::-webkit-progress-bar {
	background: var(--surface-2);
	border-radius: 5px;
}

.trust-progress::-webkit-progress-value {
	background: var(--brand);
	border-radius: 5px;
}

.trust-progress::-moz-progress-bar {
	background: var(--brand);
	border-radius: 5px;
}

.trust-scan-actions {
	gap: 10px;
	margin-top: 14px;
}

.trust-scan-actions .trust-icon-btn {
	height: 50px;
	width: 50px;
}

@media (max-width: 850px) {
	.trust-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.trust-overview,
	.trust-flag-columns,
	.trust-source-projects {
		grid-template-columns: 1fr;
	}

	.trust-score-card {
		min-height: 145px;
	}

	.trust-projects {
		width: 100%;
	}

	.trust-project {
		flex: 1 1 auto;
	}

	.trust-event-score {
		text-align: left;
	}

	.trust-scan-actions .ui-btn {
		flex: 1 1 180px;
	}
}

@media (max-width: 600px) {
	.container-main:has(> .hero > #trustApp.trust-shell) {
		padding: 12px;
	}

	.hero:has(> #trustApp.trust-shell) {
		padding: 12px;
	}
}