/* YemHub Agent Cost Simulator */
.yh-sim {
	--yh-sim-border: #e2e4e8;
	--yh-sim-bg: #ffffff;
	--yh-sim-muted: #646970;
	--yh-sim-accent: #6d28d9;
	max-width: 960px;
	margin: 1.5rem auto;
	padding: 1.25rem 1.25rem 1rem;
	border: 1px solid var(--yh-sim-border);
	border-radius: 14px;
	background: var(--yh-sim-bg);
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	font-size: 15px;
	line-height: 1.45;
}
.yh-sim *, .yh-sim *::before, .yh-sim *::after { box-sizing: border-box; }
.yh-sim__head { margin-bottom: 1rem; }
.yh-sim__title { margin: 0 0 .25rem; font-size: 1.2rem; }
.yh-sim__sub { margin: 0; color: var(--yh-sim-muted); font-size: .92rem; }

.yh-sim__controls {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-bottom: 1rem;
}
.yh-sim__field { flex: 1 1 130px; display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--yh-sim-muted); }
.yh-sim__field--wide { flex: 1 1 220px; }
.yh-sim__field select,
.yh-sim__field input {
	padding: .5rem .6rem;
	border: 1px solid var(--yh-sim-border);
	border-radius: 8px;
	font-size: .95rem;
	background: #fff;
	width: 100%;
}
.yh-sim__field select:focus,
.yh-sim__field input:focus { outline: 2px solid var(--yh-sim-accent); outline-offset: 1px; }

.yh-sim__chartwrap { position: relative; height: 340px; margin-bottom: 1rem; }

.yh-sim__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.yh-sim__kpi {
	padding: .75rem .9rem;
	border: 1px solid var(--yh-sim-border);
	border-radius: 10px;
	text-align: center;
}
.yh-sim__kpi--waste { background: #f6f3ff; border-color: #e3dbff; }
.yh-sim__kpi-val { display: block; font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.yh-sim__kpi-lbl { display: block; font-size: .76rem; color: var(--yh-sim-muted); margin-top: .2rem; }

.yh-sim__cliff {
	margin: .9rem 0 0;
	padding: .6rem .8rem;
	border-radius: 8px;
	background: #fff1f1;
	color: #b32d2e;
	font-size: .9rem;
	font-weight: 600;
}
.yh-sim__err {
	margin: .9rem 0 0;
	padding: .6rem .8rem;
	border-radius: 8px;
	background: #fff8e5;
	color: #8a6d00;
	font-size: .9rem;
}

@media (max-width: 640px) {
	.yh-sim__kpis { grid-template-columns: 1fr; }
	.yh-sim__chartwrap { height: 290px; }
}

/* Actions + embed modal (p1_11/p1_14) */
.yh-sim__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.yh-sim__btn {
	padding: .5rem .85rem;
	border: 1px solid var(--yh-sim-border);
	border-radius: 8px;
	background: #fff;
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	color: #1d2327;
}
.yh-sim__btn:hover { border-color: var(--yh-sim-accent); }
.yh-sim__btn--primary { background: var(--yh-sim-accent); border-color: var(--yh-sim-accent); color: #fff; margin-left: auto; }

.yh-sim__modal {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	background: rgba(17,17,26,.55); padding: 1rem;
}
.yh-sim__modal[hidden] { display: none; }
.yh-sim__modal-box {
	background: #fff; border-radius: 12px; padding: 1.1rem; width: 100%; max-width: 560px;
	box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.yh-sim__modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.yh-sim__modal-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--yh-sim-muted); }
.yh-sim__modal-note { margin: 0 0 .6rem; font-size: .85rem; color: var(--yh-sim-muted); }
.yh-sim__modal-code {
	width: 100%; font-family: Menlo, Consolas, monospace; font-size: .8rem;
	border: 1px solid var(--yh-sim-border); border-radius: 8px; padding: .6rem; resize: vertical; margin-bottom: .6rem;
}
