/* Peel ingredient checker: extends landing.css (Peel palette) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section.tight { padding: 40px 0; }
.h-small { font-size: 1.6rem; margin: 0 0 18px; }
.top .pillnav a[aria-current="page"] { background: var(--forest); color: #fff; }

/* Concern tags and colours */
.rtag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.rtag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.r0 { --c: #2f7a2c; --bg: #e2f0da; }
.r1 { --c: #557a12; --bg: #eef3d2; }
.r2 { --c: #a86405; --bg: #fdecc8; }
.r3 { --c: #c23b2e; --bg: #fbe1dd; }
.rtag { color: var(--c); background: var(--bg); }

/* Search form */
.isearch { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 46px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); box-shadow: 0 10px 30px -18px rgba(31,67,48,.35); }
.isearch:focus-within { border-color: var(--forest); }
.isearch > svg { position: absolute; left: 18px; width: 20px; height: 20px; color: var(--muted); }
.isearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--ink); padding: 10px 0; outline: none; }
.isearch input::-webkit-search-cancel-button { cursor: pointer; }
.isearch .btn { min-height: 44px; padding: 4px 6px 4px 18px; }
.isearch .btn .arrow { width: 32px; height: 32px; }
.isearch.big { max-width: 720px; padding: 8px 8px 8px 54px; }
.isearch.big > svg { left: 22px; width: 22px; height: 22px; }
.isearch.big input { font-size: 1.15rem; padding: 12px 0; }
@media (max-width: 480px) { .isearch .btn { padding-left: 14px; } .isearch.big { padding-left: 46px; } .isearch.big > svg { left: 16px; } }

/* Hub hero */
.ihub { margin-top: -72px; padding: 116px 0 30px; }
.ihub h1 { margin: 0 0 16px; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -0.025em; }
.ihub .lede { margin: 0 0 26px; color: var(--muted); font-size: 1.15rem; max-width: 40em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.filters[hidden] { display: none; }
.filters button { font: inherit; font-size: 0.9rem; font-weight: 650; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.status-line { margin: 14px 0 0; min-height: 1.4em; color: var(--muted); font-size: 0.95rem; }

/* "Scan the whole label" nudge, shown after a few lookups */
.nudge { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; max-width: 820px; margin: 12px 0 4px; padding: 18px 48px 18px 22px; border-radius: 22px; background: var(--forest); color: #fff; }
.nudge[hidden] { display: none; }
.nudge-text { flex: 1 1 260px; }
.nudge-text b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.nudge-text span { opacity: .85; font-size: 0.95rem; }
.nudge .btn.dark { background: var(--orange); border-color: var(--orange); color: #fff; }
.nudge-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #fff; opacity: .7; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.nudge-x:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* Results */
.results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; max-width: 820px; }
.results > li { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.results .hit { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.results .hit:hover { background: var(--cream); }
.results .hit .nm { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--forest); overflow-wrap: anywhere; }
.results .hit small { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.results .hit .chev { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .15s ease; }
.results .hit[aria-expanded="true"] .chev { transform: rotate(180deg); }
.results .detail { padding: 2px 18px 18px; border-top: 1px dashed var(--line); }
.results .detail p { margin: 12px 0 0; color: var(--ink); }
.results .detail .verdict-line { font-weight: 600; color: var(--forest); }
.results .detail .meta { color: var(--muted); font-size: 0.9rem; }
.results .detail .chips { margin-top: 12px; }
.results .detail .more { display: inline-flex; margin-top: 14px; font-weight: 650; color: var(--orange-2); text-underline-offset: 3px; }

/* Ingredient page hero */
.ihero { padding: 26px 0 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-underline-offset: 3px; }
.crumbs span[aria-current] { color: var(--forest); font-weight: 600; }
.ihero h1 { margin: 0 0 8px; font-size: clamp(2.4rem, 6.4vw, 4.2rem); line-height: 1.04; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.aka { margin: 0 0 6px; color: var(--muted); }
.verdict { display: inline-flex; align-items: center; gap: 14px; margin: 18px 0 0; padding: 14px 22px 14px 16px; border-radius: 22px; background: var(--bg); color: var(--c); }
.verdict .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent); flex: none; }
.verdict strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
.verdict span { display: block; font-size: 0.95rem; color: var(--ink); opacity: .8; }
.chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 650; color: var(--forest); }

/* Ingredient page body */
.igrid { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.igrid .col { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.icard, .note, .status dd { overflow-wrap: anywhere; }
@media (min-width: 900px) { .igrid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.icard { background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 24px 26px; }
.icard h2 { margin: 0 0 10px; font-size: 1.45rem; }
.icard p { margin: 0 0 10px; }
.icard p:last-child { margin-bottom: 0; }
.func { color: var(--muted); }
.func b { color: var(--forest); font-weight: 650; }
.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.why li { padding: 12px 14px; border-radius: 16px; background: var(--cream); }
.why b { display: block; color: var(--forest); }
.why span { color: var(--muted); font-size: 0.95rem; }
.note { margin-top: 12px !important; padding: 12px 14px; border-left: 3px solid var(--orange); background: var(--cream); border-radius: 0 14px 14px 0; font-size: 0.95rem; }
.hint { margin-top: 12px !important; font-size: 0.9rem; color: var(--muted); }
.status { margin: 0; display: grid; gap: 0; }
.status div { display: grid; grid-template-columns: minmax(6.5em, 9.5em) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.status div:last-child { border-bottom: 0; }
.status dt { color: var(--muted); font-size: 0.92rem; }
.status dd { margin: 0; font-weight: 600; color: var(--forest); }
.search-card .isearch { box-shadow: none; }
.src { margin: 0; padding: 0 6px; font-size: 0.86rem; color: var(--muted); }
.src a { color: inherit; text-underline-offset: 2px; }

/* Questions about an ingredient */
.faq-card { max-width: 920px; }
.faq-card .qa { padding: 14px 0; border-top: 1px solid var(--line); }
.faq-card h2 + .qa { border-top: 0; padding-top: 4px; }
.faq-card h3 { margin: 0 0 6px; font-size: 1.12rem; color: var(--forest); }
.faq-card .qa p { margin: 0; color: var(--ink); }

/* Link lists */
.ilinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ilinks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.ilinks a { text-decoration: none; font-weight: 600; color: var(--forest); min-width: 0; overflow-wrap: anywhere; }
.ilinks a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ilinks small { color: var(--muted); font-weight: 500; }
.ilinks.enums b { display: inline-block; min-width: 3.6em; color: var(--orange-2); }

/* Rating levels */
.levels { display: grid; gap: 12px; }
@media (min-width: 760px) { .levels { grid-template-columns: repeat(4, 1fr); } }
.level { padding: 20px; border-radius: 22px; background: var(--bg); }
.level b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--c); margin-bottom: 4px; }
.level span { color: var(--ink); opacity: .8; font-size: 0.95rem; }

/* About the data */
.about h2 { font-size: 1.8rem; }
.srcs { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.srcs li { padding: 6px 12px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; }
.srcs a { text-decoration: none; color: var(--forest); }
.fine-print { font-size: 0.88rem; color: var(--muted); }
.fine-print a { color: inherit; }
.verdict .reason { margin-top: 4px; font-weight: 650; opacity: 1; color: var(--c); }
.verdict .reason::before { content: "• "; }

/* Checker teaser on the Peel landing page */
.checker-cta { display: grid; gap: 22px; padding: 44px 34px; border-radius: 40px; background: var(--paper); border: 1px solid var(--line); }
.checker-cta h2 { margin: 0 0 10px; font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.08; }
.checker-cta p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.checker-links { display: flex; flex-wrap: wrap; gap: 8px; }
.checker-links a { padding: 6px 13px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; color: var(--forest); text-decoration: none; }
.checker-links a:hover { background: var(--cream-2); }
@media (min-width: 940px) { .checker-cta { grid-template-columns: 1fr 1.1fr; align-items: center; } .checker-links { grid-column: 1 / -1; } }
@media (max-width: 520px) { .checker-cta { padding: 30px 20px; border-radius: 30px; } }

/* Collapsed lists on the checker page */
.fold > summary { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 650; color: var(--forest); cursor: pointer; list-style: none; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--cream-2); }
.fold > summary:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.fold > summary svg { width: 18px; height: 18px; transition: transform .15s ease; }
.fold[open] > summary svg { transform: rotate(180deg); }
.fold > summary .open, .fold[open] > summary .shut { display: none; }
.fold[open] > summary .open { display: inline; }
.fold[open] > .ilinks { margin-top: 16px; }
.fold { text-align: center; }
.fold > .ilinks { text-align: left; }
