/**
 * Tool interface styles.
 * Scoped to .aiot-tool so the rest of the site keeps the theme's typography.
 */

.aiot-tool {
	--aiot-ink: #17201f;
	--aiot-muted: #5b6765;
	--aiot-line: #d6dfdc;
	--aiot-surface: #ffffff;
	--aiot-soft: #f3f7f5;
	--aiot-accent: #0f766e;
	--aiot-accent-strong: #0b5d57;
	--aiot-accent-soft: #d9f3ee;
	--aiot-danger: #a4262c;
	--aiot-danger-soft: #fdecec;
	--aiot-warn: #8a5a00;
	--aiot-warn-soft: #fff7e6;
	--aiot-radius: 14px;
	--aiot-radius-sm: 9px;
	box-sizing: border-box;
	color: var(--aiot-ink);
	background: var(--aiot-surface);
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius);
	padding: clamp(16px, 3vw, 28px);
	box-shadow: 0 1px 0 rgba(23, 32, 31, 0.04);
}

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

.aiot-tool__boot {
	padding: 32px 8px;
	text-align: center;
	color: var(--aiot-muted);
}

.aiot-tool__boot p {
	margin: 0;
}

.aiot-tool h3,
.aiot-tool h4 {
	color: var(--aiot-ink);
	line-height: 1.25;
}

.aiot-tool p {
	line-height: 1.6;
}

.aiot-tool fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.aiot-tool legend {
	padding: 0;
	margin-bottom: 10px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--aiot-ink);
}

.aiot-tool label {
	color: var(--aiot-ink);
}

.aiot-tool .aiot-hint {
	margin: 6px 0 0;
	font-size: 0.84rem;
	line-height: 1.5;
	color: var(--aiot-muted);
}

.aiot-tool .aiot-required {
	color: var(--aiot-danger);
}

/* Dropzone */
.aiot-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 190px;
	padding: 24px 18px;
	text-align: center;
	border: 2px dashed #9fb6af;
	border-radius: var(--aiot-radius);
	background: var(--aiot-soft);
	cursor: pointer;
	transition: border-color 150ms ease, background-color 150ms ease;
}

.aiot-dropzone:hover,
.aiot-dropzone.is-dragover {
	border-color: var(--aiot-accent);
	background: var(--aiot-accent-soft);
}

.aiot-dropzone:focus-visible {
	outline: 3px solid var(--aiot-accent);
	outline-offset: 3px;
}

.aiot-dropzone__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	color: var(--aiot-accent-strong);
	background: #ffffff;
	border: 1px solid var(--aiot-line);
}

.aiot-dropzone__title {
	margin: 0;
	font-size: 1.06rem;
	font-weight: 700;
}

.aiot-dropzone__hint {
	margin: 0;
	font-size: 0.86rem;
	color: var(--aiot-muted);
}

.aiot-link-button {
	display: inline;
	padding: 0;
	border: 0;
	background: none;
	color: var(--aiot-accent-strong);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.aiot-link-button:hover {
	color: var(--aiot-accent);
}

.aiot-link-button:focus-visible {
	outline: 2px solid var(--aiot-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Controls */
.aiot-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 18px;
	margin-top: 22px;
}

.aiot-control-group {
	padding: 14px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: #ffffff;
}

.aiot-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.aiot-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border: 1px solid var(--aiot-line);
	border-radius: 999px;
	background: #ffffff;
	font-size: 0.86rem;
	cursor: pointer;
}

.aiot-chip:has(input:checked),
.aiot-chip.is-checked {
	border-color: var(--aiot-accent);
	background: var(--aiot-accent-soft);
	box-shadow: inset 0 0 0 1px var(--aiot-accent);
}

.aiot-chip input {
	accent-color: var(--aiot-accent);
	margin: 0;
}

.aiot-field-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.aiot-field-row label {
	font-size: 0.86rem;
}

.aiot-tool input[type="number"],
.aiot-tool input[type="text"],
.aiot-tool select {
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #9aa9a5;
	border-radius: 7px;
	background: #ffffff;
	color: var(--aiot-ink);
	font: inherit;
	font-size: 0.92rem;
}

.aiot-tool input[type="number"] {
	width: 8.5rem;
}

.aiot-tool select {
	width: 100%;
}

.aiot-tool input[type="number"]:focus-visible,
.aiot-tool input[type="text"]:focus-visible,
.aiot-tool select:focus-visible {
	outline: 3px solid rgba(15, 118, 110, 0.35);
	outline-offset: 1px;
	border-color: var(--aiot-accent);
}

.aiot-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-top: 10px;
	font-size: 0.88rem;
	line-height: 1.45;
}

