/* ==========================================================================
   FixDecoded Tools — pace calculator + Fault Finder
   Inherits the theme's tokens (--fd-*). Fallback values keep it usable on
   another theme; :where() gives fallbacks zero specificity so the theme's
   own .fd-button / .fd-callout / .fd-list / .fd-card rules always win.
   Mobile-first, light + dark via the theme's variables, ~5 KB.
   ========================================================================== */

.fdt {
	--fdt-ink: var(--fd-ink, #0e1b25);
	--fdt-text: var(--fd-text, #22313d);
	--fdt-muted: var(--fd-muted, #5c6b76);
	--fdt-line: var(--fd-line, #dfe4e8);
	--fdt-line-strong: var(--fd-line-strong, #b8c3cb);
	--fdt-surface: var(--fd-surface, #f3f6f8);
	--fdt-surface-2: var(--fd-surface-2, #e9eef2);
	--fdt-paper: var(--fd-paper, #ffffff);
	--fdt-accent: var(--fd-accent, #0f8a63);
	--fdt-accent-ink: var(--fd-accent-ink, #0a6b4c);
	--fdt-accent-soft: var(--fd-accent-soft, #e3f4ed);
	--fdt-warn: var(--fd-warn, #b45309);
	--fdt-warn-bg: var(--fd-warn-bg, #fff6e8);
	--fdt-warn-line: var(--fd-warn-line, #f2c48f);
	--fdt-note-bg: var(--fd-note-bg, #eef4f8);
	--fdt-note-line: var(--fd-note-line, #bfd3e0);
	--fdt-display: var(--fd-display, inherit);
	--fdt-radius: var(--fd-radius, 8px);
	--fdt-radius-lg: var(--fd-radius-lg, 12px);

	position: relative;
	margin: 1.5rem 0 2rem;
	padding: 1.1rem 1.15rem 1.2rem;
	border: 1px solid var(--fdt-line);
	border-radius: var(--fdt-radius-lg);
	background: var(--fdt-surface);
	color: var(--fdt-text);
	font-variant-numeric: tabular-nums;
}
.fdt::before {
	content: "";
	position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem;
	width: 4px; border-radius: 0 3px 3px 0;
	background: var(--fdt-accent);
}
.fdt [hidden] { display: none !important; }

/* Headings inside the panel: no article-section dividers. */
.fd-content .fdt h2, .fd-content .fdt h3, .fd-content .fdt h4, .fdt h2, .fdt h3, .fdt h4 {
	margin-top: 0; padding-top: 0; border-top: 0;
}
.fdt__head { margin: 0 0 1rem; }
.fdt__title { font-size: 1.2rem; margin: 0 0 0.25rem; }
.fdt__intro { margin: 0; color: var(--fdt-muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Form pieces
   -------------------------------------------------------------------------- */
.fdt-grid { display: grid; gap: 0.75rem 1rem; }
.fdt-grid--inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fdt-grid--2 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 359px) { .fdt-grid--inputs { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 560px) {
	.fdt-grid--inputs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.fdt-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fdt-field { min-width: 0; }
.fdt-field label, .fdt-field__label {
	display: block;
	margin: 0 0 0.3rem;
	font-family: var(--fdt-display);
	font-size: 0.85rem; font-weight: 600;
	color: var(--fdt-ink);
}
.fdt-field--sub { margin-top: 0.6rem; }
.fdt-input {
	display: block; width: 100%; min-height: 44px;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--fdt-line-strong);
	border-radius: var(--fdt-radius);
	background: var(--fdt-paper);
	color: var(--fdt-ink);
	font: inherit; font-size: 1rem;
	-webkit-appearance: none; appearance: none;
}
.fdt-input::placeholder { color: var(--fdt-muted); opacity: 0.8; }
.fdt-input:focus { outline: none; border-color: var(--fdt-accent); box-shadow: 0 0 0 3px var(--fdt-accent-soft); }
.fdt-input[aria-invalid="true"] { border-color: var(--fdt-warn); }
.fdt-select {
	padding-right: 2.2rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6b76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 1.1rem;
}
@media (prefers-color-scheme: dark) {
	.fdt-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a6b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
}
.fdt-hint { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--fdt-muted); }
.fdt-error { margin: 0.5rem 0 0; font-size: 0.9rem; font-weight: 600; color: var(--fdt-warn); }
.fdt-actions { margin: 0.75rem 0 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Button fallback (theme's .fd-button wins when present). */
:where(.fdt-btn) {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
	min-height: 44px; padding: 0.55rem 1.05rem;
	border: 1px solid var(--fdt-ink); border-radius: var(--fdt-radius);
	background: var(--fdt-ink); color: var(--fdt-paper);
	font: inherit; font-family: var(--fdt-display); font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
}
:where(.fdt-btn--secondary) { background: var(--fdt-paper); color: var(--fdt-ink); border-color: var(--fdt-line-strong); }
:where(.fdt-btn--text) { background: none; border-color: transparent; color: var(--fdt-accent-ink); padding-inline: 0.5rem; text-decoration: underline; text-underline-offset: 0.15em; }

/* --------------------------------------------------------------------------
   Pace calculator
   -------------------------------------------------------------------------- */
.fdt-results { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--fdt-line); }
.fdt-results__title {
	margin: 0 0 0.5rem;
	font-family: var(--fdt-display); font-size: 0.95rem; font-weight: 700;
	color: var(--fdt-accent-ink);
}
.fdt-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.fdt-table th, .fdt-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--fdt-line); text-align: left; vertical-align: middle; }
.fdt-table thead th { font-family: var(--fdt-display); font-size: 0.8rem; font-weight: 700; color: var(--fdt-muted); border-bottom: 2px solid var(--fdt-line-strong); background: transparent; }
.fdt-table th[scope="row"] { font-weight: 600; color: var(--fdt-ink); background: transparent; }
.fdt-table td { text-align: right; font-family: var(--fdt-display); font-weight: 600; color: var(--fdt-ink); white-space: nowrap; }
.fdt-table thead th:last-child { text-align: right; }
.fdt-table tbody tr:last-child th, .fdt-table tbody tr:last-child td { border-bottom: 0; }
/* The theme wraps raw tables in .fd-table-wrap (scroll + 1.5rem margin); not needed here. */
.fdt .fd-table-wrap { margin: 0; overflow: visible; }

.fdt-more {
	margin-top: 1rem;
	border: 1px solid var(--fdt-line); border-radius: var(--fdt-radius);
	background: var(--fdt-paper);
}
.fdt-more summary {
	display: flex; align-items: center; gap: 0.5rem;
	padding: 0.7rem 0.9rem; min-height: 44px;
	font-family: var(--fdt-display); font-weight: 600; color: var(--fdt-ink);
	cursor: pointer; list-style: none;
}
.fdt-more summary::-webkit-details-marker { display: none; }
.fdt-more summary::before { content: "▸"; color: var(--fdt-accent-ink); font-size: 0.8em; transition: transform 0.15s; }
.fdt-more[open] summary::before { transform: rotate(90deg); }
.fdt-more summary:hover { color: var(--fdt-accent-ink); }
.fdt-more__body { padding: 0 0.9rem 0.9rem; }
.fdt-more__body > .fdt-hint:first-child { margin: 0 0 0.75rem; }
.fdt-field--readout { padding-top: 0.15rem; }
.fdt-readout {
	display: flex; align-items: center; min-height: 44px;
	font-family: var(--fdt-display); font-size: 1.3rem; font-weight: 700; color: var(--fdt-ink);
	overflow-wrap: anywhere;
}

/* Callout fallback (theme's .fd-callout wins when present). */
:where(.fdt-callout) {
	margin: 1.25rem 0 0; padding: 0.9rem 1rem;
	border: 1px solid var(--fdt-note-line); border-left-width: 4px;
	border-radius: var(--fdt-radius); background: var(--fdt-note-bg);
	font-size: 0.95rem;
}
:where(.fdt-callout) p { margin: 0; }
:where(.fdt-callout--safety) { background: var(--fdt-warn-bg); border-color: var(--fdt-warn-line); border-left-color: var(--fdt-warn); }
.fdt .fd-callout { margin: 1.25rem 0 0; }
.fdt .fdt-source { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--fdt-muted); }
.fdt .fdt-source a { color: inherit; }
.fdt .fd-callout + .fd-callout { margin-top: 0.75rem; }

/* Related guides (theme's .fd-related--inline / .fd-list win when present). */
.fdt-related { margin-top: 1.5rem; }
.fdt-related__title { font-size: 1rem; margin: 0 0 0.4rem; }
.fdt .fdt-list { list-style: none; margin: 0; padding: 0; }
.fdt .fdt-list__item { margin: 0; padding: 0.6rem 0; border-top: 1px solid var(--fdt-line); }
:where(.fdt-list__item:first-child) { border-top: 0; }
:where(.fdt-list__item > a) { font-family: var(--fdt-display); font-weight: 600; color: var(--fdt-ink); text-decoration: none; }
:where(.fdt-list__item > a:hover) { color: var(--fdt-accent-ink); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Fault Finder
   -------------------------------------------------------------------------- */
.fdt-ff__progress { margin: 0 0 1rem; }
.fdt-ff__bar { height: 4px; border-radius: 2px; background: var(--fdt-line); overflow: hidden; }
.fdt-ff__bar span { display: block; height: 100%; width: 0; background: var(--fdt-accent); transition: width 0.25s ease; }
.fdt-ff__step { margin: 0.4rem 0 0; font-family: var(--fdt-display); font-size: 0.8rem; font-weight: 600; color: var(--fdt-muted); }

.fdt-ff__answers { margin: 0 0 1rem; font-size: 0.88rem; }
.fdt-ff__answers-title { margin: 0 0 0.2rem; font-family: var(--fdt-display); font-size: 0.78rem; font-weight: 700; color: var(--fdt-muted); }
.fdt-ff__answer { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid var(--fdt-line); }
.fdt-ff__answer-text { color: var(--fdt-text); min-width: 0; }
.fdt-ff__answer-text strong { color: var(--fdt-ink); font-weight: 600; }
.fdt-ff__change {
	flex: none; min-height: 32px; padding: 0.15rem 0.4rem;
	border: 0; background: none; color: var(--fdt-accent-ink);
	font: inherit; font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer;
}
.fdt-ff__change:hover { color: var(--fdt-ink); }

.fdt-ff__stage { scroll-margin-top: calc(var(--fd-header-h, 64px) + 16px); }
.fdt-ff__question { font-size: 1.15rem; margin: 0 0 0.35rem; }
.fdt-ff__help { margin: 0 0 0.9rem; color: var(--fdt-muted); font-size: 0.93rem; }
.fdt-ff__eyebrow { margin: 0 0 0.3rem; font-family: var(--fdt-display); font-size: 0.8rem; font-weight: 600; color: var(--fdt-accent-ink); }

.fdt-options { display: grid; gap: 0.5rem; grid-template-columns: minmax(0, 1fr); margin: 0.75rem 0 0; }
@media (min-width: 560px) { .fdt-options--row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.fdt-option {
	display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem;
	min-height: 48px; width: 100%; padding: 0.7rem 0.95rem;
	border: 1px solid var(--fdt-line-strong); border-radius: var(--fdt-radius);
	background: var(--fdt-paper); color: var(--fdt-ink);
	font: inherit; font-family: var(--fdt-display); font-weight: 600; font-size: 0.97rem; line-height: 1.3; text-align: left;
	cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.fdt-option:hover { border-color: var(--fdt-accent); background: var(--fdt-accent-soft); color: var(--fdt-accent-ink); }
.fdt-option:disabled { cursor: default; opacity: 0.75; }
.fdt-option--notsure { font-weight: 500; color: var(--fdt-muted); border-style: dashed; }
.fdt-option__label { font: inherit; }
.fdt-option__desc { font-family: var(--fd-font, inherit); font-weight: 400; font-size: 0.85rem; color: var(--fdt-muted); }

.fdt-ff__nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--fdt-line); }

/* Result */
.fdt-result__title { font-size: 1.2rem; margin: 0 0 0.45rem; }
.fdt-result__summary { margin: 0 0 1rem; }
.fdt-checks__title { font-family: var(--fdt-display); font-size: 0.95rem; font-weight: 700; color: var(--fdt-ink); margin: 0 0 0.25rem; }
.fdt .fdt-checks { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.fdt .fdt-check { margin: 0; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.2rem 0.65rem; padding: 0.65rem 0; border-top: 1px solid var(--fdt-line); align-items: start; }
.fdt-check__num {
	grid-row: span 2; width: 1.75rem; height: 1.75rem; margin-top: 0.05rem;
	display: grid; place-items: center; border-radius: 50%;
	background: var(--fdt-ink); color: var(--fdt-paper);
	font-family: var(--fdt-display); font-size: 0.8rem; font-weight: 700;
}
.fdt-check__tier {
	display: inline-block; width: max-content; max-width: 100%;
	padding: 0.08rem 0.55rem; border-radius: 999px;
	font-family: var(--fdt-display); font-size: 0.72rem; font-weight: 700; line-height: 1.5;
	background: var(--fdt-surface-2); color: var(--fdt-text);
}
.fdt-check--first .fdt-check__tier { background: var(--fdt-accent-soft); color: var(--fdt-accent-ink); }
.fdt-check--next .fdt-check__tier { background: var(--fdt-note-bg); color: var(--fdt-ink); border: 1px solid var(--fdt-note-line); }
.fdt-check--less .fdt-check__tier { background: transparent; border: 1px dashed var(--fdt-line-strong); color: var(--fdt-muted); }
.fdt-check--less .fdt-check__num { background: var(--fdt-line-strong); color: var(--fdt-paper); }
.fdt-check--less .fdt-check__text { color: var(--fdt-muted); }
.fdt-check__text { margin: 0; font-size: 0.95rem; }

.fdt-result__cta { margin: 1rem 0 0; }
.fdt-result__lead { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--fdt-muted); }
.fdt-result__cta .fd-button, .fdt-result__cta .fdt-btn { max-width: 100%; text-align: left; }
.fdt-result__related { margin: 1rem 0 0; font-size: 0.92rem; }
.fdt-result__related-title { margin: 0 0 0.2rem; font-family: var(--fdt-display); font-size: 0.8rem; font-weight: 700; color: var(--fdt-muted); }
.fdt .fdt-result__related ul { list-style: none; margin: 0; padding: 0; }
.fdt .fdt-result__related li { margin: 0; padding: 0.25rem 0; }
.fdt-result__related a { color: var(--fdt-accent-ink); }
.fdt-result__hub { margin: 0.75rem 0 0; font-size: 0.9rem; }
.fdt-result__disclaimer { margin: 1rem 0 0; font-size: 0.82rem; color: var(--fdt-muted); }

/* Guide list (collapsed) + editor note */
.fdt-routes { margin-top: 1.25rem; font-size: 0.88rem; color: var(--fdt-muted); }
.fdt-routes summary { cursor: pointer; font-family: var(--fdt-display); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.fdt-routes summary:hover { color: var(--fdt-accent-ink); }
.fdt-routes__label { margin: 0.6rem 0 0.15rem; font-size: 0.8rem; color: var(--fdt-ink); }
.fdt .fdt-routes__list { margin: 0 0 0.25rem; padding-left: 1.1rem; }
.fdt .fdt-routes__list li { margin: 0.15rem 0; }
.fdt-admin-note { margin: 1rem 0 0; padding: 0.5rem 0.75rem; border: 1px dashed var(--fdt-warn-line); border-radius: var(--fdt-radius); font-size: 0.8rem; color: var(--fdt-warn); }

/* Transition between steps (the theme already disables animation under reduced motion). */
.fdt-ff__stage.is-entering { animation: fdt-in 0.18s ease-out; }
@keyframes fdt-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fdt-ff__stage.is-entering { animation: none; } .fdt-ff__bar span { transition: none; } }

/* Hub cards (theme's .fd-card wins when present). */
:where(.fdt-cards) { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
:where(.fdt-card) { position: relative; display: flex; flex-direction: column; gap: 0.4rem; padding: 1.05rem 1.15rem 1.15rem; border: 1px solid var(--fd-line, #dfe4e8); border-radius: var(--fd-radius-lg, 12px); background: var(--fd-paper, #fff); }
:where(.fdt-card__title) { font-size: 1.12rem; margin: 0; }
:where(.fdt-card__title a) { color: var(--fd-ink, #0e1b25); text-decoration: none; }
:where(.fdt-card__title a::after) { content: ""; position: absolute; inset: 0; border-radius: inherit; }
:where(.fdt-card__excerpt) { margin: 0; font-size: 0.93rem; color: var(--fd-muted, #5c6b76); }
.fdt-card__cta { margin-top: auto; font-family: var(--fd-display, inherit); font-size: 0.85rem; font-weight: 600; color: var(--fd-accent-ink, #0a6b4c); }

/* ==========================================================================
   Error Code Decoder (1.0.4)
   Uses the theme's --fd-* tokens with zero-specificity fallbacks, like the
   rest of this stylesheet. The table is 3 columns so the theme never forces
   it to scroll sideways on phones; on narrow screens it stacks as cards.
   ========================================================================== */
:where(.fdt-ec-search) { margin: 0 0 1rem; }
:where(.fdt-ec-input) { width: 100%; font-size: 1.1rem; letter-spacing: 0.02em; }
:where(.fdt-ec-badge) {
	display: inline-block; font-size: 0.72rem; font-weight: 600; line-height: 1.5; padding: 0 0.5em;
	border-radius: 999px; border: 1px solid var(--fdt-line, #dfe4e8); color: var(--fdt-muted, #5c6b76);
	background: var(--fdt-surface-2, #e9eef2); white-space: nowrap; vertical-align: middle; margin-top: 0.35rem;
}
:where(.fdt-ec-badge--verified) { border-color: color-mix(in srgb, var(--fdt-accent, #0f8a63) 55%, transparent); color: var(--fdt-accent, #0f8a63); background: color-mix(in srgb, var(--fdt-accent, #0f8a63) 10%, transparent); }
:where(.fdt-ec-badge--reported) { border-color: color-mix(in srgb, var(--fdt-warn, #b7791f) 55%, transparent); color: var(--fdt-warn-ink, #8a5a12); background: color-mix(in srgb, var(--fdt-warn, #b7791f) 12%, transparent); }
:where(.fdt-ec-badge--needs-check) { border-style: dashed; }
:where(.fdt-ec-legend) { font-size: 0.85rem; color: var(--fdt-muted, #5c6b76); margin: 0.5rem 0 1rem; }
:where(.fdt-ec-intro) { font-size: 1.05rem; }
:where(.fdt-ec-note) { margin: 1rem 0; }

/* Table */
:where(.fdt-ec-table) { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
:where(.fdt-ec-table th) { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fdt-muted, #5c6b76); padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--fdt-line, #dfe4e8); }
:where(.fdt-ec-table td) { vertical-align: top; padding: 0.9rem 0.6rem; border-bottom: 1px solid var(--fdt-line, #dfe4e8); }
:where(.fdt-ec-table td p) { margin: 0 0 0.5rem; }
:where(.fdt-ec-table td p:last-child) { margin-bottom: 0; }
:where(.fdt-ec-code) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; display: block; }
:where(.fdt-ec-aliases, .fdt-ec-models) { display: block; font-size: 0.8rem; color: var(--fdt-muted, #5c6b76); margin-top: 0.25rem; }
:where(.fdt-ec-sub) { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fdt-muted, #5c6b76); margin: 0.6rem 0 0.2rem; }
:where(.fdt-ec-causes, .fdt-ec-checks, .fdt-ec-related) { margin: 0.2rem 0 0.6rem 1.1rem; padding: 0; }
:where(.fdt-ec-causes li, .fdt-ec-checks li, .fdt-ec-related li) { margin: 0 0 0.25rem; padding: 0; }
:where(.fdt-ec-source) { font-size: 0.8rem; color: var(--fdt-muted, #5c6b76); }
:where(.fdt-ec-stop) { margin: 0.6rem 0; font-size: 0.9rem; }
:where(.fdt-ec-guide) { margin-top: 0.6rem; }
:where(.fdt-ec-related-title) { font-size: 0.8rem; color: var(--fdt-muted, #5c6b76); margin: 0.6rem 0 0.2rem; }
:where(.fdt-ec-row.is-target td) { background: color-mix(in srgb, var(--fdt-accent, #0f8a63) 8%, transparent); }
:where(.fdt-ec-row--needs-check td) { opacity: 0.75; background: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in srgb, var(--fdt-line, #dfe4e8) 40%, transparent) 8px 9px); }

@media (max-width: 640px) {
	:where(.fdt-ec-table thead) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	:where(.fdt-ec-table, .fdt-ec-table tbody, .fdt-ec-table tr, .fdt-ec-table td) { display: block; width: 100%; }
	:where(.fdt-ec-table tr) { border: 1px solid var(--fdt-line, #dfe4e8); border-radius: var(--fdt-radius, 12px); padding: 0.5rem 0.75rem; margin: 0 0 0.9rem; }
	:where(.fdt-ec-table td) { border: 0; padding: 0.4rem 0; }
}

/* Hub: results and family cards */
:where(.fdt-ec-results-title) { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fdt-muted, #5c6b76); margin: 0.5rem 0; }
:where(.fdt-ec-hits) { display: grid; gap: 0.75rem; margin: 0 0 1rem; }
:where(.fdt-ec-hit) { border: 1px solid var(--fdt-line, #dfe4e8); border-radius: var(--fdt-radius, 12px); padding: 0.85rem 1rem; background: var(--fdt-paper, #ffffff); }
:where(.fdt-ec-hit p) { margin: 0 0 0.4rem; }
:where(.fdt-ec-hit p:last-child) { margin: 0; }
:where(.fdt-ec-hit__meaning) { font-size: 0.95rem; }
:where(.fdt-ec-families-title, .fdt-ec-sources-title) { font-size: 1.05rem; margin: 1.5rem 0 0.75rem; }
:where(.fdt-ec-count) { font-size: 0.8rem; color: var(--fdt-muted, #5c6b76); margin: 0.25rem 0 0; }
:where(.fdt-ec-draft) { font-size: 0.75rem; font-weight: 400; color: var(--fdt-muted, #5c6b76); }
:where(.fdt-ec-notfound) { border: 1px dashed var(--fdt-line, #dfe4e8); border-radius: var(--fdt-radius, 12px); padding: 0.85rem 1rem; margin: 1rem 0; }
:where(.fdt-ec-sources) { font-size: 0.9rem; }
:where(.fdt-ec-unofficial, .fdt-ec-checked) { font-size: 0.8rem; color: var(--fdt-muted, #5c6b76); }
:where(.fdt-ec-inline) { margin: 1.25rem 0; }
:where(.fdt-ec-inline .fdt-ec-checks) { margin-left: 1.1rem; }

/* --------------------------------------------------------------------------
   Electricity cost + laundry load helpers
   -------------------------------------------------------------------------- */
.fdt-grid--3, .fdt-grid--4 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
	.fdt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.fdt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 820px) { .fdt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.fdt-choice-set, .fdt-load-items {
	margin: 0 0 1rem; padding: 0; border: 0; min-width: 0;
}
.fdt-choice-set legend, .fdt-load-items legend {
	margin: 0 0 0.45rem; padding: 0;
	font-family: var(--fdt-display); font-size: 0.85rem; font-weight: 700; color: var(--fdt-ink);
}
.fdt-segmented {
	display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 100%; border: 1px solid var(--fdt-line-strong); border-radius: var(--fdt-radius); overflow: hidden;
	background: var(--fdt-paper);
}
.fdt-segmented__button {
	min-height: 44px; padding: 0.5rem 0.85rem; border: 0; border-right: 1px solid var(--fdt-line-strong);
	background: transparent; color: var(--fdt-text); font: inherit; font-family: var(--fdt-display); font-weight: 600; cursor: pointer;
}
.fdt-segmented__button:last-child { border-right: 0; }
.fdt-segmented__button:hover { background: var(--fdt-accent-soft); color: var(--fdt-accent-ink); }
.fdt-segmented__button.is-active { background: var(--fdt-ink); color: var(--fdt-paper); }
.fdt-segmented__button:focus-visible { outline: 3px solid var(--fdt-accent-soft); outline-offset: -3px; }
.fdt-energy__tariff { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--fdt-line); }

.fdt-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
@media (min-width: 760px) { .fdt-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fdt-metric {
	min-width: 0; padding: 0.8rem; border: 1px solid var(--fdt-line); border-radius: var(--fdt-radius); background: var(--fdt-paper);
}
.fdt-metric__label { display: block; color: var(--fdt-muted); font-size: 0.78rem; font-family: var(--fdt-display); font-weight: 700; }
.fdt-metric__value { display: block; margin-top: 0.15rem; color: var(--fdt-ink); font-family: var(--fdt-display); font-size: 1.18rem; overflow-wrap: anywhere; }
.fdt-metric__sub { display: block; margin-top: 0.2rem; color: var(--fdt-muted); font-size: 0.8rem; overflow-wrap: anywhere; }

.fdt-load-items { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--fdt-line); }
.fdt-load-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.fdt-load-ring {
	--fdt-load: 0;
	width: 78px; height: 78px; border-radius: 50%;
	display: grid; place-items: center; position: relative;
	background: conic-gradient(var(--fdt-accent) calc(var(--fdt-load) * 1%), var(--fdt-line) 0);
}
.fdt-load-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--fdt-surface); }
.fdt-load-ring span { position: relative; z-index: 1; font-family: var(--fdt-display); font-weight: 800; color: var(--fdt-ink); }
.fdt-load-ring.is-over { background: conic-gradient(var(--fdt-warn) 100%, var(--fdt-line) 0); }
.fdt-load__weight, .fdt-load__status { margin: 0; }
.fdt-load__weight strong { font-family: var(--fdt-display); font-size: 1.35rem; color: var(--fdt-ink); }
.fdt-load__weight span { color: var(--fdt-muted); font-size: 0.86rem; }
.fdt-load__status { margin-top: 0.2rem; font-family: var(--fdt-display); font-weight: 700; color: var(--fdt-accent-ink); }
.fdt-load-ring.is-over + div .fdt-load__status { color: var(--fdt-warn); }
@media (max-width: 400px) { .fdt-load-summary { grid-template-columns: minmax(0, 1fr); } }

/* Error-code equipment filter */
.fdt-ec-equipment { margin-bottom: 0.9rem; }
.fdt-chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.fdt-chip {
	min-height: 38px; padding: 0.35rem 0.7rem; border: 1px solid var(--fdt-line-strong); border-radius: 999px;
	background: var(--fdt-paper); color: var(--fdt-text); font: inherit; font-size: 0.86rem; font-family: var(--fdt-display); font-weight: 600; cursor: pointer;
}
.fdt-chip:hover { border-color: var(--fdt-accent); background: var(--fdt-accent-soft); color: var(--fdt-accent-ink); }
.fdt-chip.is-active { background: var(--fdt-ink); border-color: var(--fdt-ink); color: var(--fdt-paper); }
.fdt-chip:focus-visible { outline: 3px solid var(--fdt-accent-soft); outline-offset: 2px; }
