/* feiMail Tools v0.3.0 — Result widgets, API/MCP slide-over drawer, 2-col knowledge & 4-col directory */
.fmt-summary-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 16px 18px;
	margin-bottom: 16px;
	border: 1px solid var(--fmt-border);
	border-radius: var(--fmt-radius);
	background: var(--fmt-surface);
}

.fmt-score-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-size: 24px;
	color: var(--fmt-accent);
}

.fmt-score-unit {
	font-size: 13px;
	color: var(--fmt-muted);
}

.fmt-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}

.fmt-card {
	padding: 16px 18px;
	border: 1px solid var(--fmt-border);
	border-radius: var(--fmt-radius);
	background: var(--fmt-bg);
	min-width: 0;
}

.fmt-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.fmt-card-title {
	margin: 0;
	font-size: 15px;
	color: var(--fmt-text);
}

.fmt-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	white-space: nowrap;
}

.fmt-pill-pass {
	color: var(--fmt-pass);
	background: var(--fmt-pass-bg);
}

.fmt-pill-warn {
	color: var(--fmt-warn);
	background: var(--fmt-warn-bg);
}

.fmt-pill-fail {
	color: var(--fmt-fail);
	background: var(--fmt-fail-bg);
}

.fmt-pill-info {
	color: var(--fmt-accent);
	background: var(--fmt-accent-soft);
}

.fmt-code-block {
	margin: 10px 0 0;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--fmt-border);
	background: var(--fmt-surface);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-all;
	overflow-x: auto;
}

.fmt-table-wrap {
	width: 100%;
	overflow-x: auto;
	margin-bottom: 14px;
	border: 1px solid var(--fmt-border);
	border-radius: var(--fmt-radius);
}

.fmt-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.fmt-table th,
.fmt-table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--fmt-border);
	text-align: left;
	vertical-align: top;
	word-break: break-word;
}

.fmt-table tr:last-child th,
.fmt-table tr:last-child td {
	border-bottom: 0;
}

.fmt-table th {
	background: var(--fmt-surface);
	color: var(--fmt-muted);
}

.fmt-table code {
	font-size: 12px;
	word-break: break-all;
}

.fmt-spec-table th {
	width: 132px;
	white-space: nowrap;
}

.fmt-table-dns th:nth-child(1),
.fmt-table-dns td:nth-child(1) {
	width: 72px;
	white-space: nowrap;
}

.fmt-table-dns th:nth-child(2),
.fmt-table-dns td:nth-child(2) {
	width: 176px;
	white-space: nowrap;
}

.fmt-table-dns th:nth-child(4),
.fmt-table-dns td:nth-child(4) {
	width: 240px;
}

.fmt-notice {
	padding: 13px 16px;
	margin-top: 12px;
	border-radius: 10px;
	border: 1px solid var(--fmt-border);
	background: var(--fmt-surface);
	font-size: 13px;
	color: var(--fmt-muted);
}

.fmt-notice-warn {
	border-color: #fde68a;
	background: var(--fmt-warn-bg);
	color: var(--fmt-warn);
}

.fmt-notice-fail {
	border-color: #fecaca;
	background: var(--fmt-fail-bg);
	color: var(--fmt-fail);
}

.fmt-guide-box {
	margin-top: 16px;
	padding: 14px 18px;
	border: 1px solid var(--fmt-border);
	border-radius: var(--fmt-radius);
	background: var(--fmt-accent-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 13px;
}

.fmt-preview-frame {
	width: 100%;
	height: 360px;
	border: 1px solid var(--fmt-border);
	border-radius: 8px;
	background: #ffffff;
}

.fmt-preview-frame-mobile {
	max-width: 390px;
}

.fmt-list {
	margin: 6px 0 0;
	padding-left: 18px;
	font-size: 13px;
	color: var(--fmt-text);
}

/* Plan A Footer: 2-column knowledge area + 4-column borderless directory */
.fmt-suite-footer {
	margin-top: 28px;
	padding: 28px 32px;
	border: 1px solid var(--fmt-border);
	border-radius: var(--fmt-radius);
	background: var(--fmt-bg);
}

.fmt-knowledge-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--fmt-border);
}

