/*
 * Self-contained palette so the tool looks the same inside any theme
 * (same approach as the other EducationalEngine generators).
 */
.ee-fa-app {
	--ee-fa-bg: #ffffff;
	--ee-fa-surface: #f1f5f9;
	--ee-fa-text: #1e293b;
	--ee-fa-muted: #52606d;
	--ee-fa-border: #cbd5e1;
	--ee-fa-accent: #1d4ed8;
	--ee-fa-accent-hover: #1e40af;
	--ee-fa-accent-soft: #eff6ff;
	--ee-fa-danger: #b91c1c;

	max-width: 1000px;
	margin: 0 auto 48px;
	padding: 24px;
	background: var(--ee-fa-bg);
	border: 1px solid var(--ee-fa-border);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	color: var(--ee-fa-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	line-height: 1.55;
}
.ee-fa-app * { box-sizing: border-box; }
.ee-fa-app button, .ee-fa-app input, .ee-fa-app select, .ee-fa-app textarea {
	font-family: inherit; box-shadow: none; text-shadow: none; background-image: none;
}
.ee-fa-app [hidden] { display: none !important; }

.ee-fa-quota-bar {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center;
	background: var(--ee-fa-surface); border: 1px solid var(--ee-fa-border); border-radius: 6px;
	padding: 10px 16px; margin-bottom: 16px; font-size: 0.9em;
}
.ee-fa-quota-label { font-weight: 700; }
.ee-fa-quota-count { color: var(--ee-fa-muted); }
.ee-fa-quota-count a { color: var(--ee-fa-accent); }

.ee-fa-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--ee-fa-border); }
.ee-fa-tab {
	background: transparent !important; border: 0; border-bottom: 3px solid transparent; color: var(--ee-fa-muted) !important;
	padding: 8px 12px; font-weight: 600; cursor: pointer; margin-bottom: -1px;
}
.ee-fa-tab.is-active { color: var(--ee-fa-accent) !important; border-bottom-color: var(--ee-fa-accent); }
.ee-fa-panel { display: none; }
.ee-fa-panel.is-active { display: block; }

.ee-fa-form { max-width: 820px; }
.ee-fa-field { margin-bottom: 14px; flex: 1 1 0; min-width: 0; }
.ee-fa-field label, .ee-fa-label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 4px; color: var(--ee-fa-text); }
.ee-fa-field input, .ee-fa-field select, .ee-fa-field textarea {
	width: 100%; padding: 8px 10px; height: auto; min-height: 40px; border: 1px solid var(--ee-fa-border); border-radius: 6px;
	background: #fff !important; color: var(--ee-fa-text) !important; font-size: 0.95em;
}
.ee-fa-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ee-fa-row .ee-fa-field { min-width: 220px; }
.ee-fa-hint { font-size: 0.82em; color: var(--ee-fa-muted); margin: 4px 0 0; }
.ee-fa-hint:empty { display: none; }
.ee-fa-more { margin: 0 0 16px; }
.ee-fa-more summary { cursor: pointer; font-weight: 600; font-size: 0.9em; color: var(--ee-fa-accent); margin-bottom: 10px; }

.ee-fa-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; cursor: pointer;
	border: 1px solid var(--ee-fa-border); background: #fff !important; color: var(--ee-fa-text) !important;
	font-weight: 600; font-size: 0.9em; text-decoration: none !important; line-height: 1.2;
}
.ee-fa-btn:hover { border-color: var(--ee-fa-accent); color: var(--ee-fa-accent) !important; }
.ee-fa-btn:focus-visible { outline: 2px solid var(--ee-fa-accent); outline-offset: 2px; }
.ee-fa-btn-primary { background: var(--ee-fa-accent) !important; border-color: var(--ee-fa-accent); color: #fff !important; padding: 10px 18px; font-size: 1em; }
.ee-fa-btn-primary:hover { background: var(--ee-fa-accent-hover) !important; color: #fff !important; }
.ee-fa-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.ee-fa-btn-small { padding: 5px 10px; font-size: 0.82em; }
.ee-fa-cost-badge { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 2px 8px; font-size: 0.8em; }

.ee-fa-status { margin: 14px 0 0; font-weight: 600; color: var(--ee-fa-accent); }
.ee-fa-status:empty { display: none; }
.ee-fa-status.is-error { color: var(--ee-fa-danger); }
.ee-fa-status.is-working::before {
	content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
	border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ee-fa-spin 0.9s linear infinite;
}
@keyframes ee-fa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ee-fa-status.is-working::before { animation: none; } }
.ee-fa-result { margin-top: 18px; }

.ee-fa-list { list-style: none; padding: 0; margin: 0 0 16px; }
.ee-fa-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--ee-fa-border); }
.ee-fa-view-btn { background: none !important; border: 0; padding: 0; color: var(--ee-fa-accent) !important; font-weight: 600; cursor: pointer; text-align: left; }
.ee-fa-list-meta { color: var(--ee-fa-muted); font-size: 0.85em; }

