/* Recipes hub (templates/hub-recipes.php). UI v2 inline-style cleanup.
   Part 1 is the old <style> block of the template, moved verbatim. Part 2 replaces every inline style and
   mouseover handler of the template with rx-* classes (selectors start with `.recipe-index`, the wrapper div,
   so they outrank the legacy cascade the inline styles used to beat). Part 3 restates type that
   readability.css forced through [style*="font-size"] selectors. */

.recipe-index,
.recipe-index * {
    box-sizing: border-box;
}
.recipe-index__band {
    width: 100%;
}
.recipe-index__inner {
    width: 100%;
    max-width: 1052px;
    margin: 0 auto;
    padding-inline: 24px;
    min-width: 0;
}
.recipe-index__hero {
    padding: 64px 0 72px;
}
.recipe-index__paths {
    padding-top: 32px;
}
.recipe-index__paths-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.recipe-index__path-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 32px;
    text-align: center;
    border-right: 1px solid var(--gray-border);
}
.recipe-index__path-card:last-child {
    border-right: 0;
}
.recipe-index__hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--white);
    color: var(--dark);
    font-weight: 700;
    text-decoration: none;
}
.recipe-index__intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 48px;
    align-items: start;
}
.recipe-index__intro-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.recipe-index__standards-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
}
.recipe-index__policy {
    min-width: 0;
}
.recipe-index__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.recipe-index__techniques-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.recipe-index__techniques-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.recipe-index__paths-grid > *,
.recipe-index__intro-grid > *,
.recipe-index__intro-cards > *,
.recipe-index__standards-grid > *,
.recipe-index__techniques-grid > * {
    min-width: 0;
}
.recipe-index .smi-hidden {
    display: none !important;
}
.recipe-index .masonry-grid {
    column-count: 1;
    column-gap: 20px;
}
@media (min-width: 640px) {
    .recipe-index .masonry-grid { column-count: 2; }
}
@media (min-width: 1024px) {
    .recipe-index .masonry-grid { column-count: 3; }
}
.recipe-index .masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
}
@media (max-width: 767px) {
    .recipe-index__inner {
        width: calc(100% - 24px);
        padding-inline: 0;
    }
    .recipe-index__hero {
        padding: 48px 0;
    }
    .recipe-index__paths-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .recipe-index__path-card {
        border-right: 0;
        border-bottom: 1px solid var(--gray-border);
    }
    .recipe-index__path-card:last-child {
        border-bottom: 0;
    }
    .recipe-index__intro-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    .recipe-index__intro-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .recipe-index__standards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .recipe-index__toolbar,
    .recipe-index__techniques-header {
        align-items: stretch;
        flex-direction: column;
    }
    .recipe-index__techniques-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .recipe-index .masonry-grid {
        column-count: 1;
    }
}

/* ===== Part 2: classes that replace the inline styles ===== */

