:root {
    --hm-ink: #5a220f;
    --hm-ink-soft: #785847;
    --hm-heading: #742812;
    --hm-accent: #ba4a16;
    --hm-accent-strong: #d48e32;
    --hm-accent-soft: #f5e4cd;
    --hm-green: #2e8964;
    --hm-green-soft: #e3f3ea;
    --hm-surface: #fffdf9;
    --hm-surface-strong: #ffffff;
    --hm-surface-muted: #fbf5eb;
    --hm-line: #efd8b3;
    --hm-line-soft: #f3e7d6;
    --hm-shadow: 0 18px 44px rgba(119, 66, 23, 0.10);
}

.hm-page {
    color: var(--hm-ink);
    font-family: inherit;
    line-height: 1.7;
    padding-bottom: 40px;
}

.hm-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.hm-page .hm-shell + .hm-shell {
    margin-top: 18px;
}

.hm-hero-card,
.hm-filter-card,
.hm-rights-wrap,
.hm-help,
.hm-empty {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(244, 211, 134, 0.34), transparent 31%),
        linear-gradient(135deg, rgba(255, 250, 243, 0.98), rgba(255, 255, 255, 0.99));
    border: 1px solid var(--hm-line);
    border-radius: 30px;
    box-shadow: var(--hm-shadow);
}

.hm-hero-card,
.hm-filter-card,
.hm-rights-wrap,
.hm-help {
    padding: 28px;
}

.hm-hero-card::before,
.hm-filter-card::before,
.hm-rights-wrap::before,
.hm-help::before {
    content: "";
    display: block;
    width: 78px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--hm-accent), var(--hm-accent-strong));
    margin-bottom: 22px;
}

.hm-hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
}

.hm-hero-copy {
    min-width: 0;
    max-width: none;
}

.hm-hero-copy h1 {
    margin: 12px 0 10px;
    max-width: 100%;
    font-size: 30px;
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: var(--hm-heading);
}

.hm-hero-copy p {
    margin: 0;
    max-width: 100%;
    font-size: 14.25px;
    color: var(--hm-ink-soft);
}

.hm-eyebrow,
.hm-section-kicker,
.hm-search-label,
.hm-card-topline,
.hm-modal-header-badge,
.hm-modal-section h3,
.hm-legal h3,
.hm-documents h3 {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hm-eyebrow,
.hm-section-kicker,
.hm-search-label,
.hm-card-topline,
.hm-modal-header-badge {
    color: #b46c17;
}

.hm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.hm-btn:hover {
    transform: translateY(-2px);
}

.hm-btn-primary {
    background: linear-gradient(135deg, var(--hm-accent), var(--hm-accent-strong));
    color: #fff !important;
    box-shadow: 0 16px 26px rgba(186, 74, 22, 0.22);
}

.hm-btn-soft,
.hm-btn-outline {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--hm-line);
    color: var(--hm-heading) !important;
}

.hm-hero-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex: none;
    padding-top: 4px;
}

.hm-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(183, 133, 33, 0.14);
    background: linear-gradient(180deg, rgba(255, 250, 241, 0.92) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: var(--hm-heading);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.hm-filter-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.hm-filter-head h2 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.16;
    color: var(--hm-heading);
}

.hm-filter-head p {
    margin: 0;
    max-width: 720px;
    color: var(--hm-ink-soft);
    font-size: 15px;
}

.hm-filter-count {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--hm-line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--hm-heading);
    font-size: 15px;
    font-weight: 700;
}

.hm-search {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.hm-search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid var(--hm-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
}

.hm-search-field i {
    color: #c1842f;
    font-size: 15px;
}

.hm-search-field input {
    width: 100%;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hm-heading) !important;
    font-size: 15px !important;
}

.hm-search-field input::placeholder {
    color: #b39c87;
    opacity: 1;
}

.hm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hm-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--hm-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--hm-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.hm-chip:hover {
    transform: translateY(-2px);
}

.hm-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--hm-surface-muted);
    color: #a86a21;
    font-size: 11px;
    font-weight: 800;
}

.hm-chip.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--hm-accent), var(--hm-accent-strong));
    color: #fff;
    box-shadow: 0 14px 22px rgba(186, 74, 22, 0.18);
}

