:root {
	--ipa-font: "Charis SIL", "Doulos SIL", "Noto Sans", "Segoe UI", "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
}

.label-window input,
.label-window textarea,
.label-input,
.point-label,
.canvas-label-preview {
	font-family: var(--ipa-font);
}

body {
	margin: 0;
	font-family: system-ui, sans-serif;
	padding-top: 80px;
	padding-bottom: 32px;
}
header {
/*	padding: 12px 20px;*/
}
header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	border-bottom: 1px solid #ddd;
	
	background: #111827;
	color: #f9fafb;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 15px;
}
.app-header {
	margin-bottom: 10px;
}
.header-top {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 10px;
}
.header-top h1 {
	margin: 0;
	text-align: left;
}
.header-top p {
	margin: 0;
	text-align: center;
	color: gold;
}
#lang-select {
	justify-self: end;
}
.header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}
.header-help-btn,
.help-close-btn {
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	padding: 6px 12px;
	background: rgba(255, 255, 255, 0.12);
	color: #f9fafb;
	cursor: pointer;
	font-weight: 600;
}
.header-help-btn:hover,
.help-close-btn:hover {
	background: rgba(255, 255, 255, 0.22);
}
.app-meta {
	margin-top: 4px;
	font-size: 12px;
	color: chartreuse;
}
footer {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	height: 28px;
	line-height: 28px;
	text-align: center;
	font-size: 0.75rem;
	background: #ffffff;
	border-top: 1px solid #ddd;
}
footer span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	padding: 0 12px;
}
h3 {
	margin:0;
}

#layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 25px;
	width: 100%;
	box-sizing: border-box;
}
#left-column {
	min-width: 0;
	width: 100%;
}

canvas {
	width: 100%;
	height: auto;
}

#canvas-row {
	display: flex;
	gap: 20px;
	width: 100%;
	min-width: 0;
}

#tables-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.table-block {
	border: 1px solid #ccc;
	padding: 8px;
	box-sizing: border-box;
	background: #fff;
	overflow: auto;
	max-height: 260px;
}
#sidebar {
	width: 100%;
	max-width: 300px;
	box-sizing: border-box;
	background: #f7f7f7;
	font-family: sans-serif;
	border: 1px solid #ccc;
	border-radius: 10px;
	padding: 20px;
/*
	width: 260px;
*/
}
#sidebar input[type="number"] {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

#sidebar h2 {
	margin-top: 0;
	font-size: 18px;
}
#sidebar h3 {
	margin-top: 20;
	font-size: 16px;
}


.slider-label-row {
/*	display: flex;*/
    display: inline-flex;
    flex-direction: row;

	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
	font-size: 13px;
}
.slider-label-row span:last-child {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #444;
	min-width: 52px;
	text-align: right;
}
.field.slider-field {
	/*display: grid;*/
	grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);
	column-gap: 0.8rem;
	row-gap: 0.2rem;
	align-items: center;
}
.slider-field {
	display: grid;
	/*grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);*/
	grid-template-columns: 8rem minmax(0, 1fr);
	column-gap: 0.8rem;
	align-items: center;
}

.slider-label-row {
	display: grid;
	grid-template-rows: auto auto;
	row-gap: 0.15rem;
}

.slider-label-row > span:first-child {
	justify-self: start;
	line-height: 1.15;
}

.slider-label-row > span:last-child {
	justify-self: end;
	font-variant-numeric: tabular-nums;
	opacity: 0.8;
}

.slider-field input[type="range"] {
	width: 100%;
	min-width: 0;
}
@media (max-width: 640px) {
	.slider-field {
		grid-template-columns: 1fr;
		row-gap: 0.35rem;
	}

	.slider-field input[type="range"] {
		width: 100%;
	}
}
.sidebar-toggle {
	display: none;
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	background: #e9eef5;
	border: 1px solid #ccc;
	border-radius: 6px;
	cursor: pointer;
	margin-bottom: 10px;
}

@media (max-width: 1100px) {
	.sidebar-toggle {
		display: block;
	}
	#sidebar {
		padding: 10px;
	}
	#sidebar.collapsed #sidebar-content {
		display: none;
	}
}
.field {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
	font-size: 13px;
}

