/*
 * HoseSeek action-first hierarchy.
 * The first viewport is for finding a hose, choosing a machine, or recognizing a
 * brand. Long-form explanation remains lower on the page for readers and search.
 */

/* Directory pages: retain a compact H1, remove the sales-like preamble. */
.xhse .xhse__hero--directory {
    margin: 0;
    padding: 4px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.xhse__hero--directory .xhse__eyebrow,
.xhse__hero--directory .xhse__lead {
    display: none;
}

.xhse__hero--directory h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

/* Turn the second large card into one compact working row. */
.xhse-lookup {
    grid-template-columns: minmax(120px, .27fr) minmax(420px, 1.73fr);
    column-gap: 16px;
    margin-top: 6px;
    padding: 11px 13px;
    border-color: #c7d6e8;
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(19, 48, 88, .06);
}

.xhse-lookup__copy .xhse__eyebrow,
.xhse-lookup__copy > p:last-child,
.xhse-lookup__hint {
    display: none;
}

.xhse-lookup__copy h2 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.xhse-lookup__form input,
.xhse-lookup__form button {
    min-height: 46px;
}

.xhse-lookup__form button {
    padding-inline: 20px;
}

/* Counts are secondary. The brand/model controls should occupy this space. */
.xhse__hero--directory + .xhse-lookup + .xhse__coverage {
    display: none;
}

.xhse__section--brand-picker {
    margin-top: 16px;
}

.xhse__section--brand-picker .xhse__section-head {
    margin-bottom: 10px;
}

.xhse__section--brand-picker .xhse__section-head .xhse__eyebrow {
    display: none;
}

.xhse__section--brand-picker .xhse__section-head h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.xhse__section--brand-picker .xhse__entity-link--brand {
    min-height: 86px;
    padding-block: 7px;
}

.xhse__section--brand-picker .xhse__brand-logo {
    height: 43px;
}

.xhse__section--brand-picker .xhse__brand-logo img {
    max-height: 41px;
}

/*
 * Brand pages already have a known brand context. Repeating the global search in
 * a large card delays the useful next action, which is choosing the machine.
 */
body.hoseseek-brand-directory .xhse-lookup {
    display: none;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section {
    margin-top: 12px;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__section-head {
    margin-bottom: 10px;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__section-head .xhse__eyebrow {
    display: none;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__section-head h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__entity-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 8px;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__entity-link {
    min-height: 48px;
    padding: 9px 12px;
    border-radius: 10px;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__entity-link strong {
    font-size: .9rem;
    line-height: 1.2;
}

body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__entity-link > span {
    display: none;
}

/* The notebook-backed model collection is another chooser, not a marketing card. */
body.hoseseek-brand-directory .xpme__handwritten-directory {
    gap: 0;
    margin-block: 18px 0;
    padding: 14px;
    border-radius: 12px;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__section-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__section-head h2 {
    order: -1;
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__section-head p {
    margin: 0;
    font-size: .68rem;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__handwritten-intro {
    display: none;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-card {
    position: relative;
    min-height: 48px;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 10px;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-card > p,
body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-link {
    display: none;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-card h3 {
    margin: 0;
    font-size: .9rem;
    line-height: 1.2;
}

body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-card h3 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

/* Machine and system pages: the known context is the title, so expose the next action. */
body.hoseseek-machine-page .xhse__hero--directory + .xhse__coverage {
    display: none;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section {
    margin-top: 12px;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__section-head {
    margin-bottom: 9px;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__section-head .xhse__eyebrow {
    display: none;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__section-head h2 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__entity-grid--systems {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 8px;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__entity-link--system {
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__entity-link--system .xhse__system-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__entity-link--system .xhse__system-icon svg {
    width: 22px;
    height: 22px;
}

body.hoseseek-machine-page .xhse-context-filter {
    grid-template-columns: minmax(160px, .35fr) minmax(360px, 1.65fr);
    gap: 10px 16px;
    margin-top: 10px;
    padding: 10px 12px;
    border-width: 1px;
    border-radius: 12px;
}

body.hoseseek-machine-page .xhse-context-filter__copy .xhse__eyebrow,
body.hoseseek-machine-page .xhse-context-filter__copy > p:last-child {
    display: none;
}

body.hoseseek-machine-page .xhse-context-filter__copy h2 {
    font-size: 1.05rem;
}

body.hoseseek-machine-page .xhse-context-filter__input input,
body.hoseseek-machine-page .xhse-context-filter__input button {
    min-height: 44px;
}

body.hoseseek-system-page .xhse__coverage + .xhse-context-filter {
    margin-top: 8px;
}

body.hoseseek-system-page .xhse-context-filter + .xhse__section {
    margin-top: 16px;
}

/* Handwritten-only model pages should show the actual notebook image immediately. */
body.hoseseek-model-page .xpme--handwritten-only {
    gap: 0;
}

body.hoseseek-model-page .xpme--handwritten-only .xpme__hero {
    padding: 4px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.hoseseek-model-page .xpme--handwritten-only .xpme__hero .xpme__eyebrow,
body.hoseseek-model-page .xpme--handwritten-only .xpme__hero .xpme__lead,
body.hoseseek-model-page .xpme--handwritten-only .xhse-lookup {
    display: none;
}

body.hoseseek-model-page .xpme--handwritten-only .xpme__hero h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

/* Notebook sections are evidence viewers; their image is the primary control. */
body.hoseseek-machine-page .xpme__handwritten {
    gap: 0;
    margin-block: 14px 0;
    padding: 12px;
    border-radius: 12px;
}

body.hoseseek-machine-page .xpme__handwritten .xpme__section-head {
    margin-bottom: 8px;
}

body.hoseseek-machine-page .xpme__handwritten .xpme__section-head > p,
body.hoseseek-machine-page .xpme__handwritten .xpme__handwritten-intro {
    display: none;
}

body.hoseseek-machine-page .xpme__handwritten .xpme__section-head h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
}

body.hoseseek-machine-page .xpme__handwritten .xpme__handwritten-pages {
    margin-top: 8px;
}

body.hoseseek-machine-page .xhse__model-diagrams {
    margin-top: 18px;
}

/* Hose records: keep the part number and length, but bring the installation image up. */
body.hoseseek-hose-page .xhse__hero--record {
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 9px 24px rgba(19, 48, 88, .06);
}

body.hoseseek-hose-page .xhse__hero--record .xhse__eyebrow {
    display: none;
}

body.hoseseek-hose-page .xhse__hero--record h1 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

body.hoseseek-hose-page .xhse__hero--record .xhse__lead {
    margin-top: 5px;
    font-size: .92rem;
}

body.hoseseek-hose-page .xhse__primary-length {
    min-width: 150px;
    padding: 11px 14px;
}

body.hoseseek-hose-page .xhse__primary-length strong {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

body.hoseseek-hose-page .xunl-installation-diagram {
    margin-top: 14px;
}

body.hoseseek-hose-page .xunl-installation-diagram .xhse__section-head {
    margin-bottom: 10px;
}

body.hoseseek-hose-page .xunl-installation-diagram .xhse__section-head .xhse__eyebrow {
    margin-bottom: 3px;
}

body.hoseseek-hose-page .xunl-installation-diagram .xhse__section-head h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

body.hoseseek-hose-page .xunl-installation-diagram .xhse__section-head > p:last-child {
    margin-top: 5px;
    font-size: .88rem;
}

/* The dedicated search page should start with the search control, not two explanations. */
body.hoseseek-search-page .xhse__hero--directory {
    padding-bottom: 5px;
}

body.hoseseek-search-page .xhse-search__message {
    margin-top: 14px;
}

/* Manuals: one compact page title, then the actual filters. */
body.hoseseek-manuals-page.ast-plain-container.ast-no-sidebar #primary {
    margin-top: 24px;
}

body.hoseseek-manuals-page .entry-header {
    margin-bottom: 8px;
}

body.hoseseek-manuals-page .entry-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.7vw, 1.9rem);
}

body.hoseseek-manuals-page .xml__eyebrow,
body.hoseseek-manuals-page .xml__intro > p:last-child {
    display: none;
}

body.hoseseek-manuals-page .xml__intro h2 {
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

body.hoseseek-manuals-page .xml__form {
    margin-top: 12px;
}

/* Tool pages are themselves the action: compact the orange banner and show tools/forms. */
.xunl-repair-tools-page .xrt {
    padding-top: 18px;
}

.xunl-repair-tools-page .xrt-hero,
.xunl-repair-tools-page .xrt-hero--compact {
    padding: 18px 22px;
    border-radius: 16px;
    box-shadow: 0 9px 25px rgba(139, 55, 7, .14);
}

.xunl-repair-tools-page .xrt-hero h1 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.xunl-repair-tools-page .xrt-hero p:last-child {
    margin-top: 7px;
    font-size: .92rem;
    line-height: 1.5;
}

.xunl-repair-tools-page .xrt-section {
    margin-top: 18px;
}

.xunl-repair-tools-page .xrt-section__head {
    margin-bottom: 10px;
}

.xunl-repair-tools-page .xrt-card {
    min-height: 132px;
    gap: 11px;
    padding: 16px;
    border-radius: 14px;
}

.xunl-repair-tools-page .xrt-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

.xunl-repair-tools-page .xrt-card__icon .xrt__icon {
    width: 25px;
    height: 25px;
}

/* Reading pages still need a title, but not a billboard before the first answer. */
.xunl-repair-guides-page .xrg {
    padding-top: 18px;
}

.xunl-repair-guides-page .xrg-breadcrumb {
    margin-bottom: 10px;
}

.xunl-repair-guides-page .xrg-hero {
    gap: 16px;
    margin-bottom: 14px;
    padding: 18px 22px;
    border-radius: 16px;
    box-shadow: 0 9px 25px rgba(19, 42, 71, .13);
}

.xunl-repair-guides-page .xrg-hero h1 {
    margin-bottom: 6px;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

.xunl-repair-guides-page .xrg-hero p:last-child {
    font-size: .92rem;
    line-height: 1.5;
}

.xunl-repair-guides-page .xrg-hero__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.xunl-repair-guides-page .xrg-hero__icon svg {
    width: 40px;
    height: 40px;
}

/* Homepage: reduce theme whitespace and make the search a horizontal tool. */
body.home.ast-plain-container.ast-no-sidebar #primary {
    margin-top: 22px;
    margin-bottom: 24px;
}

body.home .entry-header {
    margin-bottom: 9px;
}

body.home .entry-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

body.home .xhc--simple .xhc__form--simple {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 18px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(20, 48, 86, .07);
}

body.home .xhc__form-head--compact {
    margin: 0;
    white-space: nowrap;
}

body.home .xhc__form-head--compact .xhc__title {
    font-size: 1.05rem;
}

body.home .xhc__form-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

body.home .xhc--simple .xhc__quick-search--primary input,
body.home .xhc--simple .xhc__quick-search--primary .xhc__button {
    min-height: 48px;
}

body.home .xhc__search-hint {
    display: none;
}

body.home .xhse-machine-launcher {
    margin: 10px 0 8px;
    padding: 11px 12px 12px;
    border-radius: 15px;
}

body.home .xhse-machine-launcher > header {
    margin-bottom: 8px;
}

body.home .xhse-machine-launcher > header h2 {
    font-size: 1.05rem;
}

body.home .xhse-machine-launcher__card {
    min-height: 105px;
    grid-template-rows: 64px auto;
    padding: 5px 7px 7px;
    border-radius: 12px;
}

body.home .xhse-machine-launcher__art {
    height: 64px;
    border-radius: 9px;
}

body.home .xhse-machine-launcher__art img {
    height: 61px;
}

body.home .xhse-machine-launcher__copy strong {
    font-size: .76rem;
}

@media (max-width: 900px) {
    .xhse-lookup {
        grid-template-columns: 1fr;
    }

    .xhse-lookup__copy {
        display: none;
    }

    .xhse-lookup__form {
        margin-top: 0;
    }

    body.home .xhc--simple .xhc__form--simple {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body.hoseseek-machine-page .xhse-context-filter {
        grid-template-columns: 1fr;
    }

    body.hoseseek-machine-page .xhse-context-filter__copy {
        display: none;
    }
}

@media (max-width: 620px) {
    body.home.ast-plain-container.ast-no-sidebar #primary {
        margin-top: 12px;
    }

    body.home .entry-header {
        margin-bottom: 7px;
    }

    body.home .entry-title {
        font-size: 1.4rem;
    }

    body.home .xhc--simple .xhc__form--simple {
        padding: 10px;
    }

    body.home .xhc__form-icon {
        display: none;
    }

    body.home .xhc__form-head--compact {
        margin-bottom: 0;
    }

    body.home .xhc__quick-search--primary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.home .xhc--simple .xhc__quick-search--primary .xhc__button {
        width: auto;
        padding-inline: 16px;
    }

    .xhse .xhse__hero--directory {
        padding-top: 0;
    }

    .xhse__hero--directory h1 {
        font-size: 1.45rem;
    }

    .xhse-lookup {
        padding: 9px;
    }

    .xhse-lookup__form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .xhse-lookup__form button {
        width: auto;
        padding-inline: 15px;
    }

    .xhse__section--brand-picker {
        margin-top: 12px;
    }

    .xhse__section--brand-picker .xhse__entity-link--brand {
        min-height: 76px;
    }

    body.hoseseek-brand-directory .xhse__coverage + .xhse__section .xhse__entity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    body.hoseseek-brand-directory .xpme__handwritten-directory .xpme__model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.hoseseek-model-page .xhse__coverage + .xhse__section .xhse__entity-grid--systems {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.hoseseek-hose-page .xhse__hero--record {
        padding: 12px 14px;
    }

    body.hoseseek-hose-page .xhse__primary-length {
        min-width: 0;
    }

    .xunl-repair-tools-page .xrt,
    .xunl-repair-guides-page .xrg {
        padding-top: 12px;
    }

    .xunl-repair-tools-page .xrt-hero,
    .xunl-repair-tools-page .xrt-hero--compact,
    .xunl-repair-guides-page .xrg-hero {
        padding: 15px 16px;
        border-radius: 13px;
    }
}