/* Palette rows: pastel background, accent colour, soft border (recipe and guide tiles, chips, icons) */
.recipe-index .rx-tone-red     { --rx-bg: #fef2f2; --rx-fg: #ef4444; --rx-bd: #fecaca; }
.recipe-index .rx-tone-orange  { --rx-bg: #fff7ed; --rx-fg: #f97316; --rx-bd: #fed7aa; }
.recipe-index .rx-tone-purple  { --rx-bg: #faf5ff; --rx-fg: #a855f7; --rx-bd: #f3e8ff; }
.recipe-index .rx-tone-green   { --rx-bg: #f0fdf4; --rx-fg: #22c55e; --rx-bd: #dcfce7; }
.recipe-index .rx-tone-blue    { --rx-bg: #eff6ff; --rx-fg: #3b82f6; --rx-bd: #dbeafe; }
.recipe-index .rx-tone-fuchsia { --rx-bg: #fdf4ff; --rx-fg: #d946ef; --rx-bd: #f5d0fe; }

.recipe-index .rx-sec-pb0 { padding-bottom: 0; }
.recipe-index .rx-mb64 { margin-bottom: 64px; }
.recipe-index .rx-grow { flex: 1; }

/* Hero */
.recipe-index .rx-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0.95)), var(--dark);
}
.recipe-index .rx-hero-inner { text-align: center; color: var(--white); }
.recipe-index .rx-hero-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.recipe-index .rx-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 900;
    margin: 0 0 24px;
    line-height: 1.1;
}
.recipe-index .rx-hero-em { font-style: italic; }

/* Culinary paths */
.recipe-index .rx-paths { margin-bottom: 48px; position: relative; z-index: 2; }
.recipe-index .rx-paths-box {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.recipe-index .rx-path-tile {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--rx-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.recipe-index .rx-path-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 4px;
}
.recipe-index .rx-path-note { font-size: 13px; color: var(--gray); }

/* Intro */
.recipe-index .rx-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}
.recipe-index .rx-kicker.rx-kicker--sm { margin-bottom: 8px; }
.recipe-index .rx-intro-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 900;
    color: var(--dark);
    margin: 0 0 16px;
    line-height: 1.2;
}
.recipe-index .rx-intro-text {
    font-size: var(--fs-md);
    color: var(--gray);
    line-height: 1.7;
    margin: 0;
}
.recipe-index .rx-intro-item {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 24px;
}
.recipe-index .rx-icon-tile {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--rx-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.recipe-index .rx-item-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
}
.recipe-index .rx-item-text {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* Standards panels */
.recipe-index .rx-panel {
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    padding: 24px;
}
.recipe-index .rx-panel-warm { background: var(--warm-bg); }
.recipe-index .rx-panel-white { background: var(--white); }
.recipe-index .rx-panel-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px;
}
.recipe-index .rx-panel-text {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.65;
    margin: 0;
}
.recipe-index .rx-panel-title-sm {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px;
}
.recipe-index .rx-panel-text-sm {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

/* Catalog header */
.recipe-index .rx-catalog-head {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-border);
}
.recipe-index .rx-catalog-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    margin: 0 0 4px;
}
.recipe-index .rx-catalog-note { font-size: 14px; color: var(--gray); margin: 0; }

/* Featured recipe */
.recipe-index .rx-feat {
    display: block;
    background: linear-gradient(to bottom, rgba(23, 23, 23, 0.1), rgba(23, 23, 23, 0.8)), var(--rx-bg);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    padding: 0;
    height: 28rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--white);
}
.recipe-index .rx-feat-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-index .rx-feat-chip {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 2;
}
.recipe-index .rx-feat-foot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 24px;
    background: linear-gradient(to bottom, transparent, rgba(23, 23, 23, 0.95));
    z-index: 1;
}
.recipe-index .rx-feat-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