.field input {
	margin-top: 4px;
	padding: 5px;
	font-size: 14px;
}
.field textarea {
	margin-top: 4px;
	padding: 5px;
	font-size: 14px;
	font-family: inherit;
	resize: vertical;
	min-height: 90px;
	box-sizing: border-box;
}
.details-panel {
	margin-top: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fafafa;
}
.details-panel summary {
	cursor: pointer;
	font-weight: 700;
	padding: 0.5rem 0.65rem;
	background: #f3f3f3;
	user-select: none;
}
.details-panel[open] summary {
	border-bottom: 1px solid #ddd;
}

.details-panel > table {
	margin: 0.65rem;
	width: calc(100% - 1.3rem);
}
.details-field {
	display: flex;
	margin-bottom: 10px;
	font-size: 13px;
}
#point-errors {
	font-size: 13px;
	line-height: 1.4;
}

.point-error-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-bottom: 1px solid #eee;
}

.point-error-row:last-child {
	border-bottom: none;
}

.point-error-bad {
	color: #b00020;
	font-weight: 600;
}

.point-error-mid {
	color: #9a6700;
	font-weight: 600;
}

.point-error-good {
	color: #0a7a2f;
	font-weight: 600;
}

.move-wrapper {
	display: flex;
	gap: 4px;
	justify-content: center;
}
.move-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	padding: 2px 6px;
	line-height: 1;
}
.button-row {
	display: flex;
	gap: 6px;
	margin-bottom: 15px;
}

.button-row button {
	flex: 1;
	padding: 6px;
	font-size: 13px;
	cursor: pointer;
}

.danger-action {
	border-color: rgba(176, 0, 32, 0.35);
	color: #b00020;
}

.matrix-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-bottom: 15px;
}

.matrix-grid label {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	color: #444;
}

.matrix-grid input {
	margin-top: 3px;
	padding: 4px;
	font-size: 13px;
	width: 100%;
}

.identity-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	background: #eee;
	border-radius: 4px;
}

.reset-btn {
	width: 100%;
	padding: 6px;
	margin-top: 5px;
	cursor: pointer;
}

.controls-row {
	display: flex;
	gap: 10px;
}

.controls-row label {
	display: block;
}

.points-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.points-table th {
	text-align: left;
	padding: 4px 6px;
	border-bottom: 1px solid #ccc;
}
/*
.points-table td {
	padding: 3px 4px;
}
*/
.points-table input {
	width: 70px;
	padding: 2px 4px;
	font-size: 13px;
	text-align: center;
}

.points-table .label-input {
	width: 90px;
}

.points-table button.delete-btn {
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	color: #b00;
}
tr[draggable="true"] {
	cursor: grab;
}

tr[draggable="true"]:active {
	cursor: grabbing;
}
tr.dragging {
	opacity: 0.45;
}

tr.drop-before {
	border-top: 3px solid #4a90e2;
}

tr.drop-after {
	border-bottom: 3px solid #4a90e2;
}
#points-original-panel,
#points-transformed-panel {
	display: block;
	width: 100%;
}

button {
	/* margin-top: 4px; */
	font-size: 12px;
}

/* Contenitore T/Q affiancati */
.tq-container {
	display: flex;
	flex-direction: row;
	gap: 12px;
}

/* Ogni blocco (T o Q) è una colonna verticale */
.t-block {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

/* Righe compatte */
.t-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
}

/* Etichette allineate */
.t-row label {
	width: 32px;
	font-size: 14px;
}

/* Input numerici compatti */
.t-row input[type="number"] {
	width: 70px;
	padding: 3px 4px;
	border: 1px solid #aaa;
	border-radius: 4px;
}

/* Riquadro Similarity Index */
.si-box {
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 10px;
	margin-top: 12px;
	background: #f9f9f9;
	font-size: 14px;
}

.si-title {
	font-weight: bold;
	margin-bottom: 6px;
	font-size: 15px;
}

.si-value {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 8px;
	color: #003366;
}

.si-components div {
	margin-bottom: 4px;
}
.decimals-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.decimals-row label {
	width: 70px; /* o quello che preferisci */
}

.decimals-row input[type="number"] {
	width: 60px; /* compatto come gli altri */
	padding: 3px 4px;
}

