/*
 * Comparison Engine – public comparison tool.
 * Design follows the Feeding Experts 101 home page: black pill buttons, outline pills, a grey track with a
 * pale-yellow active part (as the FAQ switch), soft cream / peach panels, white rounded cards.
 * Fonts are inherited from the site (Elementor / theme typography).
 */
.ce-tool {
	--ce-ink: #1c1c1c; --ce-muted: #6b6b6b; --ce-line: #e7e2d8; --ce-card: #fff;
	--ce-cream: #f8f3e6; --ce-peach: #fde7d8; --ce-yellow: #f7efb0;
	--ce-dark: #111; --ce-orange: #f39a4c;
	--ce-good: #2e8b57; --ce-good-soft: #e3f4e8; --ce-part: #2f6fb0; --ce-part-soft: #e4eef9;
	--ce-warn: #9a6a00; --ce-warn-soft: #fff3cf; --ce-none: #8a8a8a; --ce-none-soft: #efefef;
	--ce-bad: #c0392b; --ce-bad-soft: #fde4e1;
	--ce-r-lg: 24px; --ce-r: 16px; --ce-r-sm: 10px; --ce-shadow: 0 2px 10px rgba(0, 0, 0, .06);
	color: var(--ce-ink); line-height: 1.5; max-width: 1200px; margin: 0 auto; font-size: 16px;
}
.ce-tool *, .ce-tool *::before, .ce-tool *::after { box-sizing: border-box; }
.ce-tool button { font: inherit; color: inherit; cursor: pointer; text-transform: none; letter-spacing: normal; line-height: 1.3; box-shadow: none; }
.ce-tool h3, .ce-tool h4 { color: var(--ce-ink); }
.ce-tool a { color: var(--ce-ink); text-decoration: underline; text-underline-offset: 2px; }
.ce-tool button:focus-visible, .ce-tool a:focus-visible, .ce-tool summary:focus-visible, .ce-tool input:focus-visible, .ce-table-scroll:focus-visible { outline: 3px solid var(--ce-orange); outline-offset: 2px; }
.ce-muted { color: var(--ce-muted); }
.ce-small { font-size: .85em; }
.ce-fallback ol { padding-left: 1.2em; }

