/* Filtered collection hubs (templates/hub-filtered.php: /origins/<x>/, /species/<x>/, /uses/<x>/, /dried-peppers/ and the
   other standalone collections). UI v2 inline-style cleanup. Every inline style of the template is an hf-* class here;
   selectors start with `.hf-page` (body class set by the template) so they outrank the legacy cascade the inline styles
   used to beat. Data colours arrive as custom properties from the template: --hub-accent (+ --hf-accent-06/08/12/20,
   the same colour with a hex alpha suffix), --hf-c (one tier or hub colour per element), --hf-c-fade, --hf-left, --hf-w.
   Part 3 restates the line-height that readability.css forced through [style*="font-size"] selectors, and part 2 ends
   with the style.css mobile rules that matched the old inline values. */

.hf-page { --hf-unrated: #a8a29e; }

/* ===== Part 1: replaced inline styles ===== */
.hf-page .hf-sec-flush { padding-bottom: 0; }

/* authored prose: 32px gap when a quick summary sits above it */
.hf-page .hub-atlas-prose { margin-top: 0; }
.hf-page .aio-summary-box + .hub-atlas-prose,
.hf-page .hf-lead .hub-atlas-prose { margin-top: 32px; }

/* headings */
.hf-page .hf-h2-paths { font-size: 22px; margin: 0 0 10px; }
.hf-page .hf-h2 { font-size: 22px; font-weight: 800; color: var(--dark); margin: 0 0 12px; }
.hf-page .hf-h2--faq { margin: 0 0 16px; }
.hf-page .hf-arrow { color: var(--red); }

/* body paragraphs */
.hf-page p.hf-p { font-size: var(--fs-md); color: #374151; line-height: 1.7; margin: 0 0 20px; }
.hf-page p.hf-p--slate { color: #475569; }
.hf-page p.hf-p--lh8 { line-height: 1.8; }
.hf-page p.hf-p--lh75 { line-height: 1.75; }
.hf-page p.hf-p--m8 { margin: 0 0 8px; }
.hf-page p.hf-p--m12 { margin: 0 0 12px; }
.hf-page p.hf-p--m16 { margin: 0 0 16px; }
.hf-page p.hf-p--top16 { margin: 16px 0 0; }
.hf-page p.hf-p--narrow { max-width: 760px; }

/* dots */
.hf-page .hf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hf-c); }
.hf-page .hf-dot--accent { background: var(--hub-accent); }
.hf-page .hf-dot--np { margin-top: 6px; flex-shrink: 0; }

/* notable varieties box */
.hf-page .hf-notable {
    background: linear-gradient(135deg, var(--hf-accent-06), var(--hf-accent-12));
    border: 1px solid var(--hf-accent-20);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
}
.hf-page .hf-notable .hub-atlas-chapter__title { font-size: 18px; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.hf-page .hf-notable__grid { gap: 10px; }
.hf-page .hf-np {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: background .15s;
}
.hf-page .hf-np:hover { background: var(--hf-accent-08); }
.hf-page .hf-np__name { color: var(--dark); }
.hf-page .hf-np__facts { color: var(--gray); }

/* section headers */
.hf-page .hf-sechead {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.hf-page .hf-accent { color: var(--hub-accent); }
.hf-page .hf-total { font-size: 13px; color: var(--gray-light); font-weight: 500; }
.hf-page .hf-all-link { font-size: 14px; font-weight: 600; color: var(--red); }

/* profile cards */
.hf-page .hf-tier-fill { background: var(--hf-c); }
.hf-page .hf-tier-ink { color: var(--hf-c); font-weight: 600; }
.hf-page .hf-sep { margin: 0 2px; }
.hf-page .hf-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.hf-page .hf-more { text-align: center; margin-top: 16px; }

/* grouped lists (by cuisine) */
.hf-page .hf-group { margin-bottom: 32px; }
.hf-page .hf-group__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hf-page .hf-group__link { color: var(--dark); text-decoration: none; }
.hf-page .hf-group__n { font-size: 12px; font-weight: 500; color: var(--gray-light); }
.hf-page .hf-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.hf-page .hf-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
}
.hf-page .hf-row:hover { border-color: var(--hf-c); }
.hf-page .hf-row__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--warm-bg);
    border: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hf-page .hf-row__main { flex: 1; min-width: 0; }
.hf-page .hf-row__name { font-size: 15px; font-weight: 700; color: var(--dark); }
.hf-page .hf-row__shu { font-size: 13px; color: var(--hf-c); font-weight: 600; white-space: nowrap; }

/* facets (species / origin / heat tier) */
.hf-page .hf-facet__name { font-size: 14px; font-weight: 600; color: var(--dark); }
.hf-page .hf-facet__n { font-size: 12px; color: var(--gray-light); }
.hf-page .hf-italic { font-style: italic; }
.hf-page .hf-facet-accent:hover { border-color: var(--hub-accent); }
.hf-page .hf-facet-tier:hover { border-color: var(--hf-c); }

/* heat range bars */
.hf-page .hf-bar { display: block; margin-bottom: 12px; text-decoration: none; color: inherit; }
.hf-page .hf-bar__head { display: flex; justify-content: space-between; margin-bottom: 4px; gap: 8px; }
.hf-page .hf-bar__head .hub-atlas-heat-label {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.hf-page .hf-bar__head .hub-atlas-heat-range { font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.hf-page .hf-bar__track { height: 8px; background: var(--ktp-smoke); border-radius: 4px; position: relative; overflow: hidden; }
.hf-page .hf-bar__fill {
    position: absolute;
    left: var(--hf-left);
    width: var(--hf-w);
    height: 100%;
    background: linear-gradient(90deg, var(--hf-c-fade), var(--hf-c));
    border-radius: 4px;
}

/* cross-link cards */
.hf-page .hf-xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.hf-page .hf-xlink { text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.hf-page .hf-xlink__bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--hf-c); }
.hf-page .hf-xlink__body { padding: 14px 16px; }
.hf-page .hf-xlink__name { font-size: 14px; font-weight: 700; color: var(--dark); }

/* FAQ */
.hf-page .hf-faq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.hf-page .hf-faq-list .faq-item { background: var(--white); border: 1px solid var(--gray-border); border-radius: 10px; overflow: hidden; }
.hf-page .hf-faq-list .faq-question {
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}
.hf-page .hf-faq-icon { display: inline-flex; margin-left: 12px; }

/* sources */
.hf-page .hf-src { font-size: 14px; color: #1e40af; line-height: 1.9; margin: 0; padding-left: 20px; }
.hf-page .hf-src__link { color: #1e40af; text-decoration: underline; text-underline-offset: 2px; }
.hf-page .hf-src__name { color: #1e3a5f; }

/* ===== Part 2: style.css mobile rules that matched the old inline values ===== */
@media (max-width: 768px) {
    .hf-page .hf-notable { padding: 18px; }
    .hf-page .hf-p--narrow { padding-left: 16px; padding-right: 16px; }
    .hf-page .hf-row { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
}

/* ===== Part 3: line-height / type forced by readability.css [style*="font-size"] rules ===== */
.hf-page a.hf-np { font-size: 18px !important; line-height: 1.55 !important; }
.hf-page span.hf-total { line-height: 1.62; }
.hf-page a.hf-all-link { font-size: 18px !important; line-height: 1.55 !important; }
.hf-page ul.hf-src { font-size: var(--ktp-text-ui) !important; line-height: 1.72 !important; }
.hf-page .hf-faq-list button.faq-question { font-size: var(--ktp-text-ui) !important; line-height: 1.62 !important; }
.hf-page span.hf-facet__name { line-height: 1.62; }
.hf-page span.hf-facet__n { line-height: 1.62; }
.hf-page .hf-bar__head span.hub-atlas-heat-label { line-height: 1.62; }
.hf-page .hf-bar__head span.hub-atlas-heat-range { line-height: 1.62; }
.hf-page div.hf-xlink__name { line-height: 1.62; }
.hf-page span.hf-row__name { line-height: 1.62; }
.hf-page span.hf-group__n { line-height: 1.62; }
.hf-page span.hf-row__shu { line-height: 1.62; }
/* readability.css .hub-atlas-sources a:hover sets thickness 2px; the old inline text-decoration shorthand reset it to auto */
.hf-page .hub-atlas-sources a.hf-src__link:hover,
.hf-page .hub-atlas-sources a.hf-src__link:focus-visible { text-decoration-thickness: auto; }