.hm-chip.is-active span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.hm-results-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--hm-line-soft);
    color: var(--hm-ink-soft);
    font-size: 14px;
}

.hm-results-meta span:last-child {
    font-weight: 700;
    color: var(--hm-heading);
}

.hm-rights-wrap {
    padding-bottom: 28px;
}

.hm-rights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 20px;
}

.hm-right-card {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 18px 20px 18px;
    border: 1px solid var(--hm-line);
    border-top: 4px solid #c66d12;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: 0 12px 24px rgba(113, 67, 33, 0.07);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.hm-right-card:hover {
    box-shadow: 0 18px 30px rgba(113, 67, 33, 0.11);
}

.hm-right-card[hidden] {
    display: none !important;
}

.hm-card-head {
    display: block;
    margin-bottom: 12px;
}

.hm-card-topline {
    margin-bottom: 0;
}

.hm-card-topline span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--hm-surface-muted);
}

.hm-right-card h3 {
    margin: 0 0 10px;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: var(--hm-heading);
}

.hm-right-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.72;
    color: var(--hm-ink-soft);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.hm-card-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    min-height: 44px;
    margin-top: 16px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hm-accent), var(--hm-accent-strong));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 22px rgba(186, 74, 22, 0.18);
}

.hm-empty {
    width: min(100%, 780px);
    margin: 24px auto 0;
    padding: 28px;
    text-align: center;
}

.hm-empty > i {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--hm-surface-muted);
    color: var(--hm-accent);
    font-size: 24px;
}

.hm-empty h3 {
    margin: 0 0 8px;
    font-size: 24px;
    color: var(--hm-heading);
}

.hm-empty p {
    margin: 0 0 18px;
    color: var(--hm-ink-soft);
}

.hm-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
}

.hm-help::before {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.hm-help-copy {
    grid-column: 1 / 2;
}

.hm-help .hm-btn {
    grid-column: 2 / 3;
    align-self: center;
}

.hm-help h2 {
    margin: 8px 0 8px;
    max-width: 620px;
    font-size: 28px;
    line-height: 1.16;
    color: var(--hm-heading);
}

.hm-help p {
    margin: 0;
    color: var(--hm-ink-soft);
    font-size: 14px;
    max-width: 680px;
}

.hm-modal[hidden] {
    display: none !important;
}

.hm-modal {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(54, 28, 10, 0.56);
    backdrop-filter: blur(3px);
}

.hm-modal-panel {
    position: relative;
    width: min(980px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.99), rgba(255, 255, 255, 0.99));
    box-shadow: 0 32px 90px rgba(55, 29, 11, 0.28);
}

.hm-modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #8f3412;
    box-shadow: 0 14px 30px rgba(75, 39, 14, 0.16);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.hm-modal-close span {
    display: block;
    margin-top: -2px;
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
}

.hm-modal-close:hover,
.hm-modal-close:focus-visible {
    background: #fff8f1;
    box-shadow: 0 18px 34px rgba(75, 39, 14, 0.22);
    transform: translateY(-1px);
}

.hm-modal-header {
    position: relative;
    padding: 30px 108px 28px 32px;
    background: linear-gradient(135deg, #9f3111, #d28c2f);
    color: #fff;
}

.hm-modal-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 248, 239, 0.96);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hm-modal-header h2 {
    margin: 16px 0 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.14;
    color: #fff;
}

.hm-modal-body {
    overflow: auto;
    padding: 28px 32px 24px;
}

