/* x-calculator interactive tools — shared design tokens & primitives.
   Brand: black-on-white, e-Ukraine font (inherited), one gradient accent #D155F8 → #6760D8. */
.xct {
	--xct-ink: #0a0a0a;
	--xct-muted: #6b6b6b;
	--xct-line: #e4e4e7;
	--xct-soft: #f6f6f7;
	--xct-accent: #6760d8;
	--xct-grad: linear-gradient(135deg, #d155f8 0%, #6760d8 100%);
	--xct-radius: 14px;
	--xct-danger: #c62828;
	--xct-ok: #1b7f3b;
	font: inherit;
	color: var(--xct-ink);
	margin: 0 0 2rem;
}
.xct *, .xct *::before, .xct *::after { box-sizing: border-box; }
.xct-card {
	border: 1px solid var(--xct-line);
	border-radius: var(--xct-radius);
	background: #fff;
	padding: clamp(16px, 3vw, 28px);
	box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(103,96,216,.18);
}
.xct-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.xct-row + .xct-row { margin-top: 14px; }
.xct-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 140px; min-width: 0; }
.xct-label { font-size: .8125rem; font-weight: 500; color: var(--xct-muted); letter-spacing: .01em; }
.xct-input, .xct-select, .xct-textarea {
	width: 100%; min-height: 46px; padding: 10px 12px;
	border: 1px solid var(--xct-line); border-radius: 10px; background: #fff;
	font: inherit; font-size: 1rem; color: var(--xct-ink);
	transition: border-color .15s, box-shadow .15s;
}
.xct-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.xct-input:focus, .xct-select:focus, .xct-textarea:focus {
	outline: none; border-color: var(--xct-accent); box-shadow: 0 0 0 3px rgba(103,96,216,.18);
}
.xct-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.xct-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
	font: inherit; font-size: .9375rem; font-weight: 600; letter-spacing: .01em;
	background: var(--xct-ink); color: #fff; transition: transform .08s, opacity .15s, background .15s;
}
.xct-btn:hover { opacity: .9; }
.xct-btn:active { transform: scale(.98); }
.xct-btn:focus-visible { outline: 3px solid rgba(103,96,216,.45); outline-offset: 2px; }
.xct-btn--accent { background: var(--xct-grad); }
.xct-btn--ghost { background: transparent; color: var(--xct-ink); box-shadow: inset 0 0 0 1px var(--xct-line); }
.xct-btn--ghost:hover { background: var(--xct-soft); opacity: 1; }
.xct-btn[disabled] { opacity: .4; cursor: not-allowed; }
.xct-display {
	font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
	font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 600; line-height: 1; letter-spacing: -.02em;
	text-align: center; padding: 18px 0 10px;
}
.xct-sub { text-align: center; color: var(--xct-muted); font-size: .875rem; }
.xct-out {
	margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--xct-soft);
	font-variant-numeric: tabular-nums; word-break: break-word;
}
.xct-out strong { font-size: 1.25rem; }
.xct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xct-chip {
	min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--xct-line);
	background: #fff; font: inherit; font-size: .875rem; cursor: pointer; color: var(--xct-ink);
}
.xct-chip:hover { border-color: var(--xct-ink); }
.xct-chip[aria-pressed="true"] { background: var(--xct-ink); color: #fff; border-color: var(--xct-ink); }
.xct-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-variant-numeric: tabular-nums; }
.xct-table th, .xct-table td { padding: 8px 10px; border-bottom: 1px solid var(--xct-line); text-align: left; }
.xct-error { color: var(--xct-danger); font-size: .875rem; margin-top: 8px; }
.xct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) {
	.xct-btns .xct-btn { flex: 1 1 auto; }
}
