.hf-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2rem 0 4rem 1rem;
}

.hf-hero,
.hf-filters-card,
.hf-print-screen-card,
.hf-card,
.hf-print-sheet {
    background: #fff;
    border: 1px solid rgba(32, 65, 120, 0.10);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(20, 41, 74, 0.08);
}

.hf-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f8ff 0%, #ffffff 60%, #eef5ff 100%);
    margin: 0 1rem 1.5rem 0;
}

.hf-eyebrow,
.hf-section-kicker,
.hf-card__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f79c7;
}

.hf-hero h1,
.hf-print-screen-card h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    color: #183153;
}

.hf-hero__text,
.hf-print-subtitle {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #4f617d;
    max-width: 62ch;
}

.hf-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.hf-hero__chips span,
.hf-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #edf3ff;
    color: #274d84;
    font-weight: 600;
    font-size: 0.92rem;
}

.hf-sidebar-card {
    height: 100%;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(32, 65, 120, 0.08);
}

.hf-sidebar-card h2,
.hf-section-heading h2,
.hf-results-heading h2,
.hf-shopping-list__header h2,
.hf-print-title {
    margin: 0 0 0.75rem;
    color: #183153;
}

.hf-sidebar-card ol {
    margin: 0;
    padding-left: 1.25rem;
    color: #4f617d;
    line-height: 1.7;
}

.hf-filters-wrap {
    margin-right: 1rem;
}

.hf-filters-card,
.hf-print-screen-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.hf-section-heading,
.hf-results-heading,
.hf-shopping-list__header,
.hf-print-screen-actions,
.hf-shopping-list__actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.hf-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.hf-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    color: #1f3454;
}

.hf-field select {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid #c9d8f1;
    background: #f8fbff;
    padding: 0.85rem 0.95rem;
    font-size: 1rem;
    color: #183153;
}

.hf-field select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hf-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hf-primary-btn,
.hf-secondary-btn,
.hf-ghost-btn,
.hf-page-btn,
.hf-add-btn,
.hf-link-btn,
.hf-remove-btn,
.hf-secondary-btn--link {
    appearance: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    font-weight: 700;
    text-decoration: none;
}

.hf-primary-btn,
.hf-secondary-btn,
.hf-secondary-btn--link,
.hf-ghost-btn,
.hf-page-btn {
    min-height: 48px;
    padding: 0.85rem 1.1rem;
}

.hf-primary-btn {
    background: linear-gradient(135deg, #2f66bf 0%, #234b8d 100%);
    color: #fff;
    border: 1px solid #2f66bf;
    box-shadow: 0 12px 25px rgba(35, 75, 141, 0.18);
}

.hf-secondary-btn,
.hf-secondary-btn--link {
    background: #fff;
    color: #234b8d;
    border: 1px solid #c9d8f1;
}

.hf-ghost-btn,
.hf-link-btn {
    background: transparent;
    color: #234b8d;
    border: 0;
}

.hf-add-btn,
.hf-remove-btn {
    padding: 0.7rem 0.95rem;
    min-height: 42px;
    border: 1px solid transparent;
}

.hf-add-btn {
    background: #fff;
    color: #1f7a34;
    border-color: #bcdcc4;
}

.hf-add-btn.is-added {
    background: #fff5f3;
    color: #b64534;
    border-color: #d96b59;
}

.hf-remove-btn {
    background: #fff5f3;
    color: #b64534;
    border-color: #d96b59;
}

.hf-primary-btn:hover,
.hf-secondary-btn:hover,
.hf-ghost-btn:hover,
.hf-page-btn:hover,
.hf-add-btn:hover,
.hf-remove-btn:hover,
.hf-secondary-btn--link:hover {
    transform: translateY(-1px);
}

.hf-results-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 24px;
    align-items: start;
    width: 100%;
    padding-right: 0;
    margin-right: 0;
}