.aiot-check input {
	margin-top: 3px;
	accent-color: var(--aiot-accent);
}

/* Actions */
.aiot-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--aiot-line);
}

.aiot-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: #ffffff;
	color: var(--aiot-ink);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.aiot-btn:focus-visible {
	outline: 3px solid rgba(15, 118, 110, 0.45);
	outline-offset: 2px;
}

.aiot-btn--primary {
	background: var(--aiot-accent);
	border-color: var(--aiot-accent);
	color: #ffffff;
}

.aiot-btn--primary:hover:not(:disabled) {
	background: var(--aiot-accent-strong);
	border-color: var(--aiot-accent-strong);
}

.aiot-btn--ghost {
	background: #ffffff;
	border-color: #9aa9a5;
}

.aiot-btn--ghost:hover:not(:disabled) {
	border-color: var(--aiot-accent);
	color: var(--aiot-accent-strong);
}

.aiot-btn--danger {
	background: transparent;
	border-color: #d9a5a8;
	color: var(--aiot-danger);
}

.aiot-btn--small {
	min-height: 36px;
	padding: 6px 11px;
	font-size: 0.82rem;
}

.aiot-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.aiot-tool .aiot-status {
	min-height: 1.5em;
	margin: 14px 0 0;
	font-size: 0.9rem;
	color: var(--aiot-muted);
}

.aiot-tool .aiot-status.is-error {
	color: var(--aiot-danger);
	font-weight: 600;
}