.decimals-row button {
	padding: 3px 8px;
}
canvas {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	border: 1px solid #ccc;
	background: #fff;
	box-sizing: border-box;
}
.canvas-container {
	display: flex;
	flex-direction: row;
	gap: 20px;
	width: 100%;
	min-width: 0px;
	/*
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: nowrap;
	*/
}

.canvas-block {
	flex: 1 1 0;
	min-width: 0px;
	box-sizing: border-box;
}

canvas {
	width: 100%;
	height: auto;
	max-width: 100%;
	border: 1px solid #ccc;
}

@media (max-width: 1200px) {
	#layout {
		grid-template-columns: 1fr;
	}
	#sidebar {
		width: 100%;
		max-width: none;
		order: -1;
	}
	.canvas-container {
		flex-direction: column;
	}
	.canvas-block {
		width: 100%;
		min-width: unset;
	}
}

@media (max-width: 1100px) {
	#layout {
		grid-template-columns: 1fr;
	}

	#left-column {
		width: 100%;
		min-width: 0;
	}

	#sidebar {
		max-width: none;
		width: 100%;
		order: -1;
		padding: 12px;
	}

	#canvas-row,
	.canvas-container {
		flex-direction: column;
		width: 100%;
		min-width: 0;
	}

	.canvas-block {
		width: 100%;
		min-width: 0;
	}

	.points-table,
	.points-table input,
	.field input,
	.field textarea {
		max-width: 100%;
		box-sizing: border-box;
	}
}
.quality-bar-wrap {
	width: 100%;
	height: 14px;
	background: #35e375;
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid #d1d5db;
	margin-top: 4px;
}

.quality-bar-fill {
	height: 100%;
	width: 0%;
	background: #22c55e;
	transition: width 0.25s ease, background-color 0.25s ease;
	border-radius: 999px;
}
#toast-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 9999;
}

.toast {
	min-width: 220px;
	max-width: 320px;
	padding: 10px 14px;
	border-radius: 8px;
	color: white;
	font-size: 13px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.25s ease;
}

.toast.show {
	opacity: 1;
	transform: translateY(0);
}

.toast.info {
	background: #2563eb;
	color: black;
}

.toast.warn {
	background: #f59e0b;
}

.toast.error {
	background: #dc2626;
}

.toast.success {
	background: #35e375;
}


.si-audit-scroll {
	width: 100%;
	overflow-x: auto;
}

.si-grid-audit-panel {
	margin-top: 0.5rem;
}

.si-grid-audit-table {
	min-width: 720px;
}

.si-grid-audit-table th,
.si-grid-audit-table td {
	font-size: 0.75rem;
	white-space: nowrap;
}


/* Contextual help */
.inline-help-row,
.si-title-with-help {
	display: flex;
	align-items: center;
	gap: 8px;
}

.inline-help-row {
	justify-content: space-between;
}

.context-help-btn {
	width: 22px;
	height: 22px;
	min-width: 22px;
	border: 1px solid #94a3b8;
	border-radius: 50%;
	background: #ffffff;
	color: #1d4ed8;
	font-weight: 700;
	font-size: 0.8rem;
	line-height: 1;
	cursor: pointer;
}

.context-help-btn-small {
	width: 18px;
	height: 18px;
	min-width: 18px;
	font-size: 0.7rem;
	vertical-align: middle;
}

.context-help-btn:hover,
.context-help-btn:focus-visible {
	background: #eff6ff;
	border-color: #2563eb;
	outline: none;
}

.context-help-inline-note {
	margin-top: 8px;
	font-size: 0.78rem;
}

.context-help-link {
	border: 0;
	padding: 0;
	background: transparent;
	color: #1d4ed8;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

.context-help-popover {
	position: fixed;
	z-index: 2000;
	box-sizing: border-box;
	max-width: calc(100vw - 20px);
	padding: 12px 14px;
	border: 1px solid #bfdbfe;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
	font-size: 0.9rem;
	line-height: 1.4;
}

.context-help-popover-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
	color: #111827;
}

.context-help-popover p {
	margin: 0 0 10px 0;
	color: #374151;
}

.context-help-close {
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

.context-help-open-section {
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	padding: 5px 10px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
}

.context-help-open-section:hover,
.context-help-open-section:focus-visible {
	background: #dbeafe;
	outline: none;
}

/* Help page */
.help-page {
	display: none;
	box-sizing: border-box;
	width: min(1100px, calc(100% - 32px));
	margin: 0 auto 48px auto;
}

body.help-active #layout {
	display: none;
}