.hf-results-shell.is-panel-open {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.hf-results-main {
    min-width: 0;
    width: 100%;
    transition: width 0.28s ease, max-width 0.28s ease, transform 0.28s ease;
    padding-right: 0;
}

.hf-results-heading {
    margin-bottom: 1rem;
}

.hf-results-count {
    margin: 0;
    color: #55708f;
    font-weight: 600;
}

.hf-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
}

.hf-card {
    padding: 1.35rem;
    width: 100%;
    max-width: none;
}

.hf-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hf-card__title {
    margin: 0;
    font-size: 1.65rem;
    color: #183153;
}

.hf-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    width: 100%;
}

.hf-info-box {
    min-width: 0;
    padding: 1rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #deebff;
}

.hf-info-box--wide {
    grid-column: 1 / -1;
}

.hf-info-box h4,
.hf-card__footer-meta p,
.hf-shopping-item h3,
.hf-print-group h3 {
    margin: 0 0 0.5rem;
    color: #111111;
}

.hf-info-box p,
.hf-card__footer-meta p,
.hf-shopping-item p,
.hf-print-list,
.hf-empty-state p,
.hf-empty-small,
.hf-loading {
    margin: 0;
    color: #333333;
    line-height: 1.65;
}

.hf-card__footer-meta {
    margin-top: 1rem;
    display: grid;
    gap: 0.45rem;
}

.hf-empty-state,
.hf-loading {
    padding: 2rem;
    text-align: center;
    border-radius: 24px;
    background: #fff;
    border: 1px dashed #c9d8f1;
}

.hf-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hf-page-btn {
    background: #fff;
    border: 1px solid #cad7ea;
    color: #234b8d;
}

.hf-page-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.hf-pagination__status {
    color: #4f617d;
    font-weight: 700;
}

.hf-shopping-list {
    position: sticky;
    top: 120px;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    overflow: hidden;
    justify-self: end;
    margin-right: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #2f66bf;
    border-right: 0;
    border-radius: 24px 0 0 24px;
    box-shadow: 0 18px 40px rgba(25, 52, 95, 0.10);
    color: #111111;
    transition: width 0.28s ease, min-width 0.28s ease, max-width 0.28s ease;
}

.hf-shopping-list:not(.is-collapsed) {
    width: 360px;
    min-width: 360px;
    max-width: 360px;
}

.hf-shopping-toggle {
    width: 72px;
    min-height: 520px;
    border: 0;
    background: #ffffff;
    color: #111111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    padding: 18px 10px;
}

.hf-shopping-toggle__arrow {
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: #234b8d;
}

.hf-shopping-toggle__label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    color: #111111;
}

.hf-shopping-list__inner {
    display: none;
    padding: 24px 20px 24px 20px;
    height: 100%;
    background: #ffffff;
    color: #111111;
}

.hf-shopping-list:not(.is-collapsed) .hf-shopping-list__inner {
    display: block;
}

.hf-shopping-list:not(.is-collapsed) .hf-shopping-toggle {
    min-height: 0;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 18px 20px 0 20px;
    gap: 10px;
    background: #ffffff;
    color: #111111;
    border-bottom: 1px solid #d8e5f7;
}

.hf-shopping-list:not(.is-collapsed) .hf-shopping-toggle__label {
    writing-mode: initial;
    transform: none;
    letter-spacing: 0.02em;
}

.hf-shopping-list__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.hf-shopping-list__header h2,
.hf-shopping-list__header .hf-section-kicker,
.hf-shopping-item h3,
.hf-shopping-item p,
.hf-shopping-item__meta {
    color: #111111;
}

.hf-shopping-list__items {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.hf-shopping-list__items::-webkit-scrollbar {
    width: 10px;
}

.hf-shopping-list__items::-webkit-scrollbar-track {
    background: #edf3ff;
    border-radius: 999px;
}

.hf-shopping-list__items::-webkit-scrollbar-thumb {
    background: #b8cbee;
    border-radius: 999px;
    border: 2px solid #edf3ff;
}

.hf-shopping-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #c9d8f1;
}

