/* IFSCA FME Enforcement Readiness Diagnostic — styles.
 * Defensive reset is deliberately scoped to text-semantic elements ONLY
 * (h1-h6, p, ul, ol, li, a, label). Never blanket-reset div/span/button/input:
 * a broad `.fmed-root div { … }` outranks single-class component rules and
 * silently wins regardless of source order.
 */

.fmed-root {
	--fmed-green: #1d5c3a;
	--fmed-green-deep: #14432a;
	--fmed-green-soft: #eaf2ec;
	--fmed-ink: #22301f;
	--fmed-muted: #6b7266;
	--fmed-line: #e4e1d8;
	--fmed-cream: #f7f5f0;
	--fmed-card: #ffffff;
	--fmed-amber: #e8a33d;
	--fmed-amber-soft: #fdf3e2;
	--fmed-red: #c94f3d;
	--fmed-red-soft: #fbebe8;
	--fmed-radius: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--fmed-ink);
	background: var(--fmed-cream);
	border-radius: 16px;
	line-height: 1.55;
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
}

/* Scoped text-semantic reset only (see note above) */
.fmed-root h1, .fmed-root h2, .fmed-root h3, .fmed-root h4, .fmed-root h5, .fmed-root h6,
.fmed-root p, .fmed-root ul, .fmed-root ol, .fmed-root li, .fmed-root a, .fmed-root label {
	margin: 0;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
	list-style: none;
}
.fmed-root p { margin-bottom: 0.4em; }

.fmed-shell { max-width: 1120px; margin: 0 auto; padding: 28px 22px 40px; }

.fmed-ic { width: 20px; height: 20px; fill: currentColor; vertical-align: -4px; flex: 0 0 auto; }

/* ---------- header ---------- */
.fmed-header { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 26px; }
.fmed-title { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; color: var(--fmed-green-deep); line-height: 1.2; }
.fmed-sub { color: var(--fmed-muted); max-width: 560px; margin-top: 8px; }
.fmed-privacy { display: flex; gap: 10px; align-items: flex-start; background: var(--fmed-card); border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 14px 16px; max-width: 300px; color: var(--fmed-green); }
.fmed-privacy strong { display: block; color: var(--fmed-ink); font-size: 14px; }
.fmed-privacy span { color: var(--fmed-muted); font-size: 13px; }

/* ---------- layout ---------- */
.fmed-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .fmed-layout { grid-template-columns: 1fr; } }
.fmed-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- cards ---------- */
.fmed-card { background: var(--fmed-card); border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 22px 24px; }
.fmed-qn { font-size: 18px; font-weight: 700; color: var(--fmed-ink); }
.fmed-qhint { color: var(--fmed-muted); font-size: 13px; margin: 6px 0 14px; }
.fmed-cardhead { font-size: 16px; font-weight: 700; margin-bottom: 10px; }