body.help-active .help-page {
	display: block;
}

.help-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 24px;
	border-radius: 18px;
	background: #111827;
	color: #f9fafb;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.help-page-header h1 {
	margin: 0 0 6px 0;
	font-size: 1.9rem;
}

.help-page-header p {
	margin: 0;
	color: #d1d5db;
}

.help-close-btn {
	flex: 0 0 auto;
	margin-top: 2px;
}

.help-content {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	gap: 24px;
	margin-top: 24px;
}

.isophon-help-nav {
	position: sticky;
	top: 104px;
	align-self: start;
	padding: 18px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}

.isophon-help-nav h2 {
	margin: 0 0 12px 0;
	font-size: 1rem;
}

.isophon-help-nav ol {
	margin: 0;
	padding-left: 1.2rem;
}

.isophon-help-nav li {
	margin: 0.45rem 0;
}

.isophon-help-nav a {
	color: #1d4ed8;
	text-decoration: none;
}

.isophon-help-nav a:hover {
	text-decoration: underline;
}

.isophon-help-section {
	margin-bottom: 22px;
	padding: 22px 24px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
	line-height: 1.58;
}

.isophon-help-section h2 {
	margin: 0 0 12px 0;
	font-size: 1.45rem;
	color: #111827;
}

.isophon-help-section h3 {
	margin: 1.25rem 0 0.45rem 0;
	font-size: 1.05rem;
	color: #1f2937;
}

.isophon-help-section p {
	margin: 0.65rem 0;
}

.isophon-help-section ul,
.isophon-help-section ol {
	padding-left: 1.35rem;
}

.isophon-help-section li {
	margin: 0.45rem 0;
}

.isophon-help-section a {
	color: #1d4ed8;
	word-break: break-word;
}

@media (max-width: 860px) {
	.header-top {
		grid-template-columns: 1fr;
	}

	.header-top p {
		text-align: left;
	}

	.header-actions {
		justify-content: flex-start;
	}

	.help-page {
		width: calc(100% - 20px);
	}

	.help-page-header {
		flex-direction: column;
	}

	.help-content {
		grid-template-columns: 1fr;
	}

	.isophon-help-nav {
		position: static;
	}
}


/* Audit page */
.audit-page {
	display: none;
	box-sizing: border-box;
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto 48px auto;
}

body.audit-active #layout,
body.audit-active .help-page {
	display: none;
}

body.audit-active .audit-page {
	display: block;
}

.audit-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 24px;
	border-radius: 18px;
	background: #0f172a;
	color: #f9fafb;
	box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.audit-page-header h1 {
	margin: 0 0 6px 0;
	font-size: 1.9rem;
}

.audit-page-header p {
	margin: 0;
	color: #d1d5db;
}

.audit-content {
	margin-top: 24px;
}

