/* Guides hub (templates/hub-guides.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 a gh-* class; selectors start with `.gh-page` (body class
   set by the template) so they outrank the legacy cascade the inline styles used to beat. Part 3
   restates the font-size and line-height that readability.css forced through [style*="font-size"]
   selectors. */

.guides-masonry {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}
@media (min-width: 768px) {
    .guides-masonry { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .guides-masonry { grid-template-columns: repeat(3, 1fr); }
}
.guide-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.guide-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}
.guide-card__image {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.guide-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.guide-card:hover .guide-card__image img {
    transform: scale(1.05);
}
.guide-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.guide-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.guide-card__title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px;
    line-height: 1.3;
    transition: color 0.2s;
}
.guide-card:hover .guide-card__title {
    color: var(--red);
}
.guide-card__excerpt {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.guide-card__meta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-light);
}
.heat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid;
}
.heat-pill:hover {
    transform: translateY(-2px);
}
.cat-block {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 20px;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}
.cat-block > * {
    min-width: 0;
}
.cat-block__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 1024px) {
    .cat-block {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }
}
@media (max-width: 767px) {
    .cat-block {
        padding: 18px;
    }
    .cat-block__list {
        grid-template-columns: minmax(0, 1fr);
    }
}
.cat-block__hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 280px;
}
.cat-block__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.cat-block__hero:hover img {
    transform: scale(1.05);
}
.cat-block__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
}
.cat-block__hero-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
}
.vs-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.vs-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}
.vs-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    font-style: italic;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    border: 2px solid white;
    margin: 0 -16px;
    z-index: 2;
}

/* ---- Part 2: replaces every inline style of templates/hub-guides.php (body class .gh-page). ----
   Selectors start with `.gh-page` (specificity 0,2,0) so they outrank the legacy cascade the inline
   styles used to beat. Per-category colour/tint come from the custom properties on .gh-cat--<slug>;
   per-tier colours from .gh-heat--<slug>; difficulty colours from .gh-diff--<easy|mid|hard>. */