/* File list */
.aiot-file-list {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.aiot-file {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: start;
	padding: 12px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: #ffffff;
}

.aiot-file.is-error {
	border-color: #e4b6b9;
	background: #fffafa;
}

.aiot-file.is-done {
	border-color: #b6ded6;
}

.aiot-file__thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 7px;
	background:
		linear-gradient(45deg, #e8eeec 25%, transparent 25%),
		linear-gradient(-45deg, #e8eeec 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e8eeec 75%),
		linear-gradient(-45deg, transparent 75%, #e8eeec 75%);
	background-size: 12px 12px;
	background-position: 0 0, 0 6px, 6px -6px, -6px 0;
	border: 1px solid var(--aiot-line);
}

.aiot-file__body {
	min-width: 0;
}

.aiot-file__name {
	margin: 0;
	font-weight: 700;
	font-size: 0.92rem;
	overflow-wrap: anywhere;
}

.aiot-file__meta {
	margin: 3px 0 0;
	font-size: 0.81rem;
	color: var(--aiot-muted);
	overflow-wrap: anywhere;
}

.aiot-file__result {
	margin: 6px 0 0;
	font-size: 0.85rem;
	line-height: 1.45;
}

.aiot-file__result strong {
	color: var(--aiot-ink);
}

.aiot-file__actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: stretch;
}

.aiot-file__actions .aiot-btn {
	white-space: nowrap;
}

.aiot-progress {
	display: block;
	width: 100%;
	height: 8px;
	margin-top: 9px;
	accent-color: var(--aiot-accent);
}

.aiot-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	background: var(--aiot-soft);
	color: var(--aiot-muted);
}

.aiot-badge--ok {
	background: var(--aiot-accent-soft);
	color: var(--aiot-accent-strong);
}

.aiot-badge--warn {
	background: var(--aiot-warn-soft);
	color: var(--aiot-warn);
}

.aiot-badge--error {
	background: var(--aiot-danger-soft);
	color: var(--aiot-danger);
}

/* Results summary */
.aiot-results {
	margin-top: 20px;
	padding: 16px;
	border: 1px solid #b6ded6;
	border-radius: var(--aiot-radius-sm);
	background: #f6fcfa;
}

.aiot-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.aiot-results__head h3 {
	margin: 0;
	font-size: 1.05rem;
}

.aiot-results__note {
	margin: 8px 0 0;
	font-size: 0.84rem;
	color: var(--aiot-muted);
}

/* Notices */
.aiot-notice {
	padding: 13px 15px;
	border-left: 4px solid #9aa9a5;
	border-radius: 4px;
	background: var(--aiot-soft);
	color: var(--aiot-ink);
}

.aiot-notice p {
	margin: 0 0 8px;
}

.aiot-notice p:last-child {
	margin-bottom: 0;
}

.aiot-notice--info {
	border-left-color: #2b6cb0;
	background: #f0f6ff;
}

.aiot-notice--warning {
	border-left-color: #b7791f;
	background: var(--aiot-warn-soft);
}

.aiot-notice--error {
	border-left-color: var(--aiot-danger);
	background: var(--aiot-danger-soft);
}

/* Utility */
.aiot-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Compliance table used by the privacy shortcode when plugin CSS is present. */
.aiot-matrix-wrap {
	overflow-x: auto;
	margin: 24px 0;
}

.aiot-matrix {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.aiot-matrix caption {
	text-align: left;
	font-weight: 700;
	padding: 0 0 10px;
}

.aiot-matrix th,
.aiot-matrix td {
	padding: 10px 12px;
	border: 1px solid var(--aiot-line, #d6dfdc);
	vertical-align: top;
	text-align: left;
}

.aiot-matrix thead th {
	background: var(--aiot-soft, #f3f7f5);
}

.aiot-matrix__note {
	font-size: 0.84rem;
	color: var(--aiot-muted, #5b6765);
	max-width: 78ch;
}

@media (max-width: 640px) {
	.aiot-file {
		grid-template-columns: 52px minmax(0, 1fr);
	}

	.aiot-file__thumb {
		width: 52px;
		height: 52px;
	}

	.aiot-file__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.aiot-actions .aiot-btn {
		flex: 1 1 100%;
	}
}

@media (max-width: 380px) {
	.aiot-tool {
		padding: 14px;
	}

	.aiot-dropzone {
		min-height: 160px;
		padding: 18px 12px;
	}

	.aiot-control-group {
		padding: 12px;
	}

	.aiot-tool input[type="number"] {
		width: 7rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aiot-tool *,
	.aiot-tool *::before,
	.aiot-tool *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

@media (prefers-color-scheme: dark) {
	.aiot-tool {
		--aiot-ink: #e6efec;
		--aiot-muted: #a7b8b3;
		--aiot-line: #35433f;
		--aiot-surface: #151d1b;
		--aiot-soft: #1c2825;
		--aiot-accent: #5eead4;
		--aiot-accent-strong: #99f6e4;
		--aiot-accent-soft: #173c37;
		--aiot-danger: #ffb4ab;
		--aiot-danger-soft: #3b1f1f;
		--aiot-warn: #f6c177;
		--aiot-warn-soft: #332813;
	}

	.aiot-dropzone__icon,
	.aiot-control-group,
	.aiot-chip,
	.aiot-file,
	.aiot-btn,
	.aiot-tool input[type="number"],
	.aiot-tool input[type="text"],
	.aiot-tool select {
		background: var(--aiot-surface);
		color: var(--aiot-ink);
	}

	.aiot-dropzone {
		border-color: #4b615b;
	}

	.aiot-btn--primary {
		color: #06201c;
	}

	.aiot-btn--ghost {
		border-color: #4b615b;
	}

	.aiot-results {
		border-color: #2f5c53;
		background: #112420;
	}

	.aiot-file.is-error {
		border-color: #5e3435;
		background: #241719;
	}

	.aiot-file.is-done {
		border-color: #2f5c53;
	}

	.aiot-notice--info {
		background: #16263a;
	}
}

img.aiot-file__thumb {
	display: block;
}

.aiot-file__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--aiot-muted);
	background: var(--aiot-soft);
}

.aiot-file__actions a.aiot-btn {
	text-decoration: none;
}


/* ------------------------------------------------------------------
   Shared controls for the remaining tools
   ------------------------------------------------------------------ */

.aiot-tool textarea,
.aiot-tool input[type="email"],
.aiot-tool input[type="url"],
.aiot-tool input[type="tel"],
.aiot-tool input[type="password"] {
	width: 100%;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: var(--aiot-surface);
	color: var(--aiot-ink);
	padding: 10px 12px;
	font: inherit;
	line-height: 1.5;
}

.aiot-tool textarea {
	min-height: 8rem;
	resize: vertical;
}

.aiot-tool input[type="email"]:focus-visible,
.aiot-tool input[type="url"]:focus-visible,
.aiot-tool input[type="tel"]:focus-visible,
.aiot-tool input[type="password"]:focus-visible,
.aiot-tool textarea:focus-visible {
	outline: 3px solid var(--aiot-accent);
	outline-offset: 1px;
	border-color: var(--aiot-accent);
}

.aiot-tool .aiot-textarea {
	min-height: 16rem;
	font-family: inherit;
}

.aiot-tool input[type="range"] {
	width: 100%;
	accent-color: var(--aiot-accent);
}

.aiot-tool input[type="color"] {
	width: 3.1rem;
	height: 2.4rem;
	padding: 3px;
	border: 1px solid var(--aiot-line);
	border-radius: 7px;
	background: var(--aiot-surface);
}

.aiot-tool input[type="file"]:focus-visible {
	outline: 3px solid var(--aiot-accent);
	outline-offset: 2px;
}

.aiot-tool-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 18px 0;
	align-items: start;
}

.aiot-tool-grid--wide {
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.aiot-panel {
	min-width: 0;
	padding: 16px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius);
	background: var(--aiot-soft);
}

.aiot-panel > h3:first-child,
.aiot-panel__head:first-child {
	margin-top: 0;
}

.aiot-panel__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.aiot-panel__head h3,
.aiot-panel__head h4 {
	margin: 0;
}

.aiot-panel__head .aiot-hint {
	margin: 0;
}

.aiot-preview {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 12px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: #ffffff;
	overflow: hidden;
}

.aiot-preview--checker {
	background-color: #ffffff;
	background-image:
		linear-gradient(45deg, #e7ecea 25%, transparent 25%),
		linear-gradient(-45deg, #e7ecea 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #e7ecea 75%),
		linear-gradient(-45deg, transparent 75%, #e7ecea 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.aiot-preview canvas {
	display: block;
	max-width: 100%;
	max-height: 60vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	touch-action: none;
	cursor: grab;
}

.aiot-preview canvas.is-dragging {
	cursor: grabbing;
}

.aiot-preview__empty {
	margin: 0;
	padding: 24px 8px;
	text-align: center;
	color: var(--aiot-muted);
	font-size: 0.9rem;
}

/* These surfaces stay white in dark mode, so use fixed dark text. */
.aiot-preview .aiot-preview__empty,
.aiot-cv-paper .aiot-preview__empty {
	color: #4b5a56;
}

.aiot-id-frame {
	position: relative;
	width: min(100%, 300px);
	margin: 0 auto;
}

.aiot-id-frame canvas {
	width: 100%;
	height: auto;
}

.aiot-id-guide {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.aiot-id-guide__oval {
	position: absolute;
	left: 27%;
	top: 8%;
	width: 46%;
	height: 60%;
	border: 2px dashed rgba(15, 118, 110, 0.78);
	border-radius: 50%;
}

.aiot-id-guide__line {
	position: absolute;
	left: 12%;
	right: 12%;
	top: 43%;
	border-top: 1px dashed rgba(15, 118, 110, 0.6);
}

.aiot-preset-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
	gap: 8px;
	margin-top: 12px;
}

.aiot-preset-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: var(--aiot-surface);
	cursor: pointer;
}

.aiot-preset-card.is-checked {
	border-color: var(--aiot-accent);
	box-shadow: inset 0 0 0 1px var(--aiot-accent);
}

.aiot-preset-card.is-primary {
	background: var(--aiot-accent-soft);
}

.aiot-preset-card input {
	margin: 3px 0 0;
	accent-color: var(--aiot-accent);
	flex: 0 0 auto;
}

.aiot-preset-card__label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
}

.aiot-preset-card__meta,
.aiot-preset-card__note {
	margin: 2px 0 0;
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--aiot-muted);
}

.aiot-preset-list {
	display: grid;
	gap: 8px;
	margin: 12px 0;
}

.aiot-preset-option {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 10px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: var(--aiot-surface);
	cursor: pointer;
}

.aiot-preset-option.is-checked,
.aiot-preset-option:has(input:checked) {
	border-color: var(--aiot-accent);
	background: var(--aiot-accent-soft);
}

.aiot-preset-option input {
	margin-top: 3px;
	accent-color: var(--aiot-accent);
	flex: 0 0 auto;
}

.aiot-preset-option strong,
.aiot-preset-option small {
	display: block;
}

.aiot-preset-option small {
	margin-top: 2px;
	font-size: 0.76rem;
	line-height: 1.4;
	color: var(--aiot-muted);
}

.aiot-custom-size {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 8px;
	align-items: center;
	margin-top: 10px;
}

.aiot-custom-size label {
	font-size: 0.84rem;
}

.aiot-range-row {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr) 3.4rem;
	align-items: center;
	gap: 9px;
	margin: 10px 0;
}

.aiot-range-row label {
	font-size: 0.86rem;
	font-weight: 600;
}

.aiot-range-row output {
	font-size: 0.82rem;
	text-align: right;
	color: var(--aiot-muted);
	font-variant-numeric: tabular-nums;
}

.aiot-nudge {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 8px 0;
}

.aiot-nudge .aiot-btn {
	min-width: 2.4rem;
	padding: 6px 9px;
}

.aiot-file-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 8px 0 0;
}

.aiot-meta-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	margin: 7px 0 0;
}

.aiot-meta-row .aiot-hint {
	margin: 0;
}

.aiot-actions--compact {
	margin-top: 10px;
	padding-top: 10px;
}

.aiot-chip-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 6px 13px;
	border: 1px solid var(--aiot-line);
	border-radius: 999px;
	background: var(--aiot-surface);
	color: var(--aiot-ink);
	font: inherit;
	font-size: 0.83rem;
	cursor: pointer;
}

