/*!
 * FP Tabelas Técnicas — estilos do site
 * Herdam a fonte do tema; a cor de destaque vem de --fpt-accent.
 */

.fpt {
	--fpt-accent: #0b5cad;
	--fpt-ink: #0f172a;
	--fpt-text: #334155;
	--fpt-muted: #64748b;
	--fpt-line: #e2e8f0;
	--fpt-line-2: #cbd5e1;
	--fpt-bg: #fff;
	--fpt-soft: #f6f8fb;
	--fpt-r: 10px;
	--fpt-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
	--fpt-shadow-lg: 0 6px 18px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .06);
	--fpt-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
	--fpt-tint: rgba(11, 92, 173, .08);
	color: var(--fpt-text);
	font-family: inherit;
	box-sizing: border-box;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	.fpt { --fpt-tint: color-mix(in srgb, var(--fpt-accent) 9%, transparent); }
}
.fpt *, .fpt *::before, .fpt *::after { box-sizing: border-box; }
.fpt [hidden] { display: none !important; }
.fpt-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.fpt-ico { flex: none; vertical-align: middle; }
.fpt mark { background: #fde68a; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---------- Botões ---------- */
.fpt-btn {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .62em 1.1em; border-radius: 8px; border: 1px solid var(--fpt-accent);
	background: var(--fpt-accent); color: #fff !important; font: inherit; font-weight: 600; font-size: .95em;
	line-height: 1.2; text-decoration: none !important; cursor: pointer;
	transition: filter .15s, transform .15s, box-shadow .15s;
}
.fpt-btn:hover { filter: brightness(1.08); box-shadow: var(--fpt-shadow); }
.fpt-btn:active { transform: translateY(1px); }
.fpt-btn:focus-visible { outline: 3px solid var(--fpt-tint); outline-offset: 2px; }
.fpt-btn--ghost { background: var(--fpt-bg); color: var(--fpt-accent) !important; border-color: var(--fpt-line-2); }
.fpt-btn--ghost:hover { border-color: var(--fpt-accent); background: var(--fpt-tint); filter: none; }
.fpt-btn--sm { padding: .42em .8em; font-size: .85em; }
.fpt-btn__n { font-weight: 500; opacity: .8; font-size: .9em; }
.fpt-btn .fpt-ico--arrow { width: 18px; height: 18px; transition: transform .15s; }
.fpt-btn:hover .fpt-ico--arrow { transform: translateX(3px); }
.fpt-linkbtn { background: none; border: 0; padding: 0; color: var(--fpt-accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Busca ---------- */
.fpt-search {
	position: relative; display: flex; align-items: center; gap: 8px;
	flex: 1 1 340px; min-width: 0;
	background: var(--fpt-bg); border: 1.5px solid var(--fpt-line-2); border-radius: 10px;
	padding: 0 6px 0 12px; transition: border-color .15s, box-shadow .15s;
}
.fpt-search:focus-within { border-color: var(--fpt-accent); box-shadow: 0 0 0 4px var(--fpt-tint); }
.fpt-search > .fpt-ico { color: var(--fpt-muted); }
.fpt .fpt-search__input {
	flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
	font: inherit; font-size: 1rem; color: var(--fpt-ink); padding: 12px 0 !important; margin: 0 !important; height: auto; line-height: 1.3;
	-webkit-appearance: none; appearance: none;
}
.fpt .fpt-search__input::-webkit-search-cancel-button { display: none; }
.fpt .fpt-search__input::placeholder { color: #94a3b8; opacity: 1; }
.fpt-search__kbd {
	font: 600 12px/1 var(--fpt-mono); color: var(--fpt-muted); border: 1px solid var(--fpt-line-2);
	border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; background: var(--fpt-soft);
}
.fpt-search:focus-within .fpt-search__kbd, .is-searching .fpt-search__kbd { display: none; }
.fpt-search__clear {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	border: 0; background: transparent; color: var(--fpt-muted); cursor: pointer; padding: 0;
}
.fpt-search__clear:hover { background: var(--fpt-soft); color: var(--fpt-ink); }

/* ---------- Biblioteca ---------- */
.fpt-lib { margin: 1.25em 0 2em; }
.fpt-lib__title { margin: 0 0 .6em; }
.fpt-lib__bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.fpt-lib__controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fpt-select { display: inline-flex; align-items: center; gap: 8px; font-size: .9em; color: var(--fpt-muted); margin: 0; }
.fpt .fpt-select select {
	font: inherit; color: var(--fpt-ink); font-size: .95em; padding: 8px 30px 8px 10px; margin: 0; height: auto;
	border: 1px solid var(--fpt-line-2); border-radius: 8px; background-color: var(--fpt-bg); max-width: 220px; line-height: 1.3;
}
.fpt-viewtoggle { display: inline-flex; border: 1px solid var(--fpt-line-2); border-radius: 8px; overflow: hidden; }
.fpt-viewtoggle button {
	display: grid; place-items: center; width: 40px; height: 38px; border: 0; margin: 0; padding: 0;
	background: var(--fpt-bg); color: var(--fpt-muted); cursor: pointer; border-radius: 0;
}
.fpt-viewtoggle button + button { border-left: 1px solid var(--fpt-line-2); }
.fpt-viewtoggle button[aria-pressed="true"] { background: var(--fpt-accent); color: #fff; }
.fpt-viewtoggle button:hover:not([aria-pressed="true"]) { background: var(--fpt-soft); color: var(--fpt-ink); }

.fpt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.fpt-chipbtn {
	display: inline-flex; align-items: center; gap: 7px; margin: 0;
	padding: 7px 12px; border-radius: 999px; border: 1px solid var(--fpt-line-2); background: var(--fpt-bg);
	color: var(--fpt-text); font: inherit; font-size: .88em; font-weight: 500; line-height: 1.2; cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.fpt-chipbtn:hover { border-color: var(--fpt-cat, var(--fpt-accent)); color: var(--fpt-ink); }
.fpt-chipbtn__n {
	font: 600 11px/1 var(--fpt-mono); padding: 3px 6px; border-radius: 999px; background: var(--fpt-soft); color: var(--fpt-muted);
}
.fpt-chipbtn.is-active { background: var(--fpt-cat, var(--fpt-accent)); border-color: var(--fpt-cat, var(--fpt-accent)); color: #fff; }
.fpt-chipbtn.is-active .fpt-chipbtn__n { background: rgba(255, 255, 255, .22); color: #fff; }
.fpt-chipbtn.is-active .fpt-dot { background: #fff; }
.fpt-chipbtn.is-zero { opacity: .45; }
.fpt-chipbtn--fav { --fpt-cat: #d97706; }
.fpt-chipbtn--fav .fpt-ico { width: 15px; height: 15px; color: #f59e0b; }
.fpt-chipbtn--fav.is-active .fpt-ico { color: #fff; }
.fpt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fpt-cat, var(--fpt-accent)); display: inline-block; }

.fpt-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; font-size: .86em; }
.fpt-recent__label { color: var(--fpt-muted); font-weight: 600; }
.fpt-recent__list { display: flex; flex-wrap: wrap; gap: 6px; }
.fpt-recent__item {
	padding: 3px 10px; border-radius: 6px; background: var(--fpt-soft); border: 1px solid var(--fpt-line);
	color: var(--fpt-text) !important; text-decoration: none !important; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fpt-recent__item:hover { border-color: var(--fpt-accent); color: var(--fpt-accent) !important; }

.fpt-lib__status { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 2px 0 14px; font-size: .9em; color: var(--fpt-muted); }
.fpt-count { font-weight: 600; color: var(--fpt-text); }

/* ---------- Grade de cartões ---------- */
.fpt-grid { display: grid; gap: 16px; grid-template-columns: repeat(var(--fpt-cols, 3), minmax(0, 1fr)); transition: opacity .18s; }
.fpt-grid.is-swapping { opacity: 0; }

.fpt-card {
	position: relative; display: flex; min-width: 0;
	background: var(--fpt-bg); border: 1px solid var(--fpt-line); border-radius: var(--fpt-r);
	box-shadow: var(--fpt-shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.fpt-card:hover { transform: translateY(-2px); box-shadow: var(--fpt-shadow-lg); border-color: var(--fpt-line-2); }
.fpt-card__link {
	display: flex; flex-direction: column; flex: 1; min-width: 0; color: inherit !important; text-decoration: none !important;
	border-radius: inherit; outline: none;
}
.fpt-card__link:focus-visible { box-shadow: 0 0 0 3px var(--fpt-accent); }
.fpt-card__media {
	position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
	border-radius: var(--fpt-r) var(--fpt-r) 0 0; border-bottom: 1px solid var(--fpt-line);
	background-color: var(--fpt-soft);
	background-image:
		linear-gradient(rgba(100, 116, 139, .08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(100, 116, 139, .08) 1px, transparent 1px);
	background-size: 16px 16px;
}
.fpt-card__media::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fpt-cat, var(--fpt-accent)); z-index: 1;
}
.fpt-card__media img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; margin: 0;
	transition: transform .3s; max-width: none;
}
.fpt-card:hover .fpt-card__media img { transform: scale(1.04); }
.fpt-card__ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fpt-cat, var(--fpt-accent)); opacity: .5; }
.fpt-card__ph .fpt-ico { width: 44px; height: 44px; }
.fpt-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.fpt-card__meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fpt-chip {
	display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2;
	color: var(--fpt-cat, var(--fpt-accent)); background: rgba(100, 116, 139, .1); padding: 3px 7px; border-radius: 4px;
	text-decoration: none !important; white-space: nowrap;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	.fpt-chip { background: color-mix(in srgb, var(--fpt-cat, var(--fpt-accent)) 11%, transparent); }
}
.fpt-badge { display: inline-block; font-size: 10.5px; font-weight: 700; line-height: 1.2; padding: 3px 6px; border-radius: 4px; letter-spacing: .02em; }
.fpt-badge--new { background: #dcfce7; color: #166534; }
.fpt-badge--pop { background: #fef3c7; color: #92400e; }
.fpt-badge--hot { background: #ede9fe; color: #5b21b6; }
.fpt .fpt-card__title {
	margin: 0 !important; padding: 0 !important; font-size: 1rem; line-height: 1.3; font-weight: 650; color: var(--fpt-ink);
	letter-spacing: -.005em; text-transform: none; border: 0;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fpt-card:hover .fpt-card__title { color: var(--fpt-accent); }
.fpt-card__norma {
	align-self: flex-start; font: 600 11.5px/1.3 var(--fpt-mono); color: var(--fpt-text);
	border: 1px solid var(--fpt-line-2); border-radius: 4px; padding: 2px 6px; background: var(--fpt-bg);
	max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fpt-card__desc {
	font-size: .86em; line-height: 1.45; color: var(--fpt-muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.fpt-fav {
	position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; padding: 0; margin: 0;
	display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--fpt-line);
	background: rgba(255, 255, 255, .92); color: #cbd5e1; cursor: pointer; opacity: 0;
	transition: opacity .15s, color .15s, transform .15s; box-shadow: var(--fpt-shadow);
}
.fpt-fav .fpt-ico { width: 18px; height: 18px; }
.fpt-card:hover .fpt-fav, .fpt-fav:focus-visible, .fpt-fav[aria-pressed="true"] { opacity: 1; }
.fpt-fav:hover { color: #f59e0b; }
.fpt-fav[aria-pressed="true"] { color: #f59e0b; border-color: #fcd34d; }
.fpt-fav.is-pop { animation: fpt-pop .35s ease; }
@keyframes fpt-pop { 50% { transform: scale(1.25); } }
@media (hover: none) { .fpt-fav { opacity: 1; } }

/* Lista */
.fpt-grid--lista { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--fpt-line); border-radius: var(--fpt-r); overflow: hidden; background: var(--fpt-bg); }
.fpt-grid--lista .fpt-card { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--fpt-line); }
.fpt-grid--lista .fpt-card:last-child { border-bottom: 0; }
.fpt-grid--lista .fpt-card:hover { transform: none; background: var(--fpt-soft); box-shadow: none; }
.fpt-grid--lista .fpt-card__link { flex-direction: row; align-items: center; }
.fpt-grid--lista .fpt-card__media { flex: none; width: 64px; height: 64px; aspect-ratio: auto; margin: 8px 0 8px 12px; border-radius: 6px; border: 1px solid var(--fpt-line); }
.fpt-grid--lista .fpt-card__media img { padding: 3px; }
.fpt-grid--lista .fpt-card__media::before { width: 2px; }
.fpt-grid--lista .fpt-card__body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title meta" "desc norma"; column-gap: 14px; row-gap: 3px; padding: 10px 56px 10px 14px; align-items: center; }
.fpt-grid--lista .fpt-card__title { grid-area: title; -webkit-line-clamp: 1; font-size: .98rem; }
.fpt-grid--lista .fpt-card__meta { grid-area: meta; justify-content: flex-end; }
.fpt-grid--lista .fpt-card__norma { grid-area: norma; justify-self: end; }
.fpt-grid--lista .fpt-card__desc { grid-area: desc; -webkit-line-clamp: 1; }
.fpt-grid--lista .fpt-fav { top: 50%; margin-top: -17px; right: 12px; opacity: 1; box-shadow: none; }

/* Agrupado */
.fpt-group {
	grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 14px 0 0 !important; padding: 0 0 8px !important;
	font-size: 1.05rem !important; font-weight: 700; color: var(--fpt-ink); border-bottom: 2px solid var(--fpt-cat, var(--fpt-accent));
}
.fpt-group:first-child { margin-top: 0 !important; }
.fpt-group small { font: 600 12px/1 var(--fpt-mono); color: var(--fpt-muted); }
.fpt-grid--lista .fpt-group { margin: 0 !important; padding: 12px 14px 8px !important; background: var(--fpt-soft); border-bottom-width: 2px; }

/* Vazio / mais */
.fpt-empty { text-align: center; padding: 36px 16px; border: 1.5px dashed var(--fpt-line-2); border-radius: var(--fpt-r); background: var(--fpt-soft); }
.fpt-empty > .fpt-ico { width: 40px; height: 40px; color: var(--fpt-muted); opacity: .6; }
.fpt-empty__title { margin: 8px 0 4px !important; font-weight: 700; color: var(--fpt-ink); font-size: 1.05rem; }
.fpt-empty__hint { margin: 0 0 14px !important; color: var(--fpt-muted); font-size: .92em; }
.fpt-empty__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 !important; }
.fpt-more { text-align: center; margin-top: 18px; }

/* ---------- Grade da página inicial ---------- */
.fpt-showcase { margin: 1.5em 0 2em; }
.fpt-showcase__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fpt-showcase__title { margin: 0 !important; }
.fpt-showcase__sub { margin: 4px 0 0 !important; color: var(--fpt-muted); }
.fpt-showcase__head .fpt-ico--shuffle { width: 16px; height: 16px; }
.fpt-showcase__foot { margin-top: 18px; text-align: center; }
.fpt-showcase .fpt-sbox { margin: 0 0 14px; }

/* Horizontal */
.fpt-style-horizontal .fpt-card__link { flex-direction: row; align-items: stretch; }
.fpt-style-horizontal .fpt-card__media { flex: none; width: 38%; max-width: 150px; aspect-ratio: auto; min-height: 104px; border-radius: var(--fpt-r) 0 0 var(--fpt-r); border-bottom: 0; border-right: 1px solid var(--fpt-line); }
.fpt-style-horizontal .fpt-card__body { justify-content: center; }
/* Compacto */
.fpt-style-compacto .fpt-grid { gap: 10px; }
.fpt-style-compacto .fpt-card { border-left: 4px solid var(--fpt-cat, var(--fpt-accent)); }
.fpt-style-compacto .fpt-card__body { padding: 12px 44px 12px 14px; gap: 4px; }
.fpt-style-compacto .fpt-card__title { font-size: .95rem; -webkit-line-clamp: 2; }
/* Mosaico */
.fpt-style-mosaico .fpt-card { overflow: hidden; }
.fpt-style-mosaico .fpt-card__link { position: relative; }
.fpt-style-mosaico .fpt-card__media { aspect-ratio: 4 / 3; border: 0; border-radius: var(--fpt-r); }
.fpt-style-mosaico .fpt-card__media img { padding: 14px 14px 64px; }
.fpt-style-mosaico .fpt-card__body {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px;
	background: linear-gradient(to top, rgba(15, 23, 42, .92), rgba(15, 23, 42, .6) 60%, rgba(15, 23, 42, 0));
	border-radius: 0 0 var(--fpt-r) var(--fpt-r);
}
.fpt-style-mosaico .fpt-card__title, .fpt-style-mosaico .fpt-card:hover .fpt-card__title { color: #fff; -webkit-line-clamp: 2; }
.fpt-style-mosaico .fpt-chip { background: rgba(255, 255, 255, .16); color: #fff; }
.fpt-style-mosaico .fpt-card__norma { background: transparent; color: #e2e8f0; border-color: rgba(255, 255, 255, .3); }
.fpt-style-mosaico .fpt-card__desc { color: #cbd5e1; }

/* ---------- Caixa de busca ---------- */
.fpt-sbox { position: relative; margin: 1em 0; max-width: 760px; }
.fpt-sbox__title { margin: 0 0 8px !important; font-weight: 700; color: var(--fpt-ink); }
.fpt-sbox__form { position: relative; margin: 0; }
.fpt-sbox .fpt-search { padding-right: 5px; }
.fpt-sbox__go { padding: .55em 1.1em; }
.fpt-sbox--compact .fpt-search__input { padding: 9px 0 !important; }
.fpt-sbox--compact .fpt-sbox__go { padding: .45em .9em; }
.fpt-suggest {
	position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); margin: 0 !important; padding: 6px !important; list-style: none !important;
	background: var(--fpt-bg); border: 1px solid var(--fpt-line-2); border-radius: 10px; box-shadow: var(--fpt-shadow-lg);
	max-height: 420px; overflow: auto;
}
.fpt-suggest li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.fpt-suggest__item a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; text-decoration: none !important; color: var(--fpt-ink) !important; }
.fpt-suggest__item.is-active a, .fpt-suggest__item a:hover { background: var(--fpt-tint); }
.fpt-suggest__t { font-weight: 600; font-size: .95em; }
.fpt-suggest__m { font: 500 11.5px/1.3 var(--fpt-mono); color: var(--fpt-muted); }
.fpt-suggest__all button {
	width: 100%; text-align: left; border: 0; border-top: 1px solid var(--fpt-line); margin-top: 4px; padding: 9px 10px; background: none;
	color: var(--fpt-accent); font: inherit; font-size: .9em; font-weight: 600; cursor: pointer; border-radius: 0 0 6px 6px;
}
.fpt-suggest__all button:hover { background: var(--fpt-soft); }

/* ---------- Página de tabela: topo e relacionadas ---------- */
.fpt-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 1.2em; font-size: .9em; }
.fpt-crumb__back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--fpt-accent) !important; text-decoration: none !important; margin-right: 4px; }
.fpt-crumb__back .fpt-ico { width: 17px; height: 17px; transition: transform .15s; }
.fpt-crumb__back:hover .fpt-ico { transform: translateX(-3px); }
.fpt-crumb .fpt-chip:hover { filter: brightness(.9); }

.fpt-related { margin: 2.5em 0 1em; padding-top: 1.4em; border-top: 1px solid var(--fpt-line); }
.fpt-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fpt .fpt-related__title { margin: 0 !important; font-size: 1.25rem; }
.fpt-related__all { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .92em; color: var(--fpt-accent) !important; text-decoration: none !important; }
.fpt-related__all .fpt-ico { width: 16px; height: 16px; }
.fpt-related .fpt-card__title { font-size: .92rem; }
.fpt-related .fpt-card__body { padding: 10px 12px 12px; }

/* ---------- Tabelas formatadas ---------- */
.fpt-tw { position: relative; margin: 1.4em 0 1.8em; max-width: 100%; }
.fpt-tw__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.fpt-tw__filter {
	display: flex; align-items: center; gap: 6px; flex: 1 1 240px; max-width: 380px; padding: 0 10px;
	border: 1px solid var(--fpt-line-2); border-radius: 8px; background: var(--fpt-bg); color: var(--fpt-muted);
}
.fpt-tw__filter:focus-within { border-color: var(--fpt-accent); box-shadow: 0 0 0 3px var(--fpt-tint); }
.fpt .fpt-tw__filter input {
	flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
	font: inherit; font-size: .92em; padding: 8px 0 !important; margin: 0 !important; height: auto; color: var(--fpt-ink);
}
.fpt-tw__count { font: 600 12px/1.2 var(--fpt-mono); color: var(--fpt-muted); }
.fpt-tw__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.fpt-tw__actions button {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; margin: 0; border-radius: 7px;
	border: 1px solid var(--fpt-line-2); background: var(--fpt-bg); color: var(--fpt-text);
	font: inherit; font-size: .84em; font-weight: 600; line-height: 1.2; cursor: pointer; transition: all .15s;
}
.fpt-tw__actions button:hover { border-color: var(--fpt-accent); color: var(--fpt-accent); background: var(--fpt-tint); }
.fpt-tw__actions button.is-ok { border-color: #16a34a; color: #15803d; background: #f0fdf4; }
.fpt-tw__hint { display: none; font-size: .8em; color: var(--fpt-muted); margin: 0 0 6px; }

.fpt-tw__scroll {
	position: relative; overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
	border: 1px solid var(--fpt-line-2); border-radius: 8px; background: var(--fpt-bg);
	outline: none;
}
.fpt-tw__scroll:focus-visible { box-shadow: 0 0 0 3px var(--fpt-tint); }
.fpt-tw--sticky .fpt-tw__scroll { max-height: min(78vh, 860px); }

/* sombras de rolagem horizontal */
.fpt-tw--wide::before, .fpt-tw--wide::after {
	content: ""; position: absolute; bottom: 1px; width: 18px; pointer-events: none; z-index: 4; transition: opacity .2s;
	top: var(--fpt-tw-top, 0);
}
.fpt-tw--wide::after { right: 1px; background: linear-gradient(to left, rgba(15, 23, 42, .14), transparent); border-radius: 0 8px 8px 0; }
.fpt-tw--wide::before { left: 1px; background: linear-gradient(to right, rgba(15, 23, 42, .14), transparent); border-radius: 8px 0 0 8px; opacity: 0; }
.fpt-tw--wide:not(.fpt-tw--at-start)::before { opacity: 1; }
.fpt-tw--at-end::after { opacity: 0; }
.fpt-tw--freeze::before { display: none; }

.fpt-tw table.fpt-table {
	width: 100%; min-width: 100%; margin: 0 !important; border-collapse: separate !important; border-spacing: 0 !important;
	border: 0 !important; font-size: .92em; line-height: 1.35; color: var(--fpt-ink); background: var(--fpt-bg); table-layout: auto;
}
.fpt-tw table.fpt-table caption { caption-side: top; text-align: left; font-weight: 700; padding: 10px 12px; color: var(--fpt-ink); }
.fpt-tw table.fpt-table th,
.fpt-tw table.fpt-table td {
	padding: 8px 10px !important; border: 0 !important; border-bottom: 1px solid var(--fpt-line) !important; border-right: 1px solid var(--fpt-line) !important;
	vertical-align: middle; text-align: left; background-clip: padding-box;
}
.fpt-tw table.fpt-table tr > :last-child { border-right: 0 !important; }
.fpt-tw table.fpt-table thead th,
.fpt-tw table.fpt-table thead td {
	background: #eef2f7; color: var(--fpt-ink); font-weight: 700; font-size: .95em; text-align: center; white-space: nowrap;
	border-bottom: 2px solid var(--fpt-line-2) !important;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	.fpt-tw table.fpt-table thead th, .fpt-tw table.fpt-table thead td { background: color-mix(in srgb, var(--fpt-accent) 10%, #f4f6f9); }
}
.fpt-tw table.fpt-table tbody th { background: var(--fpt-soft); font-weight: 650; }
.fpt-tw table.fpt-table tbody tr:nth-child(even) > td { background: #fafbfd; }
.fpt-tw table.fpt-table tbody tr:last-child > * { border-bottom: 0 !important; }
.fpt-tw table.fpt-table td.fpt-num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fpt-tw table.fpt-table tbody tr:hover > td,
.fpt-tw table.fpt-table tbody tr:hover > th { background: var(--fpt-tint); }
.fpt-tw table.fpt-table .fpt-col-hl { background-image: linear-gradient(var(--fpt-tint), var(--fpt-tint)); }
.fpt-tw table.fpt-table tbody tr:hover > .fpt-col-hl { background-color: rgba(11, 92, 173, .16); }
.fpt-tw table.fpt-table tbody tr.fpt-row-pin > td,
.fpt-tw table.fpt-table tbody tr.fpt-row-pin > th { background: #fef9c3 !important; box-shadow: inset 0 1px 0 #facc15, inset 0 -1px 0 #facc15; }
.fpt-tw table.fpt-table .fpt-hit { box-shadow: inset 0 0 0 2px #f59e0b; background-color: #fffbeb !important; }
.fpt-tw table.fpt-table img { max-width: 100%; height: auto; }
.fpt-tw table.fpt-table { cursor: default; }

.fpt-tw--sticky table.fpt-table thead th,
.fpt-tw--sticky table.fpt-table thead td { position: sticky; top: 0; z-index: 2; }
.fpt-tw--sticky table.fpt-table thead tr + tr th { top: var(--fpt-h1, 37px); }

.fpt-tw--freeze table.fpt-table tr > :first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--fpt-line-2); }
.fpt-tw--freeze table.fpt-table tbody tr > :first-child { background: var(--fpt-bg); }
.fpt-tw--freeze table.fpt-table tbody tr:nth-child(even) > td:first-child { background: #fafbfd; }
.fpt-tw--freeze table.fpt-table tbody tr:hover > :first-child { background: #eaf1f9; }
.fpt-tw--freeze.fpt-tw--sticky table.fpt-table thead tr > :first-child { z-index: 3; }

.fpt-tw__empty { margin: 10px 0 0 !important; padding: 12px; text-align: center; color: var(--fpt-muted); background: var(--fpt-soft); border-radius: 8px; font-size: .92em; }

/* Tela cheia */
.fpt-tw--full, .fpt-tw:fullscreen {
	position: fixed; inset: 0; z-index: 999999; margin: 0; padding: 14px; background: var(--fpt-bg);
	display: flex; flex-direction: column; max-width: none;
}
.fpt-tw:fullscreen { position: relative; }
.fpt-tw--full .fpt-tw__scroll, .fpt-tw:fullscreen .fpt-tw__scroll { flex: 1; max-height: none; }
.fpt-tw--full table.fpt-table, .fpt-tw:fullscreen table.fpt-table { font-size: 1em; }
html.fpt-noscroll, html.fpt-noscroll body { overflow: hidden; }

/* ---------- Responsivo ----------
 * A grade reage à largura do espaço onde foi inserida (container queries),
 * não à largura da tela: funciona igual em colunas estreitas de tema,
 * barras laterais e construtores de página.
 */
.fpt-lib, .fpt-showcase, .fpt-related { container: fpt / inline-size; }

@container fpt (max-width: 860px) {
	.fpt-grid { grid-template-columns: repeat(min(var(--fpt-cols, 3), 2), minmax(0, 1fr)); }
}
@container fpt (max-width: 640px) {
	.fpt-lib__controls { margin-left: 0; width: 100%; justify-content: space-between; }
	.fpt-search { flex-basis: 100%; }
}
@container fpt (max-width: 540px) {
	.fpt-grid { grid-template-columns: 1fr; gap: 10px; }
	.fpt-search__kbd { display: none; }
	.fpt-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -2px; padding: 2px 2px 6px; scrollbar-width: thin; }
	.fpt-chipbtn { flex: none; }

	/* Cartões viram horizontais em espaços estreitos. */
	.fpt-grid--grade .fpt-card__link,
	.fpt-style-cartao .fpt-card__link { flex-direction: row; align-items: center; }
	.fpt-grid--grade .fpt-card__media,
	.fpt-style-cartao .fpt-card__media {
		flex: none; width: 84px; height: 84px; aspect-ratio: auto; margin: 8px 0 8px 8px; border-radius: 6px; border: 1px solid var(--fpt-line);
	}
	.fpt-grid--grade .fpt-card__media img, .fpt-style-cartao .fpt-card__media img { padding: 4px; }
	.fpt-grid--grade .fpt-card__body, .fpt-style-cartao .fpt-card__body { padding: 10px 46px 10px 12px; gap: 4px; }
	.fpt-grid--grade .fpt-card__desc { -webkit-line-clamp: 2; font-size: .82em; }
	.fpt-style-mosaico .fpt-card__link { flex-direction: column; }
	.fpt-style-mosaico .fpt-card__media { width: auto; height: auto; aspect-ratio: 16 / 10; margin: 0; }
	.fpt-style-mosaico .fpt-card__body { padding: 26px 12px 10px; }

	.fpt-grid--lista .fpt-card__body { grid-template-columns: 1fr; grid-template-areas: "meta" "title" "norma"; padding-right: 50px; }
	.fpt-grid--lista .fpt-card__meta, .fpt-grid--lista .fpt-card__norma { justify-self: start; justify-content: flex-start; }
	.fpt-grid--lista .fpt-card__desc { display: none; }
	.fpt-grid--lista .fpt-card__media { width: 52px; height: 52px; }
}

@media (max-width: 600px) {
	.fpt-tw__actions { margin-left: 0; width: 100%; }
	.fpt-tw__actions button { flex: 1; justify-content: center; padding: 8px 6px; }
	.fpt-tw__actions button span { font-size: .92em; }
	.fpt-tw__filter { max-width: none; }
	.fpt-tw--wide .fpt-tw__hint { display: block; }
	.fpt-tw table.fpt-table { font-size: .86em; }
	.fpt-tw table.fpt-table th, .fpt-tw table.fpt-table td { padding: 7px 8px !important; }
	.fpt-sbox__go { padding: .5em .8em; }
}

@media (prefers-reduced-motion: reduce) {
	.fpt *, .fpt *::before, .fpt *::after { transition: none !important; animation: none !important; }
}

@media print {
	.fpt-tw__bar, .fpt-tw__hint, .fpt-related, .fpt-crumb, .fpt-fav { display: none !important; }
	.fpt-tw__scroll { max-height: none !important; overflow: visible !important; border: 0; }
	.fpt-tw--wide::before, .fpt-tw--wide::after { display: none; }
}

.fpt-admin-note { padding: 10px 12px; border: 1px dashed #d97706; background: #fffbeb; color: #92400e; border-radius: 6px; font-size: .9em; }

/* ---------- Blindagem contra estilos de botão/campo do tema ----------
 * Muitos temas estilizam "button" e "input" com seletores fortes.
 * O sufixo :not(#fpt-x) eleva a especificidade sem usar !important.
 */
.fpt button:not(#fpt-x) {
	text-transform: none; letter-spacing: normal; text-shadow: none; min-height: 0; min-width: 0;
	width: auto; text-decoration: none; font-family: inherit; line-height: 1.2;
}
.fpt button.fpt-chipbtn:not(#fpt-x) { background: var(--fpt-bg); color: var(--fpt-text); border: 1px solid var(--fpt-line-2); padding: 7px 12px; border-radius: 999px; font-size: .88em; font-weight: 500; box-shadow: none; }
.fpt button.fpt-chipbtn:not(#fpt-x):hover { background: var(--fpt-bg); color: var(--fpt-ink); border-color: var(--fpt-cat, var(--fpt-accent)); }
.fpt button.fpt-chipbtn.is-active:not(#fpt-x) { background: var(--fpt-cat, var(--fpt-accent)); border-color: var(--fpt-cat, var(--fpt-accent)); color: #fff; }

.fpt .fpt-viewtoggle button:not(#fpt-x) { background: var(--fpt-bg); color: var(--fpt-muted); border: 0; border-radius: 0; padding: 0; width: 40px; height: 38px; box-shadow: none; }
.fpt .fpt-viewtoggle button + button:not(#fpt-x) { border-left: 1px solid var(--fpt-line-2); }
.fpt .fpt-viewtoggle button:not(#fpt-x):hover { background: var(--fpt-soft); color: var(--fpt-ink); }
.fpt .fpt-viewtoggle button[aria-pressed="true"]:not(#fpt-x) { background: var(--fpt-accent); color: #fff; }

.fpt button.fpt-fav:not(#fpt-x) { background: rgba(255, 255, 255, .92); color: #cbd5e1; border: 1px solid var(--fpt-line); padding: 0; width: 34px; height: 34px; border-radius: 50%; }
.fpt button.fpt-fav:not(#fpt-x):hover, .fpt button.fpt-fav[aria-pressed="true"]:not(#fpt-x) { color: #f59e0b; background: #fff; }

.fpt button.fpt-search__clear:not(#fpt-x) { background: transparent; color: var(--fpt-muted); border: 0; padding: 0; width: 32px; height: 32px; border-radius: 50%; box-shadow: none; }
.fpt button.fpt-search__clear:not(#fpt-x):hover { background: var(--fpt-soft); color: var(--fpt-ink); }

.fpt .fpt-tw__actions button:not(#fpt-x) { background: var(--fpt-bg); color: var(--fpt-text); border: 1px solid var(--fpt-line-2); padding: 7px 10px; border-radius: 7px; font-size: .84em; font-weight: 600; box-shadow: none; }
.fpt .fpt-tw__actions button:not(#fpt-x):hover { border-color: var(--fpt-accent); color: var(--fpt-accent); background: var(--fpt-tint); }
.fpt .fpt-tw__actions button.is-ok:not(#fpt-x) { border-color: #16a34a; color: #15803d; background: #f0fdf4; }

.fpt .fpt-suggest__all button:not(#fpt-x) { background: none; color: var(--fpt-accent); border: 0; border-top: 1px solid var(--fpt-line); padding: 9px 10px; width: 100%; text-align: left; border-radius: 0 0 6px 6px; font-size: .9em; font-weight: 600; }
.fpt .fpt-suggest__all button:not(#fpt-x):hover { background: var(--fpt-soft); }
.fpt button.fpt-linkbtn:not(#fpt-x) { background: none; border: 0; padding: 0; color: var(--fpt-accent); text-decoration: underline; font-weight: 600; font-size: inherit; }

.fpt .fpt-btn:not(#fpt-x) { background: var(--fpt-accent); color: #fff; border: 1px solid var(--fpt-accent); padding: .62em 1.1em; border-radius: 8px; font-size: .95em; font-weight: 600; text-decoration: none; }
.fpt .fpt-btn.fpt-btn--ghost:not(#fpt-x) { background: var(--fpt-bg); color: var(--fpt-accent); border-color: var(--fpt-line-2); }
.fpt .fpt-btn.fpt-btn--ghost:not(#fpt-x):hover { background: var(--fpt-tint); border-color: var(--fpt-accent); }
.fpt .fpt-btn.fpt-btn--sm:not(#fpt-x) { padding: .42em .8em; font-size: .85em; }
.fpt-sbox .fpt-btn.fpt-sbox__go:not(#fpt-x) { padding: .55em 1.1em; }

.fpt input.fpt-search__input:not(#fpt-x), .fpt .fpt-tw__filter input:not(#fpt-x) {
	border: 0; background: transparent; box-shadow: none; outline: 0; width: auto; max-width: none; min-height: 0; border-radius: 0;
}
.fpt .fpt-select select:not(#fpt-x) { border: 1px solid var(--fpt-line-2); background-color: var(--fpt-bg); color: var(--fpt-ink); border-radius: 8px; box-shadow: none; min-height: 0; }