.ee-fa-upsells { margin-top: 24px; }
.ee-fa-disclaimer { font-size: 0.8em; color: var(--ee-fa-muted); margin-top: 16px; }

.ee-fa-check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 0.92em !important; margin: 2px 0 6px; cursor: pointer; }
.ee-fa-check input { width: auto !important; min-height: 0 !important; margin-top: 4px; flex: 0 0 auto; }

.ee-fa-item { max-width: 900px; }
.ee-fa-item-header h3 { margin: 0 0 4px; }
.ee-fa-item-meta { color: var(--ee-fa-muted); font-size: 0.88em; margin: 0 0 4px; word-break: break-word; }
.ee-fa-upsell-source-note { font-size: 0.85em; color: var(--ee-fa-accent); margin: 0 0 4px; font-weight: 600; }
.ee-fa-permalink { font-size: 0.85em; margin: 0 0 10px; }

.ee-fa-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ee-fa-border); }
.ee-fa-toolbar-label { font-size: 0.82em; color: var(--ee-fa-muted); margin-left: 8px; }
.ee-fa-export-status { font-size: 0.82em; color: var(--ee-fa-muted); }
.ee-fa-export-status.is-error { color: var(--ee-fa-danger); font-weight: 600; }
.ee-fa-btn-danger:hover { border-color: var(--ee-fa-danger); color: var(--ee-fa-danger) !important; }

/* Feedback Assistant. */
.ee-fa-intro { margin: 0 0 16px; color: var(--ee-fa-muted); }
.ee-fa-row-3 .ee-fa-field { min-width: 180px; }
.ee-fa-note { background: var(--ee-fa-accent-soft); border-radius: 6px; padding: 8px 12px; font-size: 0.88em; }
.ee-fa-cost-badge { background: var(--ee-fa-accent-soft); color: var(--ee-fa-accent); }
.ee-fa-btn-primary .ee-fa-cost-badge { background: rgba(255, 255, 255, 0.2); color: #fff; }
.ee-fa-btn-quiet { color: var(--ee-fa-muted) !important; }
.ee-fa-btn-quiet:hover { border-color: var(--ee-fa-danger); color: var(--ee-fa-danger) !important; }

.ee-fa-subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 16px; border-bottom: 1px solid var(--ee-fa-border); }
.ee-fa-subtab {
	background: transparent !important; border: 0; border-bottom: 3px solid transparent; color: var(--ee-fa-muted) !important;
	padding: 6px 10px; font-weight: 600; font-size: 0.9em; cursor: pointer; margin-bottom: -1px;
}
.ee-fa-subtab.is-active { color: var(--ee-fa-accent) !important; border-bottom-color: var(--ee-fa-accent); }
.ee-fa-subpanel { display: none; }
.ee-fa-subpanel.is-active { display: block; }

.ee-fa-give-status, .ee-fa-bank-status, .ee-fa-fb-status, .ee-fa-export-note, .ee-fa-editor-status { font-size: 0.85em; color: var(--ee-fa-muted); margin-left: 8px; }
.ee-fa-give-status.is-working, .ee-fa-bank-status.is-working, .ee-fa-editor-status.is-working { color: var(--ee-fa-accent); font-weight: 600; }
.is-error.ee-fa-give-status, .is-error.ee-fa-bank-status, .is-error.ee-fa-fb-status, .is-error.ee-fa-export-note, .is-error.ee-fa-editor-status { color: var(--ee-fa-danger); font-weight: 600; }
.ee-fa-give-status.is-working::before, .ee-fa-bank-status.is-working::before {
	content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px;
	border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ee-fa-spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .ee-fa-give-status.is-working::before, .ee-fa-bank-status.is-working::before { animation: none; } }