.fmt-knowledge-col {
	min-width: 0;
}

.fmt-suite-heading {
	margin: 0 0 14px;
	font-size: 17px;
	color: var(--fmt-text);
}

.fmt-faq-item {
	padding: 10px 0;
	border-bottom: 1px solid var(--fmt-border);
}

.fmt-faq-item:last-child {
	border-bottom: 0;
}

.fmt-faq-q {
	cursor: pointer;
	font-size: 14px;
	color: var(--fmt-text);
}

.fmt-faq-a {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--fmt-muted);
}

.fmt-dir-wrap {
	padding-top: 22px;
}

.fmt-dir-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.fmt-dir-brand {
	font-size: 14px;
	color: var(--fmt-muted);
}

.fmt-dir-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: var(--fmt-accent);
	text-decoration: none;
}

.fmt-dir-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.fmt-dir-heading {
	margin: 0 0 10px;
	font-size: 12px;
	color: var(--fmt-muted);
}

.fmt-dir-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fmt-dir-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	color: var(--fmt-text);
	text-decoration: none;
}

.fmt-dir-link:hover,
.fmt-dir-link-active {
	color: var(--fmt-accent);
}

/* Right slide-over API / MCP Developer Drawer */
.fmt-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(22, 28, 45, 0.36);
	display: none;
	justify-content: flex-end;
}

.fmt-drawer-backdrop.fmt-drawer-open {
	display: flex;
}

.fmt-drawer {
	width: 100%;
	max-width: 520px;
	height: 100%;
	background: #ffffff;
	border-left: 1px solid var(--fmt-border);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.fmt-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--fmt-border);
}

.fmt-drawer-title {
	margin: 0;
	font-size: 16px;
	color: var(--fmt-text);
}

.fmt-drawer-tabs {
	display: flex;
	gap: 8px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--fmt-border);
	background: var(--fmt-surface);
}

.fmt-drawer-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid var(--fmt-border);
	border-radius: 999px;
	background: #ffffff;
	color: var(--fmt-muted);
	font-size: 13px;
	cursor: pointer;
}

.fmt-drawer-tab-active {
	border-color: var(--fmt-accent);
	background: var(--fmt-accent-soft);
	color: var(--fmt-accent);
}

.fmt-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.fmt-drawer-pane { display: none; flex-direction: column; gap: 14px; }
.fmt-drawer-pane-active { display: flex; }
.fmt-drawer .fmt-code-block {
	margin: 0;
	padding: 14px 16px;
	border-radius: 10px;
	background: #0f172a;
	color: #e2e8f0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.6;
	overflow-x: auto;
	white-space: pre;
}
.fmt-drawer .fmt-muted { margin: 0; font-size: 13px; color: var(--fmt-muted); }
.fmt-drawer .fmt-btn { width: fit-content; }
.fmt-lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fmt-lang-tab { padding: 5px 12px; border: 1px solid var(--fmt-border); border-radius: 7px; background: var(--fmt-surface); color: var(--fmt-muted); font-size: 12.5px; cursor: pointer; }
.fmt-lang-tab-active { border-color: var(--fmt-accent); background: var(--fmt-accent-soft); color: var(--fmt-accent); }
.fmt-drawer-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; padding-top: 6px; border-top: 1px solid var(--fmt-border); }
.fmt-drawer-links a { color: var(--fmt-accent); text-decoration: none; }
.fmt-drawer-links a:hover { text-decoration: underline; }
@media (max-width: 960px) {
	.fmt-knowledge-grid { grid-template-columns: minmax(0, 1fr); }
	.fmt-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.fmt-cards { grid-template-columns: minmax(0, 1fr); }
	.fmt-suite-footer { padding: 20px 18px; }
}