.hm-modal-lead {
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid var(--hm-line);
    border-left: 5px solid var(--hm-accent);
    border-radius: 24px;
    background: rgba(255, 249, 241, 0.92);
    color: var(--hm-ink-soft);
    font-size: 15px;
    line-height: 1.75;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hm-content {
    color: var(--hm-ink-soft);
    font-size: 15px;
    line-height: 1.8;
}

.hm-content > *:first-child {
    margin-top: 0;
}

.hm-content > *:last-child {
    margin-bottom: 0;
}

.hm-content h3,
.hm-content h4 {
    margin: 22px 0 10px;
    color: var(--hm-heading);
}

.hm-content ul,
.hm-content ol {
    padding-left: 24px;
}

.hm-legal,
.hm-documents {
    margin-top: 24px;
    padding: 20px 22px;
    border: 1px solid var(--hm-line);
    border-radius: 24px;
    background: rgba(255, 251, 246, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hm-legal h3,
.hm-documents h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 12px;
    color: #b46c17;
}

.hm-legal p {
    margin: 0;
    color: var(--hm-ink-soft);
    font-size: 14px;
    line-height: 1.8;
}

.hm-document-list {
    display: grid;
    gap: 12px;
}

.hm-document {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid var(--hm-line-soft);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
}

.hm-document > i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(186, 74, 22, 0.08);
    color: #c4512e;
    font-size: 20px;
}

.hm-document strong {
    display: block;
    color: var(--hm-heading);
    font-size: 14px;
    line-height: 1.45;
}

.hm-document span {
    display: block;
    margin-top: 4px;
    color: var(--hm-ink-soft);
    font-size: 12px;
    line-height: 1.55;
}

.hm-document a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--hm-surface-muted);
    border: 1px solid var(--hm-line);
    color: var(--hm-heading);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.hm-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 32px 24px;
    border-top: 1px solid var(--hm-line-soft);
    background: rgba(255, 254, 251, 0.98);
}

body.hm-modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .hm-rights-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
}

@media (max-width: 900px) {
    .hm-shell {
        width: calc(100% - 28px);
    }

    .hm-hero-content {
        grid-template-columns: 1fr;
    }

    .hm-hero-pills {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-top: 0;
    }

    .hm-help {
        grid-template-columns: 1fr;
    }

    .hm-filter-head,
    .hm-results-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hm-rights-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .hm-help::before,
    .hm-help-copy,
    .hm-help .hm-btn {
        grid-column: auto;
    }

    .hm-right-card {
        padding: 18px;
    }

    .hm-modal-panel {
        border-radius: 26px;
    }

    .hm-modal-header h2 {
        max-width: calc(100% - 110px);
    }
}

@media (max-width: 640px) {
    .hm-page {
        padding-bottom: 28px;
    }

    .hm-hero-card,
    .hm-filter-card,
    .hm-rights-wrap,
    .hm-help,
    .hm-empty {
        border-radius: 24px;
    }

    .hm-hero-card,
    .hm-filter-card,
    .hm-rights-wrap,
    .hm-help {
        padding: 22px 18px;
    }

    .hm-hero-card::before,
    .hm-filter-card::before,
    .hm-rights-wrap::before,
    .hm-help::before {
        width: 64px;
        margin-bottom: 18px;
    }

    .hm-hero-copy h1,
    .hm-filter-head h2,
    .hm-help h2,
    .hm-empty h3 {
        font-size: 28px;
    }

    .hm-hero-copy p,
    .hm-filter-head p,
    .hm-help p,
    .hm-right-card p,
    .hm-content,
    .hm-modal-lead,
    .hm-legal p {
        font-size: 14px;
    }

    .hm-hero-pill {
        min-height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .hm-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hm-btn {
        width: 100%;
    }

    .hm-chip {
        white-space: nowrap;
    }

    .hm-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .hm-right-card h3 {
        font-size: 22px;
    }

    .hm-modal {
        padding: 10px;
    }

    .hm-modal-panel {
        max-height: calc(100vh - 20px);
        border-radius: 24px;
    }

    .hm-modal-close {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .hm-modal-close span {
        font-size: 30px;
    }

    .hm-modal-header {
        padding: 22px 78px 24px 20px;
    }

    .hm-modal-category {
        max-width: 100%;
    }

    .hm-modal-header h2 {
        margin-top: 14px;
        font-size: 26px;
    }

    .hm-modal-body {
        padding: 20px;
    }

    .hm-document {
        grid-template-columns: auto 1fr;
        align-items: flex-start;
    }

    .hm-document a {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .hm-modal-footer {
        flex-direction: column-reverse;
        padding: 16px 20px 20px;
    }

    .hm-modal-footer .hm-btn,
    .hm-modal-footer a.hm-btn {
        width: 100%;
    }
}