.hf-shopping-item__meta {
    font-size: 0.92rem;
    color: #333333;
}

.hf-empty-small {
    padding: 1rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px dashed #c9d8f1;
    color: #333333;
}

.hf-shopping-list .hf-link-btn {
    color: #234b8d;
}

.hf-shopping-list .hf-primary-btn {
    width: 100%;
}

.hf-shopping-list__actions {
    margin-bottom: 0.75rem;
}

.hf-shopping-list__actions--bottom {
    margin-top: 0.75rem;
}

.hf-print-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.hf-print-sheet {
    padding: 2rem;
    background: #fff;
}

.hf-print-sheet__header {
    min-height: 72px;
    display: flex;
    align-items: flex-start;
}

.hf-print-logo {
    max-width: 160px;
    width: 100%;
    height: auto;
}

.hf-print-title {
    font-size: 2rem;
}

.hf-print-group {
    margin-top: 1.5rem;
}

.hf-print-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.hf-print-list li {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid #deebff;
    background: #f8fbff;
}

.hf-print-item-name {
    display: block;
    font-weight: 700;
    color: #183153;
    margin-bottom: 0.15rem;
}

.hf-print-item-meta {
    display: inline-block;
    margin-right: 1rem;
    color: #4f617d;
    font-size: 0.95rem;
}

.hf-print-sheet__footer {
    margin-top: 2.5rem;
    text-align: center;
    font-weight: 700;
    color: #234b8d;
}

@media (max-width: 1200px) {
    .hf-results-shell {
        grid-template-columns: minmax(0, 1fr) 64px;
        gap: 18px;
    }

    .hf-results-shell.is-panel-open {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .hf-shopping-list {
        width: 64px;
        min-width: 64px;
        max-width: 64px;
    }

    .hf-shopping-list:not(.is-collapsed) {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }

    .hf-shopping-toggle {
        width: 64px;
    }
}

@media (max-width: 900px) {
    .hf-page {
        padding: 2rem 0.75rem 4rem;
    }

    .hf-hero,
    .hf-filters-wrap {
        margin-right: 0;
    }

    .hf-hero,
    .hf-filter-grid,
    .hf-card__meta-grid,
    .hf-results-shell,
    .hf-results-shell.is-panel-open {
        grid-template-columns: 1fr;
    }

    .hf-info-box--wide {
        grid-column: span 1;
    }

    .hf-shopping-list,
    .hf-shopping-list.is-collapsed,
    .hf-shopping-list:not(.is-collapsed) {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: none;
        border-radius: 24px;
        border-right: 1px solid #2f66bf;
    }

    .hf-shopping-toggle,
    .hf-shopping-list:not(.is-collapsed) .hf-shopping-toggle {
        width: 100%;
        min-height: 0;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 16px 18px;
        gap: 10px;
    }

    .hf-shopping-toggle__label,
    .hf-shopping-list:not(.is-collapsed) .hf-shopping-toggle__label {
        writing-mode: initial;
        transform: none;
        letter-spacing: 0.02em;
    }

    .hf-shopping-list__inner {
        padding: 18px;
    }

    .hf-shopping-list__items {
        max-height: 360px;
    }
}

@media (max-width: 640px) {
    .hf-card__head,
    .hf-shopping-item,
    .hf-print-screen-actions {
        flex-direction: column;
    }

    .hf-actions-row,
    .hf-primary-btn,
    .hf-secondary-btn,
    .hf-secondary-btn--link {
        width: 100%;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .hf-print-sheet,
    .hf-print-sheet * {
        visibility: visible;
    }

    .hf-print-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: 0;
        padding: 0.2in 0.35in 0.55in;
    }

    .hf-print-sheet__header {
        margin-bottom: 0.2in;
    }

    .hf-print-sheet__footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0.12in;
        font-size: 10pt;
        color: #1c3761;
    }

    .hf-print-group,
    .hf-print-list li {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}