/* YDI FSW calculator — inherits the theme's design tokens, with fallbacks
   so it still looks right if dropped into any other theme. */

.ydi-calc {
	--ydi-navy: var(--navy, #0F2A3D);
	--ydi-gold: var(--gold, #B8863B);
	--ydi-pine: var(--pine, #14708A);
	--ydi-line: var(--line, #E2E8ED);
	--ydi-mist: var(--mist, #F5F8FA);

	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	font-size: 14px;
	color: var(--ydi-navy);
}

@media (max-width: 900px) {
	.ydi-calc { grid-template-columns: 1fr; }
}

/* ---------- form ---------- */
.ydi-fs {
	border: 1px solid var(--ydi-line);
	border-radius: 10px;
	padding: 18px 20px 20px;
	margin: 0 0 16px;
	background: #fff;
}

.ydi-fs legend {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 0 8px;
	margin-left: -8px;
	width: auto;
	float: none;
	color: var(--ydi-navy);
}

.ydi-fs-max {
	font-family: 'IBM Plex Mono', ui-monospace, monospace;
	font-weight: 500;
	letter-spacing: .02em;
	text-transform: none;
	color: var(--ydi-gold);
	margin-left: 6px;
}

.ydi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}

.ydi-field { display: block; margin-bottom: 12px; }
.ydi-grid .ydi-field { margin-bottom: 0; }

.ydi-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #33505f;
}

.ydi-sublabel {
	font-size: 12.5px;
	font-weight: 600;
	margin: 4px 0 10px;
}

.ydi-calc select,
.ydi-calc input[type="number"] {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--ydi-line);
	border-radius: 6px;
	font: inherit;
	font-size: 13.5px;
	background: #fff;
	color: var(--ydi-navy);
}

.ydi-calc select:focus,
.ydi-calc input[type="number"]:focus {
	outline: 2px solid var(--ydi-pine);
	outline-offset: 1px;
	border-color: var(--ydi-pine);
}

.ydi-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 10px 0;
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
}

.ydi-check input { margin-top: 3px; flex-shrink: 0; width: 15px; height: 15px; accent-color: var(--ydi-pine); }
.ydi-check em { font-style: normal; color: var(--ydi-gold); font-weight: 600; }
.ydi-check[hidden] { display: none; }

.ydi-hint {
	font-size: 12px;
	color: #556E80;
	margin: 8px 0 0;
	line-height: 1.55;
}
.ydi-hint[hidden] { display: none; }
.ydi-grid[hidden] { display: none; }

/* ---------- result panel ---------- */
.ydi-result {
	position: sticky;
	top: 100px;
	border: 1px solid var(--ydi-line);
	border-radius: 10px;
	padding: 22px;
	background: var(--ydi-mist);
}

@media (max-width: 900px) {
	.ydi-result { position: static; }
}

.ydi-score-num {
	font-family: 'IBM Plex Mono', ui-monospace, monospace;
	font-size: 44px;
	font-weight: 600;
	line-height: 1;
	color: var(--ydi-navy);
}

.ydi-score-den {
	font-size: 16px;
	color: #556E80;
	margin-left: 6px;
}

.ydi-score-pass {
	font-size: 13px;
	font-weight: 700;
	margin-top: 8px;
}

.ydi-score-pass.is-pass    { color: #1B7A4B; }
.ydi-score-pass.is-fail    { color: #A8541F; }
.ydi-score-pass.is-blocked { color: #A3271F; }

/* progress meter with the 67 pass mark */
.ydi-meter {
	position: relative;
	height: 8px;
	background: #dbe4ea;
	border-radius: 99px;
	margin: 16px 0 26px;
	overflow: visible;
}

.ydi-meter-fill {
	height: 100%;
	width: 0;
	background: var(--ydi-pine);
	border-radius: 99px;
	transition: width .25s ease;
}

.ydi-meter-mark {
	position: absolute;
	top: -4px;
	width: 2px;
	height: 16px;
	background: var(--ydi-gold);
}

.ydi-meter-mark span {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	font-family: 'IBM Plex Mono', ui-monospace, monospace;
	color: var(--ydi-gold);
	white-space: nowrap;
}

.ydi-break {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.ydi-break th,
.ydi-break td {
	padding: 8px 0;
	border-bottom: 1px solid var(--ydi-line);
	text-align: left;
	font-weight: 500;
}

.ydi-break td {
	text-align: right;
	font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

.ydi-break tr:last-child th,
.ydi-break tr:last-child td { border-bottom: 0; }

.ydi-blockers {
	margin-top: 16px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #FBEDEB;
	border: 1px solid #F0C8C2;
	font-size: 12.5px;
	line-height: 1.55;
	color: #7A2118;
}

.ydi-blockers[hidden] { display: none; }
.ydi-blockers strong { display: block; margin-bottom: 6px; }
.ydi-blockers ul { margin: 0; padding-left: 18px; }
.ydi-blockers li { margin-bottom: 5px; }

.ydi-disclaimer {
	margin: 16px 0 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: #556E80;
}

.ydi-disclaimer a { color: var(--ydi-pine); }

/* ---------- Nova Scotia program checker ---------- */
.ydi-fs--program { border-color: var(--ydi-gold); }
.ydi-ns-program {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ydi-gold);
	margin-bottom: 10px;
}
.ydi-prog-panel[hidden] { display: none; }
.ydi-prog-note[hidden] { display: none; }
.ydi-calc--ns .ydi-score-num { font-size: 34px; }
.ydi-calc--ns .ydi-score-den { font-size: 14px; }