.aiot-chip-button.is-active,
.aiot-chip-button[aria-pressed="true"] {
	border-color: var(--aiot-accent);
	background: var(--aiot-accent-soft);
	box-shadow: inset 0 0 0 1px var(--aiot-accent);
}

.aiot-chip-button:focus-visible {
	outline: 3px solid var(--aiot-accent);
	outline-offset: 2px;
}

.aiot-notes-output {
	max-width: 76ch;
	font-size: 0.95rem;
	line-height: 1.65;
}

.aiot-notes-output > p:first-child {
	margin-top: 0;
}

.aiot-notes-section {
	margin: 18px 0;
}

.aiot-notes-section h4 {
	margin: 0 0 6px;
}

.aiot-notes-section ol,
.aiot-notes-section ul {
	margin: 0;
	padding-left: 1.5rem;
}

.aiot-notes-section li {
	margin: 5px 0;
}

.aiot-answers {
	margin-top: 8px;
}

.aiot-answers summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--aiot-accent-strong);
}

.aiot-result-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.aiot-cv-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
	gap: 20px;
	align-items: start;
	margin-top: 18px;
}

.aiot-cv-form {
	background: var(--aiot-surface);
}

.aiot-form-section {
	margin: 0 0 18px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--aiot-line);
}

.aiot-form-section:last-of-type {
	border-bottom: 0;
}