.ee-fa-counter { font-weight: 600; }
.ee-fa-band-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 14px; }
.ee-fa-band-pick { display: flex; flex-direction: column; gap: 2px; font-size: 0.88em; }
.ee-fa-band-pick select { padding: 6px 8px; border: 1px solid var(--ee-fa-border); border-radius: 6px; background: #fff !important; color: var(--ee-fa-text) !important; }

.ee-fa-band {
	display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 0.78em; font-weight: 700; vertical-align: 1px;
	background: var(--ee-fa-surface); color: var(--ee-fa-text); border: 1px solid var(--ee-fa-border); white-space: nowrap;
}
.ee-fa-band-0 { background: #dcfce7; border-color: #86efac; color: #14532d; }
.ee-fa-band-1 { background: #ecfccb; border-color: #bef264; color: #365314; }
.ee-fa-band-2 { background: #fef9c3; border-color: #fde047; color: #713f12; }
.ee-fa-band-3 { background: #ffedd5; border-color: #fdba74; color: #7c2d12; }
.ee-fa-band-4, .ee-fa-band-5, .ee-fa-band-6 { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }

.ee-fa-fb { border: 1px solid var(--ee-fa-border); border-radius: 8px; padding: 14px 16px; margin: 0 0 14px; }
.ee-fa-fb.is-new { border-color: var(--ee-fa-accent); box-shadow: 0 0 0 3px var(--ee-fa-accent-soft); }
.ee-fa-fb-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.ee-fa-fb-label { margin: 0; font-size: 1.05em; word-break: break-word; }
.ee-fa-fb-meta { color: var(--ee-fa-muted); font-size: 0.82em; }
.ee-fa-fb h5 { margin: 12px 0 4px; font-size: 0.95em; }
.ee-fa-fb ul { margin: 0 0 6px; padding-left: 22px; }
.ee-fa-fb-overall { margin: 0 0 6px; }
.ee-fa-fb-crit { border-top: 1px solid var(--ee-fa-surface); padding-top: 4px; }
.ee-fa-fb-crit p { margin: 0 0 6px; }
.ee-fa-evidence { margin: 0 0 6px; padding: 4px 10px; border-left: 3px solid var(--ee-fa-border); color: var(--ee-fa-muted); font-style: italic; font-size: 0.92em; }
.ee-fa-next { font-size: 0.93em; }
.ee-fa-fb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }

.ee-fa-draft-box { background: var(--ee-fa-accent-soft); border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.ee-fa-draft-box p { margin: 0 0 8px; }
.ee-fa-bank-crit { margin: 0 0 16px; }
.ee-fa-bank-crit h4 { margin: 0 0 6px; }
.ee-fa-table-wrap { overflow-x: auto; max-width: 100%; }
.ee-fa-bank-table, .ee-fa-pattern-table { border-collapse: collapse; width: 100%; font-size: 0.9em; }
.ee-fa-bank-table th, .ee-fa-bank-table td, .ee-fa-pattern-table th, .ee-fa-pattern-table td { border: 1px solid var(--ee-fa-border); padding: 6px 8px; text-align: left; vertical-align: top; }
.ee-fa-bank-table th { width: 22%; background: var(--ee-fa-surface); }
.ee-fa-pattern-table thead th { background: var(--ee-fa-surface); font-size: 0.85em; }
.ee-fa-pattern-table td { text-align: center; color: var(--ee-fa-muted); }
.ee-fa-pattern-table td.has-n { color: var(--ee-fa-text); font-weight: 700; background: var(--ee-fa-accent-soft); }
.ee-fa-snippet {
	display: block; width: 100%; text-align: left; background: transparent !important; border: 1px dashed transparent; border-radius: 4px;
	padding: 3px 6px; margin: 0 0 2px; color: var(--ee-fa-text) !important; font: inherit; cursor: copy; line-height: 1.45;
}
.ee-fa-snippet:hover, .ee-fa-snippet:focus-visible { border-color: var(--ee-fa-accent); background: var(--ee-fa-accent-soft) !important; }
.ee-fa-snippet.is-next { color: var(--ee-fa-muted) !important; }
.ee-fa-snippet.is-copied { border-color: #16a34a; background: #f0fdf4 !important; }
.ee-fa-setup-list dt { font-weight: 700; font-size: 0.9em; margin-top: 8px; }
.ee-fa-setup-list dd { margin: 2px 0 0; }
.ee-fa-setup-list ol { margin: 0; padding-left: 22px; }

.ee-fa-editor { border: 1px solid var(--ee-fa-accent); border-radius: 8px; padding: 12px 14px; background: #fff; }
.ee-fa-editor .ee-fa-field textarea { min-height: 60px; }
.ee-fa-editor-crit { border-top: 1px solid var(--ee-fa-border); padding-top: 8px; margin-top: 8px; }
.ee-fa-editor-crit h5 { margin: 0 0 6px; }
.ee-fa-editor-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ee-fa-editor-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.ee-fa-editor-row input { flex: 1 1 auto; }

@media (max-width: 600px) {
	.ee-fa-app { padding: 14px; border-radius: 0; border-left: 0; border-right: 0; }
	.ee-fa-row .ee-fa-field { min-width: 100%; }
	.ee-fa-bank-table th { width: 30%; }
	.ee-fa-fb { padding: 12px; }
}
