.el-prose--page:has(.elc-app) {
	max-width: none;
}

.elc-app {
	--elc-blue: var(--el-blue, #155eef);
	--elc-blue-dark: var(--el-blue-dark, #0f4bcc);
	--elc-cyan: var(--el-cyan, #0ea5c6);
	--elc-ink: var(--el-ink, #111827);
	--elc-text: var(--el-ink-soft, #344054);
	--elc-muted: var(--el-muted, #667085);
	--elc-line: var(--el-line, #e3e8ef);
	--elc-line-strong: var(--el-line-strong, #d0d7e2);
	--elc-soft: var(--el-surface-soft, #f7f9fc);
	--elc-blue-soft: var(--el-surface-blue, #f4f7ff);
	color: var(--elc-text);
	font-size: 16px;
	line-height: 1.55;
	margin: 0 auto;
	max-width: 1200px;
	width: 100%;
}

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

.elc-app h2,
.elc-app h3,
.elc-app p {
	margin-top: 0;
}

.elc-app a {
	text-decoration: none;
}

.elc-app button,
.elc-app input,
.elc-app select {
	font: inherit;
}

.elc-intro {
	background:
		radial-gradient(circle at 90% 5%, rgba(21, 94, 239, .11), transparent 29%),
		linear-gradient(135deg, #fbfcff, #f4f7ff);
	border: 1px solid #e3eafa;
	border-radius: 22px;
	margin-bottom: 26px;
	overflow: hidden;
	padding: clamp(28px, 5vw, 54px);
	position: relative;
}

.elc-intro::after {
	background-image:
		linear-gradient(rgba(21, 94, 239, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(21, 94, 239, .05) 1px, transparent 1px);
	background-size: 26px 26px;
	content: "";
	inset: 0 0 0 58%;
	mask-image: linear-gradient(90deg, transparent, #000 32%);
	opacity: .8;
	pointer-events: none;
	position: absolute;
}

.elc-eyebrow {
	color: var(--elc-blue);
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .12em;
	margin-bottom: 12px;
}

.elc-intro h2 {
	color: var(--elc-ink);
	font-size: clamp(1.75rem, 4vw, 3rem);
	letter-spacing: -.045em;
	line-height: 1.08;
	margin: 0 0 16px;
	max-width: 710px;
	position: relative;
	z-index: 1;
}

.elc-intro > p:last-child {
	color: var(--elc-muted);
	font-size: 1.03rem;
	margin: 0;
	max-width: 720px;
	position: relative;
	z-index: 1;
}

.elc-tool-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 54px;
}

.elc-tool-card {
	align-items: center;
	background: #fff;
	border: 1px solid var(--elc-line);
	border-radius: 14px;
	box-shadow: 0 3px 16px rgba(16, 24, 40, .04);
	color: var(--elc-ink);
	display: flex;
	gap: 12px;
	min-width: 0;
	padding: 16px;
	transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.elc-tool-card:hover {
	border-color: #aac3fb;
	box-shadow: 0 10px 26px rgba(21, 94, 239, .09);
	color: var(--elc-ink);
	transform: translateY(-2px);
}

.elc-tool-card__icon {
	align-items: center;
	background: #edf3ff;
	border: 1px solid #dce7ff;
	border-radius: 10px;
	color: var(--elc-blue);
	display: inline-flex;
	flex: 0 0 auto;
	font-size: .9rem;
	font-weight: 850;
	height: 42px;
	justify-content: center;
	letter-spacing: -.02em;
	width: 42px;
}

.elc-tool-card strong,
.elc-tool-card small {
	display: block;
}

.elc-tool-card strong {
	font-size: .88rem;
	line-height: 1.25;
}

.elc-tool-card small {
	color: var(--elc-muted);
	font-size: .71rem;
	font-weight: 500;
	line-height: 1.35;
	margin-top: 4px;
}

.elc-calculator {
	background: #fff;
	border: 1px solid var(--elc-line);
	border-radius: 20px;
	box-shadow: 0 10px 34px rgba(16, 24, 40, .055);
	margin: 0 0 28px;
	overflow: hidden;
	padding: clamp(22px, 4vw, 38px);
	scroll-margin-top: 105px;
}

.elc-section-head {
	align-items: flex-end;
	display: flex;
	gap: 28px;
	justify-content: space-between;
	margin-bottom: 24px;
}

.elc-section-head > div {
	align-items: center;
	display: flex;
	gap: 12px;
}

.elc-section-head h2 {
	color: var(--elc-ink);
	font-size: clamp(1.35rem, 2.5vw, 1.85rem);
	letter-spacing: -.035em;
	line-height: 1.15;
	margin: 0;
}

.elc-section-head > p {
	color: var(--elc-muted);
	font-size: .88rem;
	margin: 0;
	max-width: 440px;
	text-align: right;
}

.elc-section-number {
	align-items: center;
	background: var(--elc-blue);
	border-radius: 9px;
	color: #fff;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: .72rem;
	font-weight: 800;
	height: 34px;
	justify-content: center;
	letter-spacing: .05em;
	width: 34px;
}

.elc-segmented {
	background: #f0f3f8;
	border: 1px solid #e4e8ef;
	border-radius: 11px;
	display: inline-flex;
	gap: 3px;
	margin-bottom: 22px;
	padding: 4px;
}

.elc-segmented button {
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--elc-muted);
	cursor: pointer;
	font-size: .86rem;
	font-weight: 720;
	min-height: 38px;
	padding: 8px 14px;
}

.elc-segmented button:hover {
	color: var(--elc-blue);
}

.elc-segmented button.is-active {
	background: #fff;
	box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
	color: var(--elc-blue);
}

.elc-segmented--compact {
	display: flex;
	margin-bottom: 18px;
	width: 100%;
}

.elc-segmented--compact button {
	flex: 1;
}

.elc-band-layout,
.elc-network-grid,
.elc-code-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.35fr);
}

.elc-controls-card,
.elc-visual-card {
	border: 1px solid var(--elc-line);
	border-radius: 15px;
	min-width: 0;
	padding: 20px;
}

.elc-controls-card {
	background: #fbfcfe;
}

.elc-visual-card {
	background:
		radial-gradient(circle at 85% 5%, rgba(21, 94, 239, .08), transparent 28%),
		#fff;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.elc-field {
	display: block;
	margin: 0 0 14px;
	min-width: 0;
}

.elc-field:last-child {
	margin-bottom: 0;
}

.elc-field > span {
	color: var(--elc-text);
	display: block;
	font-size: .76rem;
	font-weight: 730;
	line-height: 1.3;
	margin-bottom: 7px;
}

.elc-field input,
.elc-field select,
.elc-component-row input,
.elc-component-row select {
	background: #fff;
	border: 1px solid var(--elc-line-strong);
	border-radius: 9px;
	color: var(--elc-ink);
	height: 44px;
	line-height: 1.2;
	outline: 0;
	padding: 9px 11px;
	transition: border-color .15s ease, box-shadow .15s ease;
	width: 100%;
}

.elc-field input:focus,
.elc-field select:focus,
.elc-component-row input:focus,
.elc-component-row select:focus {
	border-color: var(--elc-blue);
	box-shadow: 0 0 0 3px rgba(21, 94, 239, .1);
}

.elc-field-row {
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) minmax(100px, .7fr);
}

.elc-field-hint {
	color: var(--elc-muted);
	font-size: .73rem;
	margin: -5px 0 0;
}

.elc-band-controls {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.elc-band-control {
	margin: 0;
}

.elc-band-control__select-wrap {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: 18px minmax(0, 1fr);
}

.elc-color-dot {
	border: 1px solid rgba(17, 24, 39, .18);
	border-radius: 999px;
	display: block;
	height: 16px;
	width: 16px;
}

.elc-resistor-stage {
	align-items: center;
	display: grid;
	grid-template-columns: minmax(26px, 1fr) minmax(210px, 390px) minmax(26px, 1fr);
	justify-content: center;
	margin: 22px auto 30px;
	max-width: 680px;
	min-height: 126px;
	width: 100%;
}

.elc-resistor__lead {
	background: linear-gradient(#aab2c0, #667085, #c6ccd5);
	height: 5px;
}

.elc-resistor__body {
	align-items: stretch;
	background: linear-gradient(180deg, #ead7a6 0%, #d3b56f 50%, #efdca9 100%);
	border: 2px solid rgba(92, 68, 20, .24);
	border-radius: 48px;
	box-shadow: inset 0 7px 9px rgba(255, 255, 255, .32), 0 7px 16px rgba(52, 64, 84, .12);
	display: flex;
	gap: 12px;
	height: 88px;
	overflow: hidden;
	padding: 0 34px;
}

.elc-resistor-band {
	border-left: 1px solid rgba(0, 0, 0, .13);
	border-right: 1px solid rgba(255, 255, 255, .18);
	box-shadow: inset 0 8px 7px rgba(255, 255, 255, .15), inset 0 -8px 7px rgba(0, 0, 0, .08);
	display: block;
	flex: 0 0 18px;
	height: 100%;
}

.elc-resistor-band.is-tolerance,
.elc-resistor-band.is-tempco {
	margin-left: auto;
}

.elc-resistor-band.is-tempco {
	margin-left: 0;
}

.elc-result {
	background: linear-gradient(135deg, #f7faff, #eef4ff);
	border: 1px solid #dbe7ff;
	border-radius: 13px;
	color: var(--elc-text);
	padding: 17px 19px;
}

.elc-result > span,
.elc-result > strong,
.elc-result > small {
	display: block;
}

.elc-result > span {
	color: var(--elc-muted);
	font-size: .72rem;
	font-weight: 760;
	letter-spacing: .04em;
	margin-bottom: 4px;
	text-transform: uppercase;
}

.elc-result > strong {
	color: var(--elc-blue);
	font-size: clamp(1.45rem, 3vw, 2rem);
	font-weight: 820;
	letter-spacing: -.035em;
	line-height: 1.15;
}

.elc-result > small {
	color: var(--elc-muted);
	font-size: .74rem;
	line-height: 1.45;
	margin-top: 6px;
}

.elc-copy-button {
	background: #fff;
	border: 1px solid #c9d9fb;
	border-radius: 8px;
	color: var(--elc-blue);
	cursor: pointer;
	font-size: .72rem;
	font-weight: 760;
	margin-top: 12px;
	min-height: 34px;
	padding: 7px 11px;
}

.elc-copy-button:hover {
	background: #f7faff;
	border-color: var(--elc-blue);
}

.elc-component-list {
	display: grid;
	gap: 9px;
}

.elc-component-row {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: 34px minmax(0, 1fr) 82px 38px;
}

.elc-component-label {
	align-items: center;
	background: #eaf1ff;
	border-radius: 8px;
	color: var(--elc-blue);
	display: flex;
	font-size: .72rem;
	font-weight: 800;
	height: 34px;
	justify-content: center;
	width: 34px;
}

.elc-remove-button {
	align-items: center;
	background: #fff;
	border: 1px solid var(--elc-line);
	border-radius: 8px;
	color: #98a2b3;
	cursor: pointer;
	display: flex;
	font-size: 1.15rem;
	height: 38px;
	justify-content: center;
	padding: 0;
	width: 38px;
}

.elc-remove-button:hover:not(:disabled) {
	border-color: #f0b4b4;
	color: #c93636;
}

.elc-remove-button:disabled {
	cursor: not-allowed;
	opacity: .42;
}

.elc-add-button {
	background: #fff;
	border: 1px dashed #9bb8f5;
	border-radius: 9px;
	color: var(--elc-blue);
	cursor: pointer;
	font-size: .8rem;
	font-weight: 760;
	margin-top: 12px;
	min-height: 42px;
	padding: 8px 12px;
	width: 100%;
}

.elc-add-button:hover {
	background: #f3f7ff;
	border-style: solid;
}

.elc-add-button:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.elc-circuit {
	align-items: center;
	display: flex;
	justify-content: center;
	margin-bottom: 18px;
	min-height: 210px;
	overflow-x: auto;
	padding: 4px;
	width: 100%;
}

.elc-circuit svg {
	display: block;
	min-width: 500px;
	width: 100%;
}

.elc-circuit-line {
	fill: none;
	stroke: #667085;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3;
}

.elc-circuit-component {
	fill: #eef4ff;
	stroke: var(--elc-blue);
	stroke-width: 2.5;
}

.elc-circuit-capacitor {
	stroke: var(--elc-blue);
	stroke-linecap: round;
	stroke-width: 5;
}

.elc-circuit text {
	fill: var(--elc-text);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 12px;
	text-anchor: middle;
}

.elc-circuit .elc-circuit-name {
	fill: var(--elc-blue);
	font-size: 13px;
	font-weight: 800;
}

.elc-safety-note {
	background: #fff8e9;
	border: 1px solid #f5dfae;
	border-radius: 10px;
	color: #7a4b00;
	font-size: .74rem;
	line-height: 1.5;
	margin: 12px 0 0;
	padding: 10px 12px;
}

.elc-capacitor-stage {
	align-items: center;
	display: grid;
	grid-template-columns: minmax(35px, 1fr) 130px minmax(35px, 1fr);
	margin: 18px auto 28px;
	max-width: 480px;
	min-height: 140px;
	width: 100%;
}

.elc-capacitor-leg {
	background: linear-gradient(#c8ced8, #667085, #c8ced8);
	height: 4px;
}

.elc-capacitor-body {
	align-items: center;
	background: linear-gradient(145deg, #2d72f4, #0f4bcc);
	border: 2px solid #0b3fae;
	border-radius: 14px 14px 28px 28px;
	box-shadow: inset 0 7px 12px rgba(255, 255, 255, .16), 0 9px 22px rgba(21, 94, 239, .18);
	color: #fff;
	display: flex;
	font-size: 1.05rem;
	font-weight: 820;
	height: 92px;
	justify-content: center;
	letter-spacing: .04em;
	padding: 10px;
	text-align: center;
}

.elc-disclaimer {
	background: #f8fafc;
	border: 1px solid var(--elc-line);
	border-radius: 12px;
	color: var(--elc-muted);
	font-size: .78rem;
	line-height: 1.55;
	margin-top: 28px;
	padding: 14px 16px;
}

.elc-disclaimer strong {
	color: var(--elc-ink);
}

.elc-app [hidden] {
	display: none !important;
}

.elc-app button:focus-visible,
.elc-app input:focus-visible,
.elc-app select:focus-visible,
.elc-tool-card:focus-visible {
	outline: 3px solid rgba(21, 94, 239, .28);
	outline-offset: 2px;
}

@media (max-width: 960px) {
	.elc-tool-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.elc-band-layout,
	.elc-network-grid,
	.elc-code-grid {
		grid-template-columns: 1fr;
	}

	.elc-visual-card {
		min-height: 350px;
	}
}

@media (max-width: 700px) {
	.elc-app {
		font-size: 15px;
	}

	.elc-intro {
		border-radius: 17px;
	}

	.elc-intro::after {
		left: 35%;
		opacity: .45;
	}

	.elc-section-head {
		align-items: flex-start;
		flex-direction: column;
		gap: 9px;
	}

	.elc-section-head > p {
		text-align: left;
	}

	.elc-calculator {
		border-radius: 15px;
		padding: 18px;
	}

	.elc-controls-card,
	.elc-visual-card {
		padding: 15px;
	}

	.elc-resistor__body {
		gap: 8px;
		height: 74px;
		padding-inline: 22px;
	}

	.elc-resistor-band {
		flex-basis: 14px;
	}

	.elc-visual-card {
		min-height: 310px;
	}
}

@media (max-width: 520px) {
	.elc-tool-grid {
		grid-template-columns: 1fr;
		margin-bottom: 36px;
	}

	.elc-tool-card {
		padding: 13px;
	}

	.elc-segmented {
		display: flex;
		width: 100%;
	}

	.elc-segmented button {
		flex: 1;
		font-size: .78rem;
		padding-inline: 8px;
	}

	.elc-band-controls,
	.elc-field-row {
		grid-template-columns: 1fr;
	}

	.elc-component-row {
		grid-template-columns: 32px minmax(0, 1fr) 72px 34px;
	}

	.elc-component-label,
	.elc-remove-button {
		height: 34px;
		width: 34px;
	}

	.elc-resistor-stage {
		grid-template-columns: 24px minmax(205px, 1fr) 24px;
		overflow: hidden;
	}

	.elc-resistor__body {
		padding-inline: 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elc-app *,
	.elc-app *::before,
	.elc-app *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