.aiot-form-section > legend {
	float: left;
	width: 100%;
	margin-bottom: 10px;
}

.aiot-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	clear: both;
}

.aiot-form-grid label,
.aiot-block-label {
	display: block;
	font-size: 0.84rem;
	font-weight: 600;
}

.aiot-form-grid label input,
.aiot-form-grid label textarea {
	display: block;
	margin-top: 4px;
	font-weight: 400;
}

.aiot-block-label {
	margin: 10px 0;
}

.aiot-block-label textarea {
	display: block;
	margin-top: 4px;
	font-weight: 400;
}

.aiot-repeater-list {
	display: grid;
	gap: 10px;
	clear: both;
}

.aiot-repeater {
	padding: 11px;
	border: 1px solid var(--aiot-line);
	border-radius: var(--aiot-radius-sm);
	background: var(--aiot-soft);
}

.aiot-repeater__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.aiot-repeater__head p {
	margin: 0;
	font-size: 0.84rem;
}

.aiot-cv-side {
	position: sticky;
	top: 20px;
}

.aiot-cv-paper {
	width: 100%;
	aspect-ratio: 210 / 297;
	overflow: auto;
	padding: clamp(14px, 4vw, 26px);
	border: 1px solid var(--aiot-line);
	border-radius: 3px;
	background: #ffffff;
	color: #17201f;
	font-size: 0.75rem;
	line-height: 1.4;
}