/* Compact row recipe */
.recipe-index .rx-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}
.recipe-index .rx-row-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.recipe-index .rx-row-ph {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: var(--rx-bg);
    border: 1px solid var(--rx-bd);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.recipe-index .rx-row-body { flex: 1; min-width: 0; }
.recipe-index .rx-row-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
    line-height: 1.3;
}
.recipe-index .rx-row-chips { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.recipe-index .rx-row-pill {
    font-size: 11px;
    background: var(--rx-bg);
    color: var(--rx-fg);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.recipe-index .rx-row-arrow { flex-shrink: 0; line-height: 0; }

/* Text-only recipe and standard recipe */
.recipe-index .rx-plain {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    padding: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.recipe-index .rx-plain-media { height: 140px; overflow: hidden; }
.recipe-index .rx-fill-img { width: 100%; height: 100%; object-fit: cover; }
.recipe-index .rx-plain-body { padding: 20px 24px; position: relative; }
.recipe-index .rx-plain-flag {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--rx-bg);
    color: var(--rx-fg);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--rx-bd);
}
.recipe-index .rx-plain-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 12px;
    line-height: 1.3;
}
.recipe-index .rx-plain-cta {
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.recipe-index .rx-std {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.recipe-index .rx-std-media { height: 200px; overflow: hidden; }
.recipe-index .rx-std-ph {
    height: 200px;
    background: var(--rx-bg);
    border-bottom: 1px solid var(--rx-bd);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.recipe-index .rx-std-body { padding: 20px 24px; }
.recipe-index .rx-std-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.3;
}

/* Show more button (out-ranks .btn-show-more and its :hover, as the inline style did) */
.recipe-index .rx-more-wrap { text-align: center; margin-top: 40px; }
.recipe-index button.rx-more-btn,
.recipe-index button.rx-more-btn:hover {
    padding: 14px 32px;
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Empty state */
.recipe-index .rx-empty {
    background: var(--warm-bg);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
}
.recipe-index .rx-empty-ico { margin-bottom: 16px; }
.recipe-index .rx-empty-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 12px;
}
.recipe-index .rx-empty-text {
    font-size: var(--fs-md);
    color: var(--gray);
    margin: 0 auto;
    max-width: 500px;
}

/* Technique guides */
.recipe-index .rx-tech-head { margin-bottom: 24px; }
.recipe-index .rx-tech-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
    margin: 0;
}
.recipe-index a.rx-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
}
.recipe-index a.rx-all-link:hover { border-color: var(--red); }
.recipe-index a.rx-guide-link {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}
.recipe-index a.rx-guide-link:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.recipe-index .rx-guide-media {
    height: 120px;
    background: var(--rx-bg);
    border-bottom: 1px solid var(--rx-bd);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.recipe-index .rx-guide-body { padding: 20px; }
.recipe-index .rx-guide-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
    line-height: 1.3;
}
.recipe-index .rx-guide-blurb {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Closing call to action */
.recipe-index .rx-cta-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(249, 115, 22, 0.05));
    border: 1px solid var(--gray-border);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}
.recipe-index .rx-cta-title {
    font-family: var(--font-heading);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    color: var(--dark);
    margin: 0 0 16px;
    line-height: 1.2;
}
.recipe-index .rx-cta-text {
    font-size: var(--fs-md);
    color: var(--gray);
    margin: 0 auto 28px;
    max-width: 600px;
}
.recipe-index .rx-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.recipe-index a.rx-cta-btn {
    padding: 14px 28px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== Part 3: type that readability.css forced through [style*="font-size"] selectors ===== */
/* Legacy mobile layer of style.css, restated: it matched the old inline `padding: 32px 24px` with [style*=...] */
@media (max-width: 768px) {
    .recipe-index .rx-feat-foot { padding: 20px; }
}
.recipe-index div.rx-hero-chip,
.recipe-index div.rx-kicker { font-size: var(--ktp-text-ui); line-height: 1.62; }
.recipe-index div.rx-path-note,
.recipe-index div.rx-feat-chip,
.recipe-index div.rx-plain-flag { line-height: 1.62; }
.recipe-index div.rx-plain-cta { line-height: 1.58; }
.recipe-index h2.rx-path-title { font-size: var(--ktp-text-ui) !important; line-height: 1.72 !important; }
.recipe-index span.rx-row-pill { line-height: 1.58; }
.recipe-index a.rx-all-link,
.recipe-index a.rx-cta-btn { font-size: 18px; line-height: 1.55; }
/* `!important` below only where readability.css has an !important element rule (p, button, a h3, h2) and the old
   effective value came from an !important [style*="font-size"] rule that out-ranked it. */
.recipe-index p.rx-intro-text,
.recipe-index p.rx-cta-text { font-size: var(--ktp-text-body) !important; line-height: var(--ktp-line-body) !important; }
.recipe-index p.rx-guide-blurb,
.recipe-index p.rx-panel-text,
.recipe-index p.rx-panel-text-sm,
.recipe-index p.rx-catalog-note { line-height: 1.62 !important; }
.recipe-index a h3.rx-guide-title { font-size: var(--ktp-text-ui) !important; line-height: 1.72 !important; }
.recipe-index button.rx-more-btn { font-size: var(--ktp-text-ui) !important; line-height: 1.62 !important; }