/* Category palette (colour, tint) */
.gh-cat--science { --gh-c: #3b82f6; --gh-bg: #eff6ff; }
.gh-cat--kitchen { --gh-c: #f97316; --gh-bg: #fff7ed; }
.gh-cat--growing { --gh-c: #22c55e; --gh-bg: #f0fdf4; }

/* Sections */
.gh-page .gh-sec--crumb { padding-bottom: 0; }
.gh-page .gh-sec--hero { padding-top: 24px; padding-bottom: 32px; }
.gh-page .gh-sec--filter { padding-top: 0; padding-bottom: 24px; }
.gh-page .gh-sec--feat { padding-top: 0; padding-bottom: 40px; }
.gh-page .gh-sec { padding-top: 0; padding-bottom: 48px; }

/* Hero header */
.gh-page .gh-title { font-family: var(--font-heading); font-size: clamp(36px, 6vw, 52px); font-weight: 900; color: var(--dark); margin: 0 0 12px; line-height: 1.1; }
.gh-page .gh-title__n { font-size: 0.5em; color: var(--red); font-weight: 400; }
.gh-page .gh-lead { font-size: 18px; color: var(--gray); margin: 0; line-height: 1.6; max-width: 700px; }

/* Category filter pills */
.gh-page .gh-filter { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--gray-border); }
.gh-page .gh-pill { padding: 10px 20px; border-radius: 24px; font-size: 14px; font-weight: 600; text-decoration: none; }
.gh-page .gh-pill--all { background: var(--red); color: white; box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3); }
.gh-page .gh-pill--cat { background: var(--white); border: 1px solid var(--gray-border); color: var(--dark); transition: all 0.2s; }
.gh-page .gh-pill--cat:hover { border-color: var(--gh-c); color: var(--gh-c); }

/* Featured guide */
.gh-page .gh-feat { display: block; position: relative; border-radius: 24px; overflow: hidden; min-height: 420px; text-decoration: none; background: linear-gradient(135deg, #4a0404, #1a0505); }
.gh-page .gh-feat__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: opacity 0.3s, transform 0.5s; }
.gh-page .gh-feat__img:hover { opacity: 0.5; transform: scale(1.02); }
.gh-page .gh-feat__shade { position: absolute; inset: 0; background: linear-gradient(to right, rgba(74,4,4,0.95), rgba(74,4,4,0.6), transparent); }
.gh-page .gh-feat__body { position: relative; z-index: 2; padding: 48px; max-width: 700px; display: flex; flex-direction: column; justify-content: center; min-height: 420px; }
.gh-page .gh-feat__chip { display: inline-block; background: var(--red); color: white; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 6px 14px; border-radius: 4px; margin-bottom: 20px; width: max-content; }
.gh-page .gh-feat__title { font-family: var(--font-heading); font-size: clamp(28px, 4vw, 44px); font-weight: 800; color: white; margin: 0 0 16px; line-height: 1.15; }
.gh-page .gh-feat__text { font-size: 17px; color: rgba(255,255,255,0.85); line-height: 1.7; margin: 0 0 24px; max-width: 550px; }
.gh-page .gh-feat__cta { display: flex; align-items: center; gap: 8px; color: white; font-weight: 500; }

/* Guide grid cards (the .guide-card family is styled in part 1) */
.gh-page .gh-fill { width: 100%; height: 100%; background: var(--gh-bg); display: flex; align-items: center; justify-content: center; }
.gh-page .guide-card__badge { color: var(--gh-c); }
.gh-page .gh-time { display: flex; align-items: center; gap: 4px; }
.gh-page .gh-diff { font-weight: 600; }
.gh-page .gh-diff--easy { color: var(--ktp-tier-mild); }
.gh-page .gh-diff--mid { color: var(--ktp-tier-hot); }
.gh-page .gh-diff--hard { color: var(--ktp-tier-extra-hot); }
.gh-page .gh-more { display: none; }
.gh-page .gh-more-wrap { text-align: center; margin-top: 40px; }
.gh-page .gh-more-btn { padding: 16px 40px; background: var(--white); border: 1px solid var(--gray-border); border-radius: 30px; font-size: 14px; font-weight: 700; color: var(--dark); cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s; }
.gh-page .gh-more-btn:hover { border-color: var(--red); color: var(--red); }

/* Section headings */
.gh-page .gh-h2 { font-family: var(--font-heading); font-size: clamp(28px, 4vw, 36px); font-weight: 900; color: var(--dark); margin: 0 0 24px; }
.gh-page .gh-h2--tight { margin: 0 0 8px; }
.gh-page .gh-sub { font-size: 16px; color: var(--gray); margin: 0 0 20px; max-width: 600px; }

/* Guides by category */
.gh-page .gh-cats { display: flex; flex-direction: column; gap: 20px; }
.gh-page .gh-plain { text-decoration: none; }
.gh-page .gh-hero-fill { position: absolute; inset: 0; background: var(--gh-bg); }
.gh-page .gh-hero-chip { display: inline-block; background: var(--gh-c); color: white; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; border-radius: 4px; margin-bottom: 10px; }
.gh-page .gh-hero-title { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: white; margin: 0; line-height: 1.3; }
.gh-page .gh-cat-side { display: flex; flex-direction: column; justify-content: center; }
.gh-page .gh-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gh-page .gh-cat-name { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--dark); margin: 0; }
.gh-page .gh-cat-all { font-size: 13px; font-weight: 600; color: var(--red); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.gh-page .gh-cat-blurb { font-size: 14px; color: var(--gray); margin: 0 0 16px; line-height: 1.5; }
.gh-page .gh-row-link { display: flex; align-items: flex-start; padding: 12px; border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.2s; }
.gh-page .gh-row-link:hover { background: var(--warm-bg); }
.gh-page .gh-row-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0; margin-right: 12px; }
.gh-page .gh-fit { width: 100%; height: 100%; object-fit: cover; }
.gh-page .gh-row-title { font-size: 14px; font-weight: 700; color: var(--dark); margin: 0 0 4px; line-height: 1.3; transition: color 0.2s; }
.gh-page .gh-row-time { font-size: 12px; color: var(--gray-light); }

/* Browse by heat level */
.gh-page .gh-heat-row { display: flex; flex-wrap: wrap; gap: 12px; }
.gh-page .gh-heat-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.gh-page .gh-heat-name { font-weight: 700; }
.gh-page .gh-heat-range { font-size: 12px; opacity: 0.8; }
.gh-page .gh-heat--mild { background: #22c55e08; border-color: #22c55e30; color: var(--ktp-tier-mild); }
.gh-page .gh-heat--mild:hover { background: #22c55e15; }
.gh-page .gh-heat--medium { background: #eab30808; border-color: #eab30830; color: var(--ktp-tier-medium); }
.gh-page .gh-heat--medium:hover { background: #eab30815; }
.gh-page .gh-heat--hot { background: #f9731608; border-color: #f9731630; color: var(--ktp-tier-hot); }
.gh-page .gh-heat--hot:hover { background: #f9731615; }
.gh-page .gh-heat--extra-hot { background: #ef444408; border-color: #ef444430; color: var(--ktp-tier-extra-hot); }
.gh-page .gh-heat--extra-hot:hover { background: #ef444415; }
.gh-page .gh-heat--super-hot { background: #991b1b08; border-color: #991b1b30; color: var(--ktp-tier-super-hot); }
.gh-page .gh-heat--super-hot:hover { background: #991b1b15; }

/* Popular comparisons (the .vs-card family is styled in part 1) */
.gh-page .gh-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.gh-page .gh-vs-row { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.gh-page .gh-vs-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gray-border); }
.gh-page .gh-vs-fill { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gh-page .gh-vs-fill--a { background: #fef2f2; }
.gh-page .gh-vs-fill--b { background: #fff7ed; }
.gh-page .gh-vs-title { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--dark); margin: 0 0 8px; transition: color 0.2s; }
.gh-page .gh-vs-word { color: var(--gray-light); }
.gh-page .gh-vs-sub { font-size: 13px; color: var(--gray-light); margin: 0 0 16px; }
.gh-page .gh-vs-shu { display: flex; gap: 16px; font-size: 11px; font-family: var(--font-body); color: var(--gray-light); text-transform: uppercase; letter-spacing: 1px; }

/* What you'll learn */
.gh-page .gh-learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.gh-page .gh-learn-box { background: var(--white); border: 1px solid var(--gray-border); border-radius: 16px; padding: 28px; }
.gh-page .gh-learn-ico { margin-bottom: 16px; }
.gh-page .gh-learn-box--sci .gh-learn-ico { color: var(--red); }
.gh-page .gh-learn-box--kit .gh-learn-ico { color: var(--ktp-tier-hot); }
.gh-page .gh-learn-box--grow .gh-learn-ico { color: var(--ktp-tier-mild); }
.gh-page .gh-learn-title { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--dark); margin: 0 0 12px; }
.gh-page .gh-learn-text { font-size: 14px; color: var(--gray); line-height: 1.7; margin: 0; }
.gh-page .gh-learn-box--sci strong { color: #4a0404; }
.gh-page .gh-learn-box--kit strong { color: #9a3412; }
.gh-page .gh-learn-box--grow strong { color: #166534; }

/* Tools call to action */
.gh-page .gh-cta { background: linear-gradient(135deg, rgba(185,28,28,0.03), rgba(249,115,22,0.03)); border: 1px solid var(--gray-border); border-radius: 20px; padding: 32px 40px; position: relative; overflow: hidden; }
.gh-page .gh-cta__blob { position: absolute; width: 200px; height: 200px; pointer-events: none; }
.gh-page .gh-cta__blob--a { top: -60px; right: -60px; background: radial-gradient(circle, rgba(185,28,28,0.08), transparent 70%); }
.gh-page .gh-cta__blob--b { bottom: -60px; left: -60px; background: radial-gradient(circle, rgba(249,115,22,0.08), transparent 70%); }
.gh-page .gh-cta__row { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.gh-page .gh-cta__main { max-width: 500px; }
.gh-page .gh-cta__kick { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.gh-page .gh-cta__title { font-family: var(--font-heading); font-size: 24px; font-weight: 800; color: var(--dark); margin: 0 0 8px; }
.gh-page .gh-cta__text { font-size: 15px; color: var(--gray); margin: 0; line-height: 1.6; }
.gh-page .gh-cta__links { display: flex; gap: 12px; flex-wrap: wrap; }
.gh-page .gh-cta__btn { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--white); border: 1px solid var(--gray-border); border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--dark); text-decoration: none; transition: all 0.2s; }
.gh-page .gh-cta__btn:hover { border-color: var(--red); color: var(--red); }
.gh-page .gh-cta__btn--all { gap: 6px; color: var(--red); }
.gh-page .gh-cta__btn--all:hover { background: var(--red); border-color: var(--gray-border); color: white; }

/* FAQ */
.gh-page .gh-faq-kick { display: block; font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.gh-page .gh-faq { border-top: 1px solid var(--gray-border); border-bottom: 1px solid var(--gray-border); }
.gh-page .gh-faq__rule { border-bottom: 1px solid var(--gray-border); }
.gh-page .gh-faq__q { padding: 20px 0; font-weight: 600; color: var(--dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.gh-page .gh-faq__a { padding: 0 0 20px; font-size: 15px; color: var(--gray); line-height: 1.7; }
.gh-page .gh-faq__link { color: var(--red); font-weight: 600; }

/* Sources */
.gh-page .gh-src { background: rgba(59, 130, 246, 0.04); border: 1px solid #93c5fd; border-radius: 14px; padding: 24px 28px; }
.gh-page .gh-src__title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: #1e3a5f; margin: 0 0 10px; }
.gh-page .gh-src__text { font-size: 14px; color: #1e40af; line-height: 1.7; margin: 0; }
.gh-page .gh-src__link { color: #1e40af; font-weight: 600; border-bottom: 1px dashed #93c5fd; }

/* Legacy mobile layer of style.css, restated (it matched the old inline padding/gap values) */
@media (max-width: 768px) {
    .gh-page .gh-cta { padding: 20px; }
    .gh-page .gh-cta__row { gap: 14px; }
    .gh-page .gh-learn-box { padding: 18px; }
}

/* ---- Part 3: type that readability.css forced through [style*="font-size: Npx"] selectors ----
   Those attribute selectors stopped matching once the inline styles left the markup, so the values they
   produced are restated per class (--ktp-text-ui is the forced size, 19px). `!important` is used only on
   `p` and `button`, where an !important element rule in readability.css would otherwise win; the old
   effective value there came from an !important attribute rule that out-ranked it. */
.gh-page a.gh-pill,
.gh-page a.gh-cat-all,
.gh-page a.gh-cta__btn { font-size: 18px; line-height: 1.55; }
.gh-page div.gh-cta__kick,
.gh-page div.gh-faq__a,
.gh-page span.gh-faq-kick,
.gh-page span.gh-feat__chip,
.gh-page span.gh-heat-range,
.gh-page span.gh-hero-chip,
.gh-page span.gh-row-time { font-size: var(--ktp-text-ui); line-height: 1.62; }
.gh-page div.gh-vs-shu { line-height: 1.62; }
.gh-page h4.gh-row-title,
.gh-page h4.gh-src__title { font-size: var(--ktp-text-ui); line-height: 1.72; }
.gh-page p.gh-cat-blurb,
.gh-page p.gh-cta__text,
.gh-page p.gh-feat__text,
.gh-page p.gh-learn-text,
.gh-page p.gh-src__text,
.gh-page p.gh-sub { line-height: 1.62 !important; }
.gh-page button.gh-more-btn { font-size: var(--ktp-text-ui) !important; line-height: 1.62 !important; }