.aiot-cv-paper h1 {
	margin: 0 0 4px;
	font-size: 1.55rem;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.aiot-cv-paper h2 {
	margin: 12px 0 4px;
	padding-bottom: 2px;
	border-bottom: 1px solid #c9d6d2;
	font-size: 0.63rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.aiot-cv-paper p {
	margin: 0 0 4px;
	line-height: 1.4;
}

.aiot-cv-paper ul {
	margin: 0 0 4px;
	padding-left: 1.05rem;
}

.aiot-cv-paper li {
	margin: 1px 0;
}

.aiot-cv-headline {
	font-size: 0.9rem;
	color: #3e4d49;
}

.aiot-cv-contact {
	font-size: 0.62rem;
	color: #4e5e59;
	overflow-wrap: anywhere;
}

.aiot-cv-section {
	margin-top: 2px;
}

.aiot-cv-entry {
	margin-bottom: 7px;
}

.aiot-cv-entry__head {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	font-weight: 700;
}

.aiot-cv-entry__head span {
	font-weight: 400;
	white-space: nowrap;
	color: #4e5e59;
}

.aiot-checklist-wrap {
	margin-top: 14px;
	padding-top: 10px;
	border-top: 1px solid var(--aiot-line);
}

.aiot-checklist-wrap h4 {
	margin: 0 0 7px;
	font-size: 0.9rem;
}

.aiot-checklist {
	display: grid;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.82rem;
}

.aiot-checklist li {
	display: flex;
	gap: 7px;
	align-items: flex-start;
}

.aiot-checklist li > span:first-child {
	width: 1.1rem;
	flex: 0 0 1.1rem;
	font-weight: 700;
}

.aiot-checklist li.is-ok > span:first-child {
	color: var(--aiot-accent-strong);
}

.aiot-checklist li.is-todo > span:first-child {
	color: var(--aiot-muted);
}

.aiot-tool .aiot-hint.is-error,
.aiot-count.is-error {
	color: var(--aiot-danger);
}

@media (max-width: 900px) {
	.aiot-tool-grid,
	.aiot-tool-grid--wide,
	.aiot-cv-layout {
		grid-template-columns: 1fr;
	}

	.aiot-cv-side {
		position: static;
	}

	.aiot-cv-paper {
		max-width: 520px;
		margin: 0 auto;
	}
}

@media (max-width: 640px) {
	.aiot-range-row {
		grid-template-columns: 6.5rem minmax(0, 1fr) 3rem;
	}

	.aiot-custom-size {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.aiot-form-grid {
		grid-template-columns: 1fr;
	}

	.aiot-preview canvas {
		max-height: 50vh;
	}
}

@media (prefers-color-scheme: dark) {
	.aiot-panel,
	.aiot-repeater {
		background: var(--aiot-soft);
	}

	.aiot-preview {
		border-color: var(--aiot-line);
		background: #ffffff;
	}

	.aiot-preview--checker {
		background-color: #ffffff;
	}

	.aiot-cv-paper {
		border-color: var(--aiot-line);
		background: #ffffff;
		color: #17201f;
	}

	.aiot-tool textarea,
	.aiot-tool input[type="email"],
	.aiot-tool input[type="url"],
	.aiot-tool input[type="tel"],
	.aiot-tool input[type="password"],
	.aiot-tool input[type="color"],
	.aiot-chip-button {
		background: var(--aiot-surface);
		color: var(--aiot-ink);
	}
}

@media print {
	.aiot-tool {
		display: none !important;
	}
}