.audit-grid {
	display: grid;
	grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.audit-card {
	padding: 18px 20px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.audit-card h2,
.audit-card h3 {
	margin: 0 0 12px 0;
	color: #111827;
}

.audit-card p {
	margin: 0.55rem 0;
	line-height: 1.45;
	color: #374151;
}

.audit-controls {
	display: grid;
	gap: 12px;
}

.audit-field {
	display: grid;
	gap: 5px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

.audit-field select,
.audit-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 8px 10px;
	font: inherit;
}

.audit-field textarea {
	min-height: 160px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 0.82rem;
	font-weight: 400;
	resize: vertical;
}

.audit-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.audit-message {
	padding: 9px 11px;
	border-radius: 10px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 0.88rem;
	line-height: 1.4;
}

.audit-message.audit-error {
	background: #fef2f2;
	color: #991b1b;
}

.audit-summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.audit-summary-item {
	padding: 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f8fafc;
}

.audit-summary-item span {
	display: block;
	font-size: 0.78rem;
	color: #64748b;
}

.audit-summary-item strong {
	display: block;
	margin-top: 4px;
	font-size: 1.1rem;
	color: #111827;
}

.audit-table-wrap {
	overflow-x: auto;
	margin-top: 12px;
}

.audit-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.84rem;
}

.audit-table th,
.audit-table td {
	padding: 0.42rem 0.5rem;
	border-bottom: 1px solid #e5e7eb;
	text-align: right;
	white-space: nowrap;
}

.audit-table th:first-child,
.audit-table td:first-child {
	text-align: left;
}

.audit-table th {
	background: #f8fafc;
	color: #334155;
	font-weight: 700;
}

.audit-subsection {
	margin-top: 18px;
}

.audit-empty {
	padding: 16px;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	background: #f8fafc;
	color: #64748b;
}

@media (max-width: 900px) {
	.audit-page {
		width: calc(100% - 20px);
	}

	.audit-page-header {
		flex-direction: column;
	}

	.audit-grid {
		grid-template-columns: 1fr;
	}
}

.si-audit-settings-block {
	margin: 0.75rem 0 0.5rem;
	padding: 0.65rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 0.65rem;
	background: rgba(0, 0, 0, 0.025);
}

.si-audit-settings-block h4 {
	margin: 0 0 0.55rem;
	font-size: 0.86rem;
}

.audit-number-field {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 5.25rem;
	align-items: center;
	gap: 0.45rem;
}

.audit-number-label {
	min-width: 0;
}

.audit-number-field input[type="number"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.25rem 0.35rem;
}

.audit-number-value {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.82rem;
	opacity: 0.8;
}

.si-audit-settings-note {
	margin: 0.4rem 0 0;
	font-size: 0.78rem;
	line-height: 1.35;
	color: #666;
}


.si-audit-live-summary {
	margin-top: 0.55rem;
	padding: 0.5rem;
	border-radius: 0.55rem;
	background: rgba(37, 99, 235, 0.08);
}

.si-audit-live-title {
	font-size: 0.76rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.si-audit-live-values {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.35rem;
	font-size: 0.78rem;
}

.si-audit-live-values strong {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.si-grid-custom-row {
	background: rgba(37, 99, 235, 0.08);
	font-weight: 600;
}

@media (max-width: 760px) {
	.si-audit-live-values {
		grid-template-columns: 1fr;
	}
}

/* Reverse estimate audit */
.reverse-estimate-card {
	grid-column: 1;
}

.reverse-estimate-result {
	border-color: #fed7aa;
}

.audit-method-note {
	margin: 0.75rem 0 1rem;
	padding: 0.75rem 0.85rem;
	border-left: 4px solid #f97316;
	border-radius: 0.7rem;
	background: #fff7ed;
	color: #7c2d12;
}

.audit-method-note p {
	margin: 0.25rem 0 0;
	color: #7c2d12;
}

.reverse-delta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
}

.reverse-delta-grid label {
	display: grid;
	gap: 0.25rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: #374151;
}

.reverse-delta-grid input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 0.55rem;
	padding: 0.42rem 0.5rem;
	font: inherit;
}

.audit-small-note {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.35;
	color: #64748b;
}

.audit-check-field {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.86rem;
	font-weight: 600;
	color: #374151;
}

.audit-check-field input {
	margin-top: 0.18rem;
}

.audit-canvas-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 0.8rem 0 1rem;
	padding: 0.5rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.9rem;
	background: #ffffff;
}

.audit-canvas-wrap canvas {
	display: block;
	max-width: 100%;
	min-width: 560px;
	border-radius: 0.65rem;
}

.audit-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: 0.7rem 0;
	font-size: 0.82rem;
	font-weight: 700;
}

.audit-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.audit-legend span::before {
	content: "";
	display: inline-block;
	width: 1.1rem;
	height: 0.25rem;
	border-radius: 999px;
	background: #334155;
}

.audit-legend .legend-source::before {
	background: #ef4444;
}

.audit-legend .legend-target::before {
	background: #2563eb;
}

.audit-legend .legend-app::before {
	background: #16a34a;
}

.audit-legend .legend-estimated::before {
	background: #f97316;
}

@media (max-width: 900px) {
	.reverse-estimate-card {
		grid-column: auto;
	}

	.reverse-delta-grid {
		grid-template-columns: 1fr;
	}
}

.audit-output {
	grid-column: 2;
	grid-row: 1 / span 2;
}

@media (max-width: 900px) {
	.audit-output {
		grid-column: auto;
		grid-row: auto;
	}
}