/* ---------- stepper ---------- */
.fmed-stepper { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }
.fmed-stepper li { display: flex; align-items: center; gap: 12px; padding: 8px 0; position: relative; color: var(--fmed-muted); font-weight: 600; }
.fmed-stepper li + li::before { content: ""; position: absolute; left: 13px; top: -12px; height: 20px; width: 2px; background: var(--fmed-line); }
.fmed-step-dot { width: 28px; height: 28px; border-radius: 50%; background: #eceae2; color: var(--fmed-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.fmed-stepper li.is-active { color: var(--fmed-ink); }
.fmed-stepper li.is-active .fmed-step-dot,
.fmed-stepper li.is-done .fmed-step-dot { background: var(--fmed-green); color: #fff; }
@media (max-width: 860px) { .fmed-stepper { flex-direction: row; flex-wrap: wrap; gap: 12px; } .fmed-stepper li + li::before { display: none; } .fmed-step-label { font-size: 13px; } }

.fmed-why { display: flex; gap: 10px; background: var(--fmed-card); border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 14px 16px; color: var(--fmed-green); font-size: 13px; }
.fmed-why strong { color: var(--fmed-ink); display: block; margin-bottom: 4px; }
.fmed-why p { color: var(--fmed-muted); }
.fmed-help { margin-top: 16px; }

/* ---------- selection cards ---------- */
.fmed-selgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .fmed-selgrid { grid-template-columns: 1fr; } }
.fmed-selcard { position: relative; text-align: center; background: #fdfcfa; border: 1.5px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 26px 16px 18px; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fmed-selcard:hover { border-color: var(--fmed-green); }
.fmed-selcard:focus-visible { outline: 3px solid var(--fmed-green); outline-offset: 2px; }
.fmed-selcard.is-selected { border-color: var(--fmed-green); box-shadow: 0 0 0 1px var(--fmed-green) inset; background: #fff; }
.fmed-radio { position: absolute; top: 12px; left: 12px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cfccc2; background: #fff; }
.fmed-selcard.is-selected .fmed-radio, .fmed-opt.is-selected .fmed-radio { border-color: var(--fmed-green); box-shadow: 0 0 0 4px #fff inset; background: var(--fmed-green); }
.fmed-selcard-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--fmed-green-soft); color: var(--fmed-green); display: inline-flex; align-items: center; justify-content: center; }
.fmed-selcard-icon .fmed-ic { width: 26px; height: 26px; }
.fmed-selcard-title { font-weight: 700; font-size: 15px; }
.fmed-selcard-desc { color: var(--fmed-muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- flags ---------- */
.fmed-flags { display: flex; flex-direction: column; gap: 12px; }
.fmed-flag { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.fmed-flag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fmed-flag-box { width: 18px; height: 18px; border: 1.5px solid #cfccc2; border-radius: 5px; background: #fff; flex: 0 0 auto; margin-top: 2px; position: relative; }
.fmed-flag input:checked + .fmed-flag-box { background: var(--fmed-green); border-color: var(--fmed-green); }
.fmed-flag input:checked + .fmed-flag-box::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.fmed-flag input:focus-visible + .fmed-flag-box { outline: 3px solid var(--fmed-green); outline-offset: 2px; }

/* ---------- hard stop ---------- */
.fmed-hardstop { display: flex; gap: 10px; margin-top: 16px; background: var(--fmed-red-soft); border: 1px solid #eccbc4; border-radius: var(--fmed-radius); padding: 14px 16px; color: var(--fmed-red); }
.fmed-hardstop strong { display: block; color: #8f2f21; margin-bottom: 4px; }
.fmed-hardstop p { color: #7a4238; font-size: 13.5px; }

/* ---------- progress ---------- */
.fmed-progressbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-weight: 700; font-size: 14px; }
.fmed-track { flex: 1; height: 8px; border-radius: 6px; background: #e8e5dc; overflow: hidden; }
.fmed-fill { height: 100%; background: var(--fmed-green); border-radius: 6px; transition: width 0.25s; }
.fmed-pct { color: var(--fmed-green); }

/* ---------- sidebar sections ---------- */
.fmed-sidebox { background: var(--fmed-card); border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 14px; }
.fmed-sidehead { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fmed-muted); margin: 4px 6px 10px; }
.fmed-sections { display: flex; flex-direction: column; gap: 2px; }
.fmed-sections button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px; color: var(--fmed-ink); text-align: left; border-left: 3px solid transparent; }
.fmed-sections button:hover { background: #f4f2ec; }
.fmed-sections li.is-active button { background: var(--fmed-green-soft); border-left-color: var(--fmed-green); font-weight: 700; color: var(--fmed-green-deep); }
.fmed-sections button span { flex: 1; min-width: 0; }
.fmed-sections button em { font-style: normal; color: var(--fmed-muted); font-size: 12px; }
.fmed-sections .fmed-ic { width: 17px; height: 17px; color: var(--fmed-green); }

/* ---------- question card ---------- */
.fmed-qmeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fmed-qcat { font-family: Georgia, serif; font-weight: 700; font-size: 18px; color: var(--fmed-green-deep); }
.fmed-qcount { color: var(--fmed-muted); font-size: 13px; }
.fmed-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 20px; padding: 3px 10px; }
.fmed-tag-red { background: var(--fmed-red-soft); color: var(--fmed-red); }
.fmed-tag-amber { background: var(--fmed-amber-soft); color: #a06a13; }
.fmed-rule { border: 0; height: 3px; width: 44px; background: var(--fmed-green); margin: 12px 0 16px; border-radius: 2px; }
.fmed-qtext { font-size: 19px; font-weight: 700; line-height: 1.45; margin-bottom: 18px; }
.fmed-banner { display: flex; gap: 10px; background: var(--fmed-amber-soft); border: 1px solid #f0dcb6; border-radius: var(--fmed-radius); padding: 12px 14px; margin-bottom: 16px; color: #8a5c10; font-size: 13px; }

.fmed-opts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.fmed-opt { position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fdfcfa; border: 1.5px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 15px 16px 15px 16px; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.15s; }
.fmed-opt .fmed-radio { position: static; margin-top: 3px; }
.fmed-opt:hover { border-color: var(--fmed-green); }
.fmed-opt:focus-visible { outline: 3px solid var(--fmed-green); outline-offset: 2px; }
.fmed-opt.is-selected { border-color: var(--fmed-green); background: var(--fmed-green-soft); }
.fmed-opt-body strong { display: block; font-size: 15px; margin-bottom: 2px; }
.fmed-opt-body span { color: var(--fmed-muted); font-size: 13px; }

.fmed-whybox { display: flex; gap: 10px; background: #f6f5f1; border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 14px 16px; color: var(--fmed-green); }
.fmed-whybox strong { color: var(--fmed-ink); }
.fmed-whybox p { color: #4c5347; font-size: 13.5px; margin-top: 3px; }
.fmed-misc { background: var(--fmed-amber-soft); border-radius: 8px; padding: 8px 10px; }
.fmed-evid { background: var(--fmed-green-soft); border-radius: 8px; padding: 8px 10px; }
.fmed-cite { color: var(--fmed-muted); font-size: 12.5px; }

/* ---------- footer bar / buttons ---------- */
.fmed-footerbar { display: flex; gap: 12px; align-items: center; background: var(--fmed-card); border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 14px 16px; }
.fmed-footspacer { flex: 1; }
.fmed-footerbar .fmed-btn-primary { margin-left: auto; }
.fmed-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.fmed-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.fmed-btn:focus-visible { outline: 3px solid var(--fmed-green); outline-offset: 2px; }
.fmed-btn-primary { background: var(--fmed-green-deep); border: 1px solid var(--fmed-green-deep); color: #fff; }
.fmed-btn-primary:hover:not(:disabled) { background: var(--fmed-green); }
.fmed-btn-ghost { background: #fff; border: 1px solid var(--fmed-line); color: var(--fmed-ink); }
.fmed-btn-ghost:hover:not(:disabled) { border-color: var(--fmed-green); color: var(--fmed-green-deep); }
.fmed-btn .fmed-ic { width: 17px; height: 17px; }

.fmed-globalnote { display: flex; gap: 8px; align-items: center; color: var(--fmed-muted); font-size: 12.5px; justify-content: center; margin-top: 18px; }
.fmed-fineprint { color: var(--fmed-muted); font-size: 12.5px; margin-top: 10px; }
.fmed-error { color: var(--fmed-red); font-weight: 600; font-size: 13.5px; }

/* ---------- welcome / resume ---------- */
.fmed-resume h2 { font-family: Georgia, serif; font-size: 22px; color: var(--fmed-green-deep); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.fmed-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.fmed-actions-center { justify-content: center; margin-top: 20px; }

/* ---------- lead form ---------- */
.fmed-leadform { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
@media (max-width: 720px) { .fmed-leadform { grid-template-columns: 1fr; } }
.fmed-leadform label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; }
.fmed-leadform input { border: 1.5px solid var(--fmed-line); border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; color: var(--fmed-ink); }
.fmed-leadform input:focus { outline: 3px solid var(--fmed-green-soft); border-color: var(--fmed-green); }

/* ---------- results ---------- */
.fmed-results-head { margin-bottom: 20px; }
.fmed-results-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 860px) { .fmed-results-grid { grid-template-columns: 1fr; } }
.fmed-overall-inner { display: flex; gap: 16px; align-items: flex-start; }
.fmed-tiericon { width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.fmed-tiericon .fmed-ic { width: 30px; height: 30px; }
.fmed-tiericon.fmed-tier-good { background: var(--fmed-green-soft); color: var(--fmed-green); }
.fmed-tiericon.fmed-tier-warn { background: var(--fmed-amber-soft); color: var(--fmed-amber); }
.fmed-tiericon.fmed-tier-bad { background: var(--fmed-red-soft); color: var(--fmed-red); }
.fmed-tier { font-family: Georgia, serif; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
p.fmed-tier-good { color: var(--fmed-green); }
p.fmed-tier-warn { color: #c07f16; }
p.fmed-tier-bad { color: var(--fmed-red); }

.fmed-sumlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.fmed-sumlist li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.fmed-sumlist strong { margin-left: auto; font-size: 18px; }
.fmed-dot { width: 9px; height: 9px; border-radius: 50%; background: #cfccc2; flex: 0 0 auto; }
.fmed-legend-good .fmed-dot { background: #2f7d4f; }
.fmed-legend-warn .fmed-dot { background: var(--fmed-amber); }
.fmed-legend-bad .fmed-dot { background: var(--fmed-red); }
.fmed-legend-bad strong { color: var(--fmed-red); }
.fmed-sumtotal { border-top: 1px solid var(--fmed-line); padding-top: 10px; font-size: 14px; display: flex; justify-content: space-between; }

.fmed-areas-inner { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.fmed-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 220px; }
.fmed-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fmed-legend em { font-style: normal; margin-left: auto; font-size: 12px; font-weight: 700; }
.fmed-legend-good em { color: #2f7d4f; }
.fmed-legend-warn em { color: #c07f16; }
.fmed-legend-bad em { color: var(--fmed-red); }

/* ---------- findings accordions ---------- */
.fmed-head-bad { color: var(--fmed-red); display: flex; align-items: center; gap: 8px; }
.fmed-head-warn { color: #c07f16; display: flex; align-items: center; gap: 8px; }
.fmed-finding { border: 1px solid var(--fmed-line); border-radius: 10px; margin-top: 10px; background: #fdfcfa; }
.fmed-finding summary { display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
.fmed-finding summary::-webkit-details-marker { display: none; }
.fmed-finding summary:focus-visible { outline: 3px solid var(--fmed-green); outline-offset: 2px; border-radius: 10px; }
.fmed-finding-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.fmed-finding-bad .fmed-finding-dot { background: var(--fmed-red); }
.fmed-finding-warn .fmed-finding-dot { background: var(--fmed-amber); }
.fmed-finding-q { flex: 1; min-width: 0; }
.fmed-finding-ans { font-size: 12px; font-weight: 700; color: var(--fmed-muted); border: 1px solid var(--fmed-line); border-radius: 20px; padding: 2px 10px; }
.fmed-finding-body { padding: 2px 16px 14px 34px; font-size: 13.5px; color: #4c5347; }

/* ---------- next steps / disclaimer ---------- */
.fmed-next-inner { display: flex; gap: 14px; align-items: flex-start; }
.fmed-next-inner > .fmed-ic { width: 34px; height: 34px; color: var(--fmed-green); }
.fmed-disclaimer { display: flex; gap: 14px; background: #f1efe8; border: 1px solid var(--fmed-line); border-radius: var(--fmed-radius); padding: 18px 20px; margin-top: 20px; color: var(--fmed-green-deep); }
.fmed-disclaimer .fmed-ic { width: 30px; height: 30px; }
.fmed-disclaimer p { color: #55604f; font-size: 13.5px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
	.fmed-root * { transition: none !important; }
}