/* Header and tabs (a pill switch, like the home page FAQ toggle) */
.ce-tool .ce-title { margin: 0 0 14px; font-size: 1.75rem; line-height: 1.2; }
.ce-lead { margin: -4px 0 16px; color: var(--ce-muted); font-size: 1.05rem; }
.ce-tool .ce-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; overflow: visible; border: 0; }
.ce-tool .ce-tab { background: #fff; border: 1.5px solid var(--ce-ink); border-radius: 999px; padding: 8px 20px; font-weight: 700; font-size: .92rem; color: var(--ce-ink); margin: 0; }
.ce-tool .ce-tab[aria-selected="true"] { background: var(--ce-dark); border-color: var(--ce-dark); color: #fff; }

/* Steps */
.ce-controls { background: var(--ce-cream); border-radius: var(--ce-r-lg); padding: 8px 32px; margin-bottom: 20px; }
.ce-step { padding: 24px 0; }
.ce-step + .ce-step { border-top: 1px solid var(--ce-line); }
.ce-tool .ce-step__label { margin: 0 0 12px; font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.ce-help { margin: 10px 0 0; color: var(--ce-muted); font-size: .92rem; max-width: 70ch; }
.ce-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ce-tool .ce-chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ce-ink); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .92rem; }
.ce-tool .ce-chip[aria-pressed="true"] { background: var(--ce-dark); border-color: var(--ce-dark); color: #fff; }
.ce-tool .ce-chip:disabled { opacity: .35; cursor: not-allowed; }
.ce-count { font-size: .75rem; font-weight: 800; background: var(--ce-cream); color: var(--ce-ink); border-radius: 999px; padding: 1px 8px; }
[aria-pressed="true"] > .ce-count { background: rgba(255, 255, 255, .22); color: inherit; }

/* Icons and their key */
.ce-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .75rem; font-weight: 900; line-height: 1; flex: none; }
.ce-dot--found, .ce-dot--clear { background: var(--ce-good); color: #fff; }
.ce-dot--partial { background: var(--ce-part); color: #fff; }
.ce-dot--not_found { background: var(--ce-none-soft); color: var(--ce-none); border: 1.5px solid #d6d6d6; }
.ce-dot--unverified { background: var(--ce-warn-soft); color: var(--ce-warn); border: 1.5px solid #ecd27a; }
.ce-dot--alert { background: var(--ce-bad); color: #fff; }
.ce-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 0; font-size: .88rem; color: var(--ce-muted); }
.ce-legend li { display: inline-flex; align-items: center; gap: 6px; }

/* Important note, small notes and guide links (set in Settings → Product types) */
.ce-notice { background: #fefce8; border: 1px solid #f1ecc4; border-radius: var(--ce-r); padding: 16px 20px; margin: 0 0 20px; }
.ce-notice__title { display: block; font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.ce-notice p { margin: 0 0 6px; }
.ce-notice p:last-child { margin-bottom: 0; }
.ce-noteline { margin: -6px 0 14px; max-width: none; }
.ce-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 32px 0 0; padding: 28px; background: #f6f7ec; border-radius: var(--ce-r-lg); }
.ce-guide { border-radius: var(--ce-r); padding: 22px 24px; }
.ce-guide--a { background: #faf59f; }
.ce-guide--b { background: #fddcc8; }
.ce-guide__icon { display: block; margin-bottom: 10px; }
.ce-tool .ce-guide__title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; }
.ce-tool .ce-guide__title a { text-decoration: none; }
.ce-guide__text { margin: 0 0 12px; }
.ce-tool .ce-guide__link { font-weight: 800; }
.ce-dataline { margin: 16px 0 0; }
.ce-dataline + .ce-dataline { margin-top: 4px; }

.ce-howto { background: var(--ce-cream); border-radius: var(--ce-r); padding: 14px 20px; margin: 0 0 16px; font-size: .95rem; }
.ce-howto p { margin: 0 0 6px; }
.ce-howto p:last-child { margin-bottom: 0; }
.ce-footnote { margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--ce-line); color: var(--ce-muted); font-size: .85rem; }

/* Alerts */
.ce-alert { background: var(--ce-bad-soft); border-radius: var(--ce-r); padding: 14px 18px; margin-bottom: 14px; font-size: .95rem; border-left: 5px solid var(--ce-bad); }

/* Result cards */
.ce-results__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 12px; }
.ce-pickhint { font-size: .9rem; font-weight: 700; background: var(--ce-yellow); border-radius: 999px; padding: 3px 14px; }
.ce-pickhint.is-full { background: var(--ce-peach); color: #8a4b12; box-shadow: inset 0 0 0 1.5px #e0a070; }
.ce-pickhint.is-nudge { animation: ce-nudge .7s ease 2; }
@keyframes ce-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .ce-pickhint.is-nudge { animation: none; box-shadow: 0 0 0 3px #e0a070; } }
.ce-check:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.ce-check input:disabled { cursor: not-allowed; }
.ce-results__head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.ce-cards { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.ce-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; align-items: start; background: var(--ce-card); border: 1.5px solid #c9c9c9; border-radius: var(--ce-r); padding: 18px 22px; }
.ce-card.is-selected { border-color: var(--ce-dark); }
.ce-card.is-unranked { background: #fcfbf8; border-color: var(--ce-line); }
.ce-card__rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: var(--ce-yellow); }
.is-unranked .ce-card__rank { background: #efefef; color: var(--ce-muted); }
.ce-card__name { font-weight: 800; font-size: 1.15rem; line-height: 1.25; }
.ce-card__full { color: var(--ce-muted); font-size: .9rem; margin-top: 2px; }
.ce-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.ce-key__text { font-weight: 800; font-size: 1.1rem; }
.ce-key__text--soft { font-weight: 400; font-size: .95rem; color: var(--ce-muted); }
.ce-key__link { margin-top: 6px; font-size: .9rem; font-weight: 700; }
.is-unranked .ce-key__text { font-weight: 600; font-size: 1rem; color: var(--ce-muted); }
.ce-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ce-sum { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--ce-yellow); border-radius: 999px; padding: 4px 12px 4px 14px; font-size: .85rem; }
.ce-sum__title { font-weight: 700; }
.ce-sum__count { font-weight: 800; }
.ce-sum.is-key { background: var(--ce-yellow); font-size: .95rem; padding: 6px 14px 6px 16px; }
.ce-sumwords { margin-top: 8px; font-size: .9rem; }
.ce-sumwords__text { margin: 0; }
.ce-sumall { margin-top: 4px; }
.ce-sumall summary::-webkit-details-marker { display: none; }
.ce-sumall summary { list-style: none; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; width: fit-content; }
.ce-sumall__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ce-sumall__list li { display: flex; align-items: flex-start; gap: 10px; }
.ce-sumall__def { display: block; margin-top: 1px; }
.ce-alert--short { padding: 10px 16px; }
.ce-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px 3px 4px; font-size: .82rem; font-weight: 700; background: var(--ce-none-soft); color: #444; }
.ce-pill__icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 900; background: #d9d9d9; color: #555; }
.ce-pill--found, .ce-pill--clear { background: var(--ce-good-soft); color: var(--ce-good); }
.ce-pill--found .ce-pill__icon, .ce-pill--clear .ce-pill__icon { background: var(--ce-good); color: #fff; }
.ce-pill--partial { background: var(--ce-part-soft); color: var(--ce-part); }
.ce-pill--partial .ce-pill__icon { background: var(--ce-part); color: #fff; }
.ce-pill--unverified { background: var(--ce-warn-soft); color: var(--ce-warn); }
.ce-pill--unverified .ce-pill__icon { background: #fff; color: var(--ce-warn); border: 1.5px solid #ecd27a; }
.ce-pill--alert { background: var(--ce-bad-soft); color: var(--ce-bad); }
.ce-pill--alert .ce-pill__icon { background: var(--ce-bad); color: #fff; }
.ce-pill--big { font-size: .95rem; padding: 5px 16px 5px 5px; }
.ce-pill--big .ce-pill__icon { width: 26px; height: 26px; font-size: .85rem; }
.ce-card__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ce-unranked { margin-top: 8px; }
.ce-unranked__head { font-weight: 800; font-size: 1.05rem; padding-top: 14px; border-top: 2px dashed var(--ce-line); }
.ce-unranked__why { margin: 4px 0 10px; color: var(--ce-muted); font-size: .9rem; }

/* Buttons and checks */
.ce-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; cursor: pointer; font-size: .95rem; }
.ce-check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid #9a9a9a; border-radius: 50%; background: #fff center / 14px no-repeat; cursor: pointer; }
.ce-check input:checked { border-color: var(--ce-good); background-color: var(--ce-good); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ce-tool .ce-btn { border-radius: 999px; padding: 8px 20px; font-weight: 700; font-size: .92rem; }
.ce-tool .ce-btn--outline { background: #fff; border: 1.5px solid var(--ce-ink); color: var(--ce-ink); }
.ce-tool .ce-btn--dark { background: var(--ce-dark); border: 1.5px solid var(--ce-dark); color: #fff; }
.ce-tool .ce-link { background: none; border: 0; padding: 0; color: var(--ce-ink); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; font-size: inherit; }
.ce-flash:empty { display: none; }
.ce-flash { background: var(--ce-warn-soft); border-radius: var(--ce-r-sm); padding: 10px 14px; margin-bottom: 12px; }

/* Compare bar */
.ce-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; background: var(--ce-dark); color: #fff; border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.ce-bar__text { font-weight: 600; font-size: .92rem; }
.ce-tool .ce-bar .ce-btn--dark { background: var(--ce-yellow); color: var(--ce-ink); border-color: var(--ce-yellow); }

/* Values */
.ce-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px 3px 4px; font-weight: 700; font-size: .85rem; background: var(--ce-none-soft); color: #444; }
.ce-badge > span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 900; background: #d9d9d9; }
.ce-badge--found, .ce-badge--clear { background: var(--ce-good-soft); color: var(--ce-good); }
.ce-badge--found > span, .ce-badge--clear > span { background: var(--ce-good); color: #fff; }
.ce-badge--partial { background: var(--ce-part-soft); color: var(--ce-part); }
.ce-badge--partial > span { background: var(--ce-part); color: #fff; }
.ce-badge--unverified { background: var(--ce-warn-soft); color: var(--ce-warn); }
.ce-badge--unverified > span { background: #fff; border: 1.5px solid #ecd27a; }
.ce-badge--alert { background: var(--ce-bad-soft); color: var(--ce-bad); }
.ce-badge--alert > span { background: var(--ce-bad); color: #fff; }
.ce-tag { display: inline-block; margin: 6px 4px 0 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #8a4b12; background: var(--ce-peach); border-radius: 6px; padding: 2px 7px; }
.ce-cell__text { margin-top: 3px; }
.ce-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ce-terms { margin-top: 6px; font-size: .85rem; }
.ce-proof { margin-top: 6px; font-size: .85rem; }
.ce-proof summary, .ce-note summary { cursor: pointer; font-weight: 700; color: var(--ce-ink); text-decoration: underline; text-underline-offset: 2px; }
.ce-proof p { margin: 6px 0; }
.ce-sources { margin: 4px 0 0; padding-left: 1.1em; }
.ce-sources li { margin: 2px 0; }
.ce-empty { color: var(--ce-muted); }

/* Side by side */
.ce-compare { margin-top: 32px; }
.ce-compare__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ce-compare__head h3 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.ce-table-scroll { overflow-x: auto; border: 1px solid var(--ce-line); border-radius: var(--ce-r); background: #fff; }
.ce-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; font-size: .95rem; margin: 0; }
.ce-table th, .ce-table td { text-align: left; vertical-align: top; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--ce-line); background: #fff; }
.ce-table thead th { position: sticky; top: 0; z-index: 2; background: #aeeac0; border-bottom: 0; }
.ce-table thead .ce-table__corner { background: #efefef; font-weight: 800; }
.ce-table tbody .ce-row--alt th, .ce-table tbody .ce-row--alt td { background: #faf8ef; }
.ce-table tbody th[scope="row"], .ce-table__corner { position: sticky; left: 0; z-index: 1; width: 210px; min-width: 160px; }
.ce-table thead .ce-table__corner { z-index: 3; }
.ce-table td { min-width: 190px; }
.ce-table__pname { font-weight: 800; font-size: 1.02rem; }
.ce-table__label { font-weight: 700; }
.ce-table__section th { position: sticky; left: 0; background: var(--ce-cream); padding: 8px 14px; }
.ce-tool .ce-fold { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 0; font-weight: 800; font-size: .95rem; }
.ce-table__section .ce-table__desc { position: static; text-align: left; vertical-align: middle; font-weight: 400; font-size: .85rem; color: var(--ce-muted); }
.ce-fold__desc { font-weight: 400; font-size: .85rem; color: var(--ce-muted, #5a5a5a); }
.ce-fold__icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; font-weight: 900; }
.ce-note { font-weight: 400; margin-top: 4px; }
.ce-note p { margin: 4px 0 0; max-width: 80ch; font-size: .9rem; }

/* Other views */
.ce-view h3 { margin: 26px 0 10px; }
.ce-glossary { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ce-gterm { border-radius: var(--ce-r-sm); padding: 12px 16px; background: #fff; box-shadow: var(--ce-shadow); }
.ce-gterm[open] { background: var(--ce-cream); }
.ce-gterm summary { cursor: pointer; font-weight: 800; }
.ce-term p { margin: 8px 0; }

/* Details dialog */
.ce-tool .ce-dialog { border: 0; border-radius: var(--ce-r-lg); padding: 0; width: min(780px, 94vw); max-height: 88vh; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); color: var(--ce-ink); background: #fff; }
.ce-tool .ce-dialog::backdrop { background: rgba(20, 20, 20, .5); }
.ce-dialog__body { padding: 28px 32px; overflow-y: auto; max-height: 88vh; }
.ce-dialog__title { margin: 0 48px 6px 0; font-size: 1.5rem; }
.ce-tool .ce-dialog__close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: var(--ce-dark); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 400; line-height: 1; z-index: 2; }
.ce-tool .ce-dialog__close:hover { background: #333; }
.ce-dl { display: grid; grid-template-columns: minmax(150px, 32%) 1fr; gap: 10px 18px; margin: 0 0 8px; }
.ce-dl dt { font-weight: 700; }
.ce-dl dd { margin: 0; }
.ce-details h4 { margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--ce-line); font-size: 1.15rem; }
.ce-list { padding-left: 1.2em; }

/* Small screens */
@media (max-width: 680px) {
	.ce-controls { padding: 4px 18px; border-radius: var(--ce-r); }
	.ce-card { grid-template-columns: 40px 1fr; padding: 16px; }
	.ce-card__rank { width: 38px; height: 38px; font-size: 1rem; }
	.ce-card__actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
	.ce-table tbody th[scope="row"], .ce-table__corner { width: 130px; min-width: 120px; }
	.ce-dl { grid-template-columns: 1fr; gap: 2px; }
	.ce-dl dd { margin-bottom: 12px; }
	.ce-dialog__body { padding: 22px 18px; }
	.ce-bar { border-radius: var(--ce-r); }
}
@media (prefers-reduced-motion: reduce) { .ce-tool * { scroll-behavior: auto; transition: none; } }

/* Info bar above the results: how many products can be compared */
.ce-info { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 18px; border-radius: var(--ce-r); background: #eef0e8; color: var(--ce-ink); font-size: 1rem; }
.ce-info__icon { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #a3ad8c; color: #fff; font-weight: 800; font-family: Georgia, serif; }

/* Footer: "How we built this comparison" centred, with a call-out to the guide under it. */
.ce-key__text--mixed { font-weight: 400; font-size: 1.05rem; }
.ce-key__text--mixed strong { font-weight: 800; }
.ce-footer { margin: 32px 0 0; padding: 32px 24px; background: #f6f7ec; border-radius: var(--ce-r-lg); text-align: center; }
.ce-footer__about { max-width: 640px; margin: 0 auto; }
.ce-tool .ce-footer__title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; }
.ce-footer__text { margin: 0 0 12px; }
.ce-tool .ce-footer__link { font-weight: 800; }
.ce-cta { margin: 24px auto 0; max-width: 640px; padding: 22px 24px; background: #faf59f; border-radius: var(--ce-r); }
.ce-cta__text { margin: 0 0 12px; }
.ce-tool .ce-cta__btn { display: inline-block; padding: 12px 24px; background: #111; color: #fff; border-radius: 999px; font-weight: 800; text-decoration: none; }
.ce-tool .ce-cta__btn:hover, .ce-tool .ce-cta__btn:focus { background: #333; color: #fff; }
