/**
 * MDH Malaysian National & State Fatwa Hub Stylesheet (Schema v3.1.0)
 *
 * Mobile-first Soft-Clay design system inheriting MDH theme surfaces,
 * Google Sans + Newsreader + Noto Sans Arabic typography, and 4-edge native-app UX.
 */

.fh-root,
.fh-single-shell {
    width: 100%;
    max-width: 100%;
    font-family: 'Google Sans', 'Plus Jakarta Sans', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #26312C;
    padding-bottom: 5.5rem;
    box-sizing: border-box;
}

.fh-hidden {
    display: none !important;
}

.fh-mono,
.fh-cid-chip,
.fh-sha-hash,
.fh-kbd-hint {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   1. AUTHORITY HERO, SEARCH & SEGMENTED TABS
   ========================================================================== */

.fh-hero-card {
    padding: 1.15rem 1.15rem 1rem;
    margin-bottom: 1rem;
    position: relative;
}

@media (min-width: 640px) {
    .fh-hero-card {
        padding: 1.65rem 1.85rem 1.35rem;
        margin-bottom: 1.25rem;
    }
}

.fh-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fh-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #62706A;
    margin-bottom: 0.65rem;
}

.fh-breadcrumbs a {
    color: #4E7D6B;
    font-weight: 600;
    text-decoration: none;
}

.fh-breadcrumbs a:hover {
    text-decoration: underline;
}

.fh- breadcrumbs i,
.fh-breadcrumbs i {
    font-size: 0.65rem;
    opacity: 0.65;
}

.fh-bc-current {
    font-weight: 700;
    color: #26312C;
}

.fh-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.fh-authority-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(91, 140, 122, 0.14);
    color: #2F5647;
    border: 1px solid rgba(91, 140, 122, 0.24);
}

.fh-kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.68rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.92);
    color: #46534D;
}

.fh-kpi-emerald {
    background: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.fh-hero-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.18;
    color: #1E2823;
    margin: 0 0 0.4rem;
    letter-spacing: -0.015em;
}

.fh-hero-desc {
    font-size: 0.84rem;
    line-height: 1.58;
    color: #516059;
    max-width: 76ch;
    margin: 0;
}

.fh-admin-gear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2F3C36;
    text-decoration: none;
    flex-shrink: 0;
}

/* Search Bar + Gazetted Quick Toggle */
.fh-search-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .fh-search-row {
        flex-direction: row;
        align-items: center;
    }
}

.fh-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(91, 140, 122, 0.22);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fh-search-box:focus-within {
    border-color: #5B8C7A;
    box-shadow: 0 0 0 3px rgba(91, 140, 122, 0.16), inset 0 1px 2px rgba(0, 0, 0, 0.03);
    background: #FFFFFF;
}

.fh-search-icon {
    font-size: 1.1rem;
    color: #4E7D6B;
    flex-shrink: 0;
}

#fh-search-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1E2823;
    padding: 0.2rem 0;
}

#fh-search-input::placeholder {
    color: #7D8B84;
    font-weight: 400;
}

.fh-search-clear {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    border: 0;
    background: rgba(42, 50, 46, 0.08);
    color: #394540;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.fh-kbd-hint {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 7px;
    background: rgba(42, 50, 46, 0.06);
    color: #65746D;
    border: 1px solid rgba(42, 50, 46, 0.1);
}

.fh-quick-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .fh-quick-toggles {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
}

.fh-gazetted-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.85rem;
    min-height: 42px;
    border-radius: 16px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4EFE7 100%);
    color: #26312C;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(42, 50, 46, 0.06), inset 0 1.5px 0 #FFFFFF;
    transition: transform 0.16s cubic-bezier(0.32, 0.72, 0, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.fh-gazetted-toggle:active {
    transform: scale(0.96);
}

.fh-gazetted-toggle i {
    color: #059669;
    font-size: 0.92rem;
    flex-shrink: 0;
}

.fh-gazetted-toggle.fh-pdf-toggle i {
    color: #DC2626;
}

.fh-gazetted-toggle.is-active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 18px -4px rgba(5, 150, 105, 0.42);
}

.fh-gazetted-toggle.fh-pdf-toggle.is-active {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 18px -4px rgba(185, 28, 28, 0.4);
}

.fh-gazetted-toggle.is-active i,
.fh-gazetted-toggle.fh-pdf-toggle.is-active i {
    color: #FFFFFF;
}

.fh-pill-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.67rem;
    padding: 0.1rem 0.42rem;
    border-radius: 9999px;
    background: rgba(42, 50, 46, 0.08);
}

.fh-gazetted-toggle.is-active .fh-pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

/* Segmented Tabs Bar (Edge-to-Edge Swipeable Native Pill Rail on Mobile) */
.fh-tabs-rail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.85rem;
    padding: 0.3rem;
    border-radius: 18px;
    background: var(--surface-well);
    border: 1px solid rgba(42, 50, 46, 0.05);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.fh-tabs-rail::-webkit-scrollbar {
    display: none;
}

.fh-seg-tab {
    flex: 1 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    min-height: 40px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #4A5851;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}

.fh-seg-tab:active {
    transform: scale(0.96);
}

.fh-seg-tab:hover {
    color: #1E2823;
    background: rgba(255, 255, 255, 0.45);
}

.fh-seg-tab.is-active {
    background: linear-gradient(135deg, #5B8C7A 0%, #446E5E 100%);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 6px 16px -4px rgba(68, 110, 94, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.fh-seg-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 0.08rem 0.42rem;
    border-radius: 9999px;
    background: rgba(42, 50, 46, 0.08);
    color: #4A5851;
}

.fh-seg-tab.is-active .fh-seg-count {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

/* Contextual Sub-Type Strip (Preserves All 18 Official Content Types) */
.fh-subtype-strip {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(42, 50, 46, 0.09);
}

.fh-subtype-chip {
    cursor: pointer;
    font-size: 0.73rem;
    padding: 0.42rem 0.78rem;
    min-height: 34px;
    background: rgba(255, 255, 255, 0.78);
}

.fh-subtype-chip i {
    color: #4E7D6B;
    font-size: 0.86rem;
}

.fh-subtype-chip.is-active {
    background: linear-gradient(135deg, #2F5647 0%, #1F3B30 100%);
    color: #FFFFFF;
    box-shadow: 0 5px 12px -3px rgba(31, 59, 48, 0.38);
}

.fh-subtype-chip.is-active i {
    color: #A7F3D0;
}

/* Quick Filter Command Bar Under Search (Negeri · Jenis Fatwa · Kategori · Sub-Kategori · Tahun) */
.fh-quick-dropdowns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
    margin-top: 0.75rem;
    padding-top: 0.72rem;
    border-top: 1px dashed rgba(42, 50, 46, 0.1);
    align-items: center;
}

.fh-qd-cell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    min-height: 40px;
    padding: 0 0.65rem 0 0.72rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 249, 246, 0.9) 100%);
    border: 1px solid rgba(91, 140, 122, 0.22);
    box-shadow: 0 2px 8px rgba(42, 50, 46, 0.04), inset 0 1px 0 #FFFFFF;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.fh-qd-cell:hover:not(.is-disabled) {
    background: #FFFFFF;
    border-color: rgba(91, 140, 122, 0.48);
    box-shadow: 0 4px 12px rgba(42, 50, 46, 0.07);
}

.fh-qd-cell:focus-within:not(.is-disabled) {
    border-color: #4E7D6B;
    box-shadow: 0 0 0 3px rgba(91, 140, 122, 0.16);
}

.fh-qd-cell:has(.fh-qd-select.is-selected) {
    background: linear-gradient(180deg, #ECFDF5 0%, #D6F3E4 100%);
    border-color: #3D7A62;
    box-shadow: 0 4px 12px -3px rgba(38, 79, 63, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.fh-qd-ico {
    position: static;
    flex-shrink: 0;
    font-size: 0.92rem;
    color: #4E7D6B;
    pointer-events: none;
}

.fh-qd-cell:has(.fh-qd-select.is-selected) .fh-qd-ico {
    color: #065F46;
}

.fh-qd-cell::after {
    content: '';
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%234A5851'%3E%3Cpath d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
    opacity: 0.75;
}

.fh-qd-cell:has(.fh-qd-select.is-selected)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23065F46'%3E%3Cpath d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
    opacity: 1;
}

.fh-qd-cell .fh-qd-select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0.42rem 0.25rem 0.42rem 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 0.77rem;
    font-weight: 600;
    color: #24302A;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.fh-qd-cell .fh-qd-select option {
    background-color: #FFFFFF;
    color: #1E2823;
    font-weight: 500;
}

.fh-qd-cell .fh-qd-select.is-selected {
    color: #13382A;
    font-weight: 700;
}

.fh-qd-cell.is-disabled {
    opacity: 0.56;
    background: rgba(232, 238, 234, 0.72);
    border-color: rgba(42, 50, 46, 0.12);
    box-shadow: none;
}

.fh-qd-cell .fh-qd-select:disabled {
    cursor: not-allowed;
    color: #6B7B73;
}

.fh-qd-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #991B1B;
    background: rgba(254, 242, 242, 0.9);
    border: 1px solid rgba(220, 38, 38, 0.22);
    white-space: nowrap;
    cursor: pointer;
}

.fh-qd-reset:hover {
    background: #FEE2E2;
}

@media (max-width: 639px) {
    .fh-qd-year-cell:last-of-type {
        grid-column: span 2;
    }

    .fh-quick-dropdowns:has(.fh-qd-reset:not(.fh-hidden)) .fh-qd-year-cell {
        grid-column: span 1;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .fh-quick-dropdowns {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fh-quick-dropdowns {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 1.15fr) 154px auto;
        gap: 0.55rem;
    }
}

/* ==========================================================================
   1B. CUSTOM SOFT-CLAY POPOVER DROPDOWNS (DESKTOP POPOVER + MOBILE SHEET)
   ========================================================================== */
.fh-sr-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

.fh-qd-cell.has-custom-dd {
    cursor: pointer;
}

.fh-qd-cell.has-custom-dd.is-open {
    border-color: #3D7A62;
    box-shadow: 0 0 0 3px rgba(91, 140, 122, 0.2), 0 6px 16px -4px rgba(38, 79, 63, 0.18);
    background: #FFFFFF;
}

.fh-qd-cell.has-custom-dd.is-open::after {
    transform: rotate(180deg);
}

.fh-qd-cell::after {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fh-cd-trigger {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0.35rem 0.1rem 0.35rem 0;
    border: 0;
    background: transparent;
    color: #24302A;
    font-family: inherit;
    font-size: 0.77rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.fh-cd-trigger:disabled {
    cursor: not-allowed;
    color: #6B7B73;
}

.fh-cd-trigger-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-cd-trigger-cnt {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.08rem 0.42rem;
    border-radius: 9999px;
    background: rgba(61, 122, 98, 0.14);
    color: #1D4A39;
}

.fh-qd-cell.is-selected-dd {
    background: linear-gradient(180deg, #ECFDF5 0%, #D6F3E4 100%);
    border-color: #3D7A62;
    box-shadow: 0 4px 12px -3px rgba(38, 79, 63, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.fh-qd-cell.is-selected-dd .fh-qd-ico {
    color: #065F46;
}

.fh-qd-cell.is-selected-dd .fh-cd-trigger {
    color: #13382A;
    font-weight: 700;
}

.fh-qd-cell.is-selected-dd::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23065F46'%3E%3Cpath d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
    opacity: 1;
}

.fh-sort-dd-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0 0.65rem 0 0.75rem;
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 249, 246, 0.9) 100%);
    border: 1px solid rgba(91, 140, 122, 0.22);
    box-shadow: 0 2px 8px rgba(42, 50, 46, 0.04), inset 0 1px 0 #FFFFFF;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.fh-sort-dd-wrap:hover,
.fh-sort-dd-wrap.is-open {
    border-color: #3D7A62;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(91, 140, 122, 0.14);
}

.fh-sort-dd-wrap::after {
    content: '';
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%234A5851'%3E%3Cpath d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fh-sort-dd-wrap.is-open::after {
    transform: rotate(180deg);
}

.fh-sort-dd-wrap .fh-cd-trigger {
    min-height: 34px;
    font-size: 0.76rem;
}

/* Shared Body-Portal Popover */
.fh-cd-portal {
    position: fixed;
    inset: 0;
    z-index: 99995;
    pointer-events: none;
}

.fh-cd-portal.is-open {
    pointer-events: auto;
}

.fh-cd-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
}

.fh-cd-popover {
    position: fixed;
    display: flex;
    flex-direction: column;
    max-height: 360px;
    border-radius: 18px;
    background: rgba(250, 252, 250, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(91, 140, 122, 0.24);
    box-shadow: 0 20px 44px -12px rgba(20, 38, 31, 0.22), 0 6px 16px -4px rgba(20, 38, 31, 0.08), inset 0 1px 0 #FFFFFF;
    overflow: hidden;
    font-family: 'Google Sans', 'Plus Jakarta Sans', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: fhCdPopIn 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fhCdPopIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fh-cd-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.05rem 0.6rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-cd-head-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #1C2722;
}

.fh-cd-head-close {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    border: 0;
    background: rgba(42, 50, 46, 0.08);
    color: #2C3933;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fh-cd-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
    background: rgba(236, 244, 239, 0.55);
}

.fh-cd-search-wrap i {
    color: #537B6B;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.fh-cd-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 500;
    color: #1D2823;
    padding: 0.1rem 0;
}

.fh-cd-search-input::placeholder {
    color: #798981;
}

.fh-cd-list {
    overflow-y: auto;
    padding: 0.38rem;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.fh-cd-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: #2A3731;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.fh-cd-option:hover,
.fh-cd-option.is-focused {
    background: rgba(91, 140, 122, 0.12);
    color: #162B22;
}

.fh-cd-option.is-active {
    background: linear-gradient(135deg, #4E7D6B 0%, #3A6454 100%);
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 4px 12px -3px rgba(58, 100, 84, 0.38);
}

.fh-cd-opt-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.fh-cd-opt-ico {
    font-size: 0.92rem;
    color: #4E7D6B;
    flex-shrink: 0;
}

.fh-cd-opt-ico.is-pin {
    color: #D97706;
}

.fh-cd-option.is-active .fh-cd-opt-ico {
    color: #A7F3D0;
}

.fh-cd-option.is-active .fh-cd-opt-ico.is-pin {
    color: #FDE68A;
}

.fh-cd-opt-lbl {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.fh-cd-opt-right {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.fh-cd-opt-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 0.1rem 0.46rem;
    border-radius: 9999px;
    background: rgba(42, 50, 46, 0.07);
    color: #4D5E56;
}

.fh-cd-option.is-active .fh-cd-opt-cnt {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

.fh-cd-opt-chk {
    font-size: 0.85rem;
    color: #A7F3D0;
}

.fh-cd-empty {
    padding: 1rem 0.75rem;
    text-align: center;
    font-size: 0.76rem;
    color: #6B7B73;
}

@media (max-width: 639px) {
    .fh-cd-backdrop {
        background: rgba(18, 28, 24, 0.42);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .fh-cd-popover {
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 72vh;
        border-radius: 24px 24px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0.5rem);
        animation: fhCdSheetUp 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .fh-cd-head {
        display: flex;
    }

    .fh-cd-option {
        min-height: 44px;
        padding: 0.62rem 0.85rem;
        font-size: 0.84rem;
    }

    @keyframes fhCdSheetUp {
        from {
            opacity: 0.5;
            transform: translateY(48px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile State Swipe Strip, 13-Category Group Strip & Contextual State Portal Category Strip (< 1024px) */
.fh-mobile-state-strip {
    margin-top: 0.6rem;
}

.fh-catgroup-strip {
    margin-top: 0.48rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(42, 50, 46, 0.08);
}

.fh-catgroup-chip {
    cursor: pointer;
    font-size: 0.73rem;
    padding: 0.4rem 0.76rem;
    min-height: 34px;
    background: rgba(255, 255, 255, 0.86);
    color: #26312C;
    border-color: rgba(91, 140, 122, 0.22);
}

.fh-catgroup-chip i {
    color: #3D7A62;
    font-size: 0.86rem;
}

.fh-catgroup-chip.is-active {
    background: linear-gradient(135deg, #3D7A62 0%, #264F3F 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 5px 12px -3px rgba(38, 79, 63, 0.38);
}

.fh-catgroup-chip.is-active i {
    color: #A7F3D0;
}

.fh-mobile-pcat-strip {
    margin-top: 0.48rem;
    padding: 0.38rem 0.45rem;
    border-radius: 16px;
    background: rgba(254, 243, 199, 0.38);
    border: 1px solid rgba(217, 119, 6, 0.18);
}

.fh-pcat-chip {
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.38rem 0.74rem;
    min-height: 32px;
    background: rgba(255, 255, 255, 0.92);
    color: #78350F;
    border-color: rgba(217, 119, 6, 0.2);
}

.fh-pcat-chip i {
    color: #D97706;
}

.fh-pcat-chip.is-active {
    background: linear-gradient(135deg, #B45309 0%, #92400E 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 5px 12px -3px rgba(180, 83, 9, 0.38);
}

.fh-pcat-chip.is-active i {
    color: #FDE68A;
}

@media (max-width: 639px) {
    .fh-hero-card {
        padding: 0.95rem 0.9rem 0.85rem;
    }

    .fh-hero-desc {
        font-size: 0.79rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .fh-catgroup-strip,
    .fh-subtype-strip,
    .fh-mobile-state-strip {
        margin-left: -0.9rem;
        margin-right: -0.9rem;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .fh-mode-wide .fh-mobile-state-strip,
    .fh-mode-wide .fh-catgroup-strip,
    .fh-mode-wide .fh-subtype-strip,
    .fh-mode-wide .fh-mobile-pcat-strip {
        display: none;
    }
}

.fh-pcat-card {
    border: 1px solid rgba(217, 119, 6, 0.22);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.85) 0%, rgba(242, 248, 244, 0.92) 100%);
}

.fh-pcat-card .fh-facet-heading i {
    color: #D97706;
}

.fh-chip-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    opacity: 0.75;
}

.fh-pin-dot {
    font-size: 0.68rem;
    color: #D97706;
}

.fh-state-chip {
    cursor: pointer;
}

.fh-state-chip.is-active .fh-pin-dot {
    color: #FDE68A;
}

/* Optional Editorial Strip */
.fh-editorial-strip {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.fh-ed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4E7D6B;
    margin-bottom: 0.65rem;
}

.fh-ed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.fh-ed-card {
    padding: 0.85rem 1rem;
    text-decoration: none;
    display: block;
}

.fh-ed-date {
    font-size: 0.68rem;
    color: #6B7972;
    font-family: 'JetBrains Mono', monospace;
}

.fh-ed-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1E2823;
    margin: 0.25rem 0 0;
    line-height: 1.35;
}

/* ==========================================================================
   2. WORKSPACE GRID: STICKY FACET RAIL + RESULTS FEED
   ========================================================================== */

.fh-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    align-items: start;
}

.fh-sidebar-rail {
    display: none;
}

@media (min-width: 1024px) {
    .fh-mode-wide .fh-workspace {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 1.35rem;
    }

    .fh-mode-wide .fh-sidebar-rail {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;
    }
}

@media (min-width: 1440px) {
    .fh-mode-wide .fh-workspace {
        grid-template-columns: 326px minmax(0, 1fr);
    }
}

.fh-facet-card {
    padding: 0.95rem 1rem;
    transition: padding 0.2s ease;
}

.fh-facet-card.is-collapsed {
    padding-bottom: 0.85rem;
}

.fh-facet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.15rem 0.58rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.07);
    margin-bottom: 0.55rem;
}

.fh-facet-card.is-collapsed .fh-facet-head {
    padding-bottom: 0;
    border-bottom-color: transparent;
    margin-bottom: 0;
}

.fh-facet-card.is-collapsed .fh-facet-body {
    display: none;
}

.fh-facet-collapse-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.fh-facet-caret {
    font-size: 0.78rem;
    color: #6B7B73;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.16s ease;
}

.fh-facet-collapse-btn:hover .fh-facet-caret {
    color: #2B453B;
}

.fh-facet-card.is-collapsed .fh-facet-caret {
    transform: rotate(180deg);
}

.fh-facet-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    color: #46554E;
}

.fh-facet-heading span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-facet-heading i {
    color: #4E7D6B;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.fh-reset-link {
    border: 0;
    background: transparent;
    color: #C25E46;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    flex-shrink: 0;
}

.fh-reset-link:hover {
    text-decoration: underline;
}

.fh-mini-filter-wrap {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.38rem 0.65rem;
    margin-bottom: 0.48rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(42, 50, 46, 0.1);
}

.fh-mini-filter-wrap i {
    font-size: 0.82rem;
    color: #6B7B73;
    flex-shrink: 0;
}

.fh-mini-filter-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.74rem;
    font-weight: 500;
    color: #1E2823;
    padding: 0;
}

.fh-facet-list {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
}

.fh-facet-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 11px;
    border: 0;
    background: transparent;
    color: #36433D;
    font-size: 0.76rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.fh-facet-btn:hover {
    background: rgba(255, 255, 255, 0.75);
    color: #1A241F;
}

.fh-facet-btn.is-active {
    background: #4E7D6B;
    color: #FFFFFF;
    box-shadow: 0 4px 10px -2px rgba(78, 125, 107, 0.35);
}

.fh-facet-btn.is-zero {
    opacity: 0.45;
}

.fh-facet-name {
    display: flex;
    align-items: flex-start;
    gap: 0.42rem;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.32;
}

.fh-facet-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fh-star-icon {
    color: #D97706;
    font-size: 0.72rem;
    margin-top: 0.16rem;
    flex-shrink: 0;
}

.fh-facet-btn.is-active .fh-star-icon,
.fh-facet-btn.is-active .fh-theme-ico {
    color: #FDE68A;
}

.fh-theme-ico {
    color: #4E7D6B;
    font-size: 0.88rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.fh-facet-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    padding: 0.08rem 0.42rem;
    border-radius: 9999px;
    background: rgba(42, 50, 46, 0.07);
    color: #54635C;
    flex-shrink: 0;
}

.fh-facet-btn.is-active .fh-facet-cnt {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

.fh-more-toggle {
    width: 100%;
    margin-top: 0.42rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    border: 1px dashed rgba(180, 83, 9, 0.28);
    background: rgba(255, 255, 255, 0.65);
    color: #92400E;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.fh-more-toggle:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(180, 83, 9, 0.45);
}

.fh-select-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.fh-field-label {
    display: block;
    font-size: 0.71rem;
    font-weight: 700;
    color: #55645D;
    margin-bottom: 0.2rem;
}

.fh-clay-select {
    width: 100%;
    padding: 0.52rem 0.75rem;
    border-radius: 13px;
    border: 1px solid rgba(42, 50, 46, 0.12);
    background: rgba(255, 255, 255, 0.88);
    color: #24302A;
    font-size: 0.78rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.fh-clay-select:focus {
    border-color: #5B8C7A;
    box-shadow: 0 0 0 2px rgba(91, 140, 122, 0.18);
}

/* ==========================================================================
   3. RESULTS TOOLBAR, ACTIVE CHIPS & LEGAL RULING CARDS
   ========================================================================== */

.fh-results-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.fh-toolbar {
    padding: 0.75rem 1.05rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    border-radius: 20px;
}

.fh-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: #4A5851;
}

.fh-speed-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.67rem;
    padding: 0.12rem 0.45rem;
    border-radius: 9999px;
    background: rgba(91, 140, 122, 0.12);
    color: #386353;
}

.fh-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.fh-sort-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #5C6B64;
}

.fh-sort-select {
    width: auto;
    min-width: 165px;
    padding: 0.38rem 0.65rem;
}

.fh-active-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.fh-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.32rem 0.42rem 0.32rem 0.72rem;
    border-radius: 9999px;
    border: 1px solid rgba(91, 140, 122, 0.32);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(236, 245, 240, 0.92) 100%);
    color: #244538;
    font-size: 0.74rem;
    font-weight: 500;
    box-shadow: 0 3px 10px -2px rgba(42, 50, 46, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.fh-filter-pill:hover {
    transform: translateY(-1px);
    border-color: #4E7D6B;
    box-shadow: 0 6px 14px -3px rgba(42, 50, 46, 0.1);
}

.fh-pill-ico {
    color: #4E7D6B;
    font-size: 0.85rem;
}

.fh-pill-x {
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: rgba(78, 125, 107, 0.14);
    color: #2F5647;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fh-filter-pill:hover .fh-pill-x {
    background: #4E7D6B;
    color: #FFFFFF;
}

.fh-filter-pill.fh-pill-emerald {
    background: linear-gradient(180deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #6EE7B7;
    color: #065F46;
}

.fh-filter-pill.fh-pill-emerald .fh-pill-ico {
    color: #059669;
}

.fh-filter-reset-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.72rem;
    border-radius: 9999px;
    border: 1px dashed rgba(194, 94, 70, 0.42);
    background: rgba(255, 245, 242, 0.82);
    color: #B44D35;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.fh-filter-reset-pill:hover {
    background: #FEE2E2;
    border-color: #C25E46;
}

.fh-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: opacity 0.18s ease;
}

.fh-cards-list.is-loading {
    opacity: 0.52;
    pointer-events: none;
}

/* Individual Ruling Card */
.fh-ruling-card {
    padding: 1.05rem 1.15rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .fh-ruling-card {
        padding: 1.25rem 1.45rem;
    }
}

.fh-card-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.fh-card-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
}

.fh-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.24rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.71rem;
    font-weight: 800;
    background: #2B453B;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.fh-badge-btn,
.fh-tag-btn {
    border: 0;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.14s cubic-bezier(0.32, 0.72, 0, 1), filter 0.16s ease, box-shadow 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.fh-badge-btn:hover,
.fh-tag-btn:hover {
    filter: brightness(0.96);
}

.fh-badge-btn:active,
.fh-tag-btn:active {
    transform: scale(0.95);
}

.fh-status-seal {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.24rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.fh-seal-gazetted {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.fh-seal-committee {
    background: rgba(91, 140, 122, 0.14);
    color: #2D5345;
    border: 1px solid rgba(91, 140, 122, 0.26);
}

.fh-seal-advisory {
    background: rgba(217, 119, 6, 0.1);
    color: #92400E;
    border: 1px solid rgba(217, 119, 6, 0.22);
}

.fh-pdf-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.52rem;
    border-radius: 9999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.fh-card-date-chip {
    font-size: 0.71rem;
    color: #5C6B64;
    background: rgba(255, 255, 255, 0.65);
    padding: 0.28rem 0.65rem;
    border-radius: 14px;
    border: 1px solid rgba(42, 50, 46, 0.06);
}

.fh-date-micro-lbl {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    color: #6B7B73;
    margin-bottom: 0.1rem;
}

/* MDH Dual Date Style (Hijri primary + monospace Gregorian secondary) */
.fh-dual-date {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fh-dual-hijri {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #1E2823;
    line-height: 1.25;
}

.fh-dual-hijri i {
    color: #4E7D6B;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.fh-dual-greg {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.71rem;
    font-weight: 500;
    color: #5D6C65;
    padding-left: 1.23rem;
    line-height: 1.25;
}

.fh-dual-compact .fh-dual-hijri {
    font-size: 0.8rem;
}

.fh-dual-compact .fh-dual-greg {
    font-size: 0.68rem;
}

.fh-dual-card .fh-dual-hijri {
    font-size: 0.72rem;
}

.fh-dual-card .fh-dual-hijri i {
    font-size: 0.76rem;
}

.fh-dual-card .fh-dual-greg {
    font-size: 0.64rem;
    padding-left: 1.1rem;
}

.fh-date-kind {
    color: #6E7D76;
    margin-right: 0.2rem;
}

.fh-card-authority {
    font-size: 0.74rem;
    font-weight: 600;
    color: #5B6B63;
}

.fh-inline-ct-link {
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    color: #3D6958;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(61, 105, 88, 0.32);
    text-underline-offset: 2px;
}

.fh-inline-ct-link:hover {
    color: #244538;
    text-decoration-color: currentColor;
}

.fh-dot {
    margin: 0 0.25rem;
    opacity: 0.6;
}

.fh-card-title {
    font-size: clamp(0.98rem, 1.2vw, 1.12rem);
    font-weight: 700;
    line-height: 1.38;
    margin: 0.05rem 0;
    color: #1A241F;
}

.fh-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.16s ease;
}

.fh-card-title a:hover {
    color: #467362;
}

.fh-card-snippet {
    font-size: 0.82rem;
    line-height: 1.62;
    color: #495750;
    margin: 0.1rem 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

mark.fh-hl {
    background: #FEF08A;
    color: #1E2823;
    padding: 0.04rem 0.22rem;
    border-radius: 4px;
    font-weight: 700;
}

.fh-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding-top: 0.65rem;
    margin-top: 0.15rem;
    border-top: 1px solid rgba(42, 50, 46, 0.07);
}

.fh-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.fh-theme-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.58rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.74);
    color: #3E4D46;
    border: 1px solid rgba(42, 50, 46, 0.07);
}

.fh-theme-chip i {
    color: #4E7D6B;
}

.fh-pcat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.58rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(254, 243, 199, 0.62);
    color: #78350F;
    border: 1px solid rgba(217, 119, 6, 0.24);
}

.fh-pcat-tag i {
    color: #D97706;
}

.fh-cid-chip {
    font-size: 0.67rem;
    padding: 0.18rem 0.48rem;
    border-radius: 8px;
    background: rgba(42, 50, 46, 0.06);
    color: #5C6B64;
}

.fh-card-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
}

@media (max-width: 639px) {
    .fh-ruling-card {
        padding: 0.95rem 0.95rem;
        border-radius: 20px;
    }

    .fh-card-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1.25fr;
        gap: 0.45rem;
        margin-left: 0;
    }

    .fh-quick-btn,
    .fh-read-btn {
        justify-content: center;
    }
}

.fh-quick-btn,
.fh-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.44rem 0.82rem;
    border-radius: 13px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* Pagination */
.fh-pagination {
    padding: 0.85rem 1.15rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fh-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 14px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.fh-page-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none !important;
}

.fh-page-info {
    font-size: 0.8rem;
    color: #4B5A53;
}

.fh-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.fh-empty-icon {
    font-size: 2.6rem;
    color: #5B8C7A;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   4. SINGLE RULING READER & LAYER 2 STATE DOSSIER
   ========================================================================== */

.fh-single-nav {
    padding: 0.7rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fh-single-bc {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
}

.fh-back-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #24302A;
    text-decoration: none;
    flex-shrink: 0;
}

.fh-bc-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #467362;
    text-decoration: none;
    white-space: nowrap;
}

.fh-sep {
    color: #9AA7A0;
    font-size: 0.75rem;
}

.fh-single-tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.fh-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.72rem;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    color: #24302A;
}

.fh-single-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .fh-single-wide .fh-single-grid {
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 1.4rem;
    }

    .fh-single-wide .fh-single-side {
        position: sticky;
        top: 5.5rem;
    }
}

.fh-single-main,
.fh-single-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.fh-doc-card {
    padding: 1.25rem 1.15rem;
}

@media (min-width: 640px) {
    .fh-doc-card {
        padding: 2rem 2.25rem;
    }
}

.fh-doc-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.fh-badge-lg {
    font-size: 0.74rem;
    padding: 0.3rem 0.78rem;
}

.fh-pdpa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.fh-doc-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: clamp(1.4rem, 2.3vw, 2.05rem);
    font-weight: 700;
    line-height: 1.26;
    color: #1A241F;
    margin: 0 0 1.15rem;
}

.fh-meta-strip {
    padding: 0.95rem 1.1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

@media (max-width: 639px) {
    .fh-meta-strip {
        padding: 0.8rem 0.9rem;
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem 0.8rem;
    }
}

.fh-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.fh-meta-lbl {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #67766F;
}

.fh-meta-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1E2823;
    line-height: 1.35;
}

.fh-meta-muted {
    font-weight: 500;
    font-style: italic;
    color: #67766F;
}

.fh-meta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: #467362;
    text-decoration: none;
}

.fh-meta-link:hover {
    text-decoration: underline;
}

.fh-source-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-action-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.56rem 1rem;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fh-statutory-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1.1rem 0;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(91, 140, 122, 0.09);
    border: 1px solid rgba(91, 140, 122, 0.22);
    font-size: 0.78rem;
    line-height: 1.55;
    color: #2E4B3F;
}

.fh-statutory-notice i {
    font-size: 1.1rem;
    color: #467362;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.fh-statutory-notice p {
    margin: 0;
}

/* Public Question Box (soalan_text) */
.fh-question-box {
    padding: 1.05rem 1.2rem;
    margin: 1rem 0 1.25rem;
    border: 1px solid rgba(217, 119, 6, 0.24);
    background: rgba(254, 243, 199, 0.35);
}

.fh-q-label {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #92400E;
    margin-bottom: 0.45rem;
}

.fh-q-body p {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #29342E;
}

.fh-q-body p:last-child {
    margin-bottom: 0;
}

/* Clean Reading vs Raw Verbatim Mode Switch */
.fh-reader-mode-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 1.15rem 0 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-mode-caption {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #46554E;
}

.fh-mode-caption i {
    color: #4E7D6B;
    font-size: 0.92rem;
}

.fh-mode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem;
    padding: 0.22rem;
    border-radius: 14px;
    background: var(--surface-well);
    border: 1px solid rgba(42, 50, 46, 0.06);
}

.fh-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.34rem 0.72rem;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: #4D5C55;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.fh-mode-btn.is-active {
    background: #FFFFFF;
    color: #244538;
    box-shadow: 0 3px 8px rgba(42, 50, 46, 0.08);
}

/* Verbatim Ruling Reader Body (Full-Width Card Alignment) */
.fh-verbatim-body {
    color: #1F2A25;
    margin-top: 0.85rem;
    width: 100%;
}

.fh-doc-clause {
    margin: 0 0 0.65rem;
    padding-left: 1.4rem;
    text-indent: -1.4rem;
    overflow-wrap: anywhere;
}

.fh-doc-subclause {
    margin: 0 0 0.55rem;
    padding-left: 2.55rem;
    text-indent: -1.45rem;
    overflow-wrap: anywhere;
}

/* Standardized Bottom-Right Official Signatory Block (Paparan Kemas) */
.fh-signature-block {
    margin: 1.95rem 0 0.55rem auto;
    width: fit-content;
    max-width: min(100%, 480px);
    padding-top: 0.85rem;
    border-top: 1px solid rgba(91, 140, 122, 0.28);
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.18rem;
    line-height: 1.45;
}

@media (max-width: 639px) {
    .fh-signature-block {
        margin-left: auto;
        margin-right: 0;
        max-width: 92%;
        text-align: right;
        align-items: flex-end;
    }
}

.fh-sig-eyebrow {
    font-size: 0.74em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5B7368;
    margin-bottom: 0.15rem;
}

.fh-sig-name {
    font-size: 0.9em;
    font-weight: 800;
    color: #1A241F;
    letter-spacing: 0.015em;
    text-wrap: balance;
}

.fh-sig-role {
    font-size: 0.86em;
    font-weight: 600;
    color: #35463E;
    text-wrap: balance;
}

.fh-sig-role-sub {
    font-size: 0.82em;
    font-weight: 500;
    font-style: italic;
    color: #5A6B63;
}

.fh-raw-panel {
    margin: 0.85rem 0 0;
    padding: 0.85rem 1.15rem 1.15rem;
    border-radius: 18px;
}

.fh-raw-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-raw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #35584A;
}

.fh-raw-badge i {
    color: #2E6F57;
    font-size: 0.92rem;
}

.fh-raw-pre {
    margin: 0;
    padding: 0;
    font-family: inherit;
    color: #1F2A25;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fh-verbatim-body.fh-scale-sm,
.fh-raw-pre.fh-scale-sm {
    font-size: 0.88rem;
    line-height: 1.76;
}

.fh-verbatim-body.fh-scale-md,
.fh-raw-pre.fh-scale-md {
    font-size: 0.98rem;
    line-height: 1.84;
}

.fh-verbatim-body.fh-scale-lg,
.fh-raw-pre.fh-scale-lg {
    font-size: 1.12rem;
    line-height: 1.9;
}

.fh-verbatim-body.fh-scale-xl,
.fh-raw-pre.fh-scale-xl {
    font-size: 1.26rem;
    line-height: 1.96;
}

.fh-doc-para {
    margin: 0 0 1.05rem;
    overflow-wrap: anywhere;
}

.fh-doc-subhead {
    font-size: 0.95em;
    font-weight: 800;
    color: #244538;
    letter-spacing: 0.015em;
    margin: 1.4rem 0 0.55rem;
}

.fh-verbatim-body > .fh-doc-subhead:first-child,
.fh-bilingual-divider + .fh-doc-subhead {
    margin-top: 0.15rem;
}

.fh-doc-subhead + .fh-doc-subhead {
    margin-top: 0.35rem;
}

.fh-rtl-block {
    font-family: 'Noto Sans Arabic', 'Amiri', serif;
    font-size: 1.22em;
    line-height: 2.2;
    text-align: right;
    direction: rtl;
    padding: 0.75rem 1rem;
    margin: 0.9rem 0 1.1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(91, 140, 122, 0.16);
}

.fh-bilingual-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 2.25rem 0 1.75rem;
}

.fh-bilingual-divider::before,
.fh-bilingual-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(91, 140, 122, 0.06), rgba(91, 140, 122, 0.32), rgba(91, 140, 122, 0.06));
}

.fh-bilingual-divider span {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.95rem;
    border-radius: 999px;
    background: rgba(91, 140, 122, 0.13);
    border: 1px solid rgba(91, 140, 122, 0.25);
    color: #244538;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
}

.fh-page-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.4rem 0;
    color: #7A8982;
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fh-page-divider::before,
.fh-page-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(42, 50, 46, 0.1);
}

.fh-keywords-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-kw-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #5D6C65;
    margin-right: 0.2rem;
}

.fh-kw-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.22rem 0.58rem;
    border-radius: 9px;
    background: rgba(42, 50, 46, 0.06);
    color: #3D4C45;
    text-decoration: none;
}

.fh-kw-pill:hover {
    background: rgba(91, 140, 122, 0.16);
    color: #2B4E40;
}

/* Compact Single Ruling Byline */
.fh-doc-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #55645D;
    margin-bottom: 0.35rem;
}

.fh-byline-item {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.fh-byline-item i {
    color: #4E7D6B;
    font-size: 0.9rem;
}

.fh-byline-jump {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.16rem 0.55rem;
    border-radius: 9999px;
    background: rgba(185, 28, 28, 0.08);
    color: #B91C1C;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.16s ease;
}

.fh-byline-jump:hover {
    background: rgba(185, 28, 28, 0.15);
}

/* Unified Bottom Record Details, Actions & Provenance Card */
.fh-provenance-card {
    padding: 1.05rem 1.25rem;
    border-radius: 24px;
}

@media (max-width: 639px) {
    .fh-provenance-card {
        padding: 0.95rem 1rem;
    }
}

.fh-prov-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.84rem;
    color: #24332C;
    list-style: none;
}

.fh-prov-summary::-webkit-details-marker {
    display: none;
}

.fh-prov-summary span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.fh-prov-summary i {
    color: #4E7D6B;
    font-size: 1rem;
}

.fh-prov-summary .fh-caret {
    transition: transform 0.2s ease;
}

.fh-provenance-card[open] .fh-prov-summary .fh-caret {
    transform: rotate(180deg);
}

.fh-prov-body {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.fh-prov-body .fh-source-actions {
    padding-bottom: 0.95rem;
}

.fh-direct-urls-box {
    padding: 0.8rem 1rem;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.fh-direct-url-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fh-direct-url-row + .fh-direct-url-row {
    padding-top: 0.7rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-direct-url-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.fh-direct-url-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #265947;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fh-direct-url-link:hover {
    color: #183E30;
    text-decoration: underline;
}

.fh-direct-url-link i {
    flex-shrink: 0;
    font-size: 0.8rem;
    transform: translateY(1px);
}

.fh-url-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.36rem 0.68rem;
    border-radius: 11px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #28493C;
    cursor: pointer;
}

.fh-url-copy-btn.is-confirmed {
    background: #2E6F57;
    color: #FFFFFF;
}

@media (max-width: 639px) {
    .fh-direct-url-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .fh-url-copy-btn {
        align-self: flex-end;
    }
}

/* Inline Share Bar & Native-App Share Bottom Sheet */
.fh-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 0.9rem;
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-share-lbl {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #4D5E56;
}

.fh-share-lbl i {
    color: #4E7D6B;
    font-size: 0.95rem;
}

.fh-share-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.fh-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    padding: 0.4rem 0.78rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2A3630;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.14s ease, background-color 0.16s ease, color 0.16s ease;
}

.fh-share-btn:active {
    transform: scale(0.97);
}

.fh-share-btn i {
    font-size: 1rem;
}

.fh-share-wa i,
.fh-share-tile.fh-share-wa .fh-share-tile-ico {
    color: #16A34A;
}

.fh-share-wa:hover {
    background: rgba(22, 163, 74, 0.12);
    color: #15803D;
}

.fh-share-tg i,
.fh-share-tile.fh-share-tg .fh-share-tile-ico {
    color: #0284C7;
}

.fh-share-tg:hover {
    background: rgba(2, 132, 199, 0.12);
    color: #0369A1;
}

.fh-share-fb i,
.fh-share-tile.fh-share-fb .fh-share-tile-ico {
    color: #1D4ED8;
}

.fh-share-fb:hover {
    background: rgba(29, 78, 216, 0.12);
    color: #1E40AF;
}

.fh-share-copy i,
.fh-share-tile.fh-share-copy .fh-share-tile-ico {
    color: #356654;
}

.fh-share-copy.is-confirmed {
    background: #2E6F57;
    color: #FFFFFF;
}

.fh-share-copy.is-confirmed i {
    color: #FFFFFF;
}

.fh-share-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

@media (min-width: 640px) {
    .fh-share-overlay {
        align-items: center;
        padding: 1rem;
    }
}

.fh-share-panel {
    width: 100%;
    max-width: 460px;
    padding: 0.75rem 1.2rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    background: #F4F9F6;
}

@media (min-width: 640px) {
    .fh-share-panel {
        border-radius: 26px;
        padding: 1.25rem 1.35rem 1.35rem;
    }
}

.fh-share-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.fh-share-sheet-head strong {
    display: block;
    font-size: 0.96rem;
    color: #1B2922;
}

.fh-share-sheet-sub {
    margin: 0.2rem 0 0;
    font-size: 0.76rem;
    color: #5A6B63;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fh-share-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

@media (max-width: 390px) {
    .fh-share-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fh-share-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.85rem 0.5rem;
    border-radius: 18px;
    text-decoration: none;
    color: #24332C;
    border: 1px solid rgba(91, 140, 122, 0.14);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.16s ease;
}

.fh-share-tile:active {
    transform: scale(0.96);
}

.fh-share-tile-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 3px 8px rgba(32, 44, 38, 0.06);
}

.fh-share-tile-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.fh-share-tile.is-confirmed .fh-share-tile-ico {
    background: #2E6F57;
    color: #FFFFFF;
}

.fh-prov-body .fh-meta-strip {
    margin-bottom: 0;
}

.fh-prov-body .fh-statutory-notice {
    margin: 0;
}

.fh-prov-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    color: #3E4E47;
    margin-bottom: -0.35rem;
}

.fh-prov-section-title i {
    color: #4E7D6B;
    font-size: 0.92rem;
}

.fh-prov-subblock {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fh-dossier-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
}

.fh-kv-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fh-kv-lbl {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6B7A73;
}

.fh-kv-val {
    font-size: 0.79rem;
    font-weight: 600;
    color: #222E28;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fh-kv-val a {
    color: #265947;
    text-decoration: none;
}

.fh-kv-val a:hover {
    color: #183E30;
    text-decoration: underline;
}

.fh-sha-box {
    margin-top: 0.15rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
}

.fh-sha-hash {
    display: block;
    font-size: 0.7rem;
    word-break: break-all;
    color: #35584B;
    margin-top: 0.2rem;
}

/* Right Legal Dossier & Lineage Cards */
.fh-side-card {
    padding: 1.15rem 1.2rem;
    border-radius: 24px;
}

.fh-side-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3E4E47;
    margin: 0 0 0.8rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.07);
}

.fh-side-heading i {
    color: #4E7D6B;
    font-size: 0.98rem;
}

.fh-side-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.fh-side-row dt {
    font-size: 0.68rem;
    font-weight: 700;
    color: #697871;
    margin-bottom: 0.1rem;
}

.fh-side-row dd {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1E2823;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.fh-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.fh-rel-item {
    display: block;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.fh-rel-item:hover {
    transform: translateY(-1.5px);
    background: rgba(255, 255, 255, 0.85);
}

.fh-rel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.28rem;
    font-size: 0.66rem;
    font-weight: 700;
}

.fh-rel-state {
    color: #35584B;
}

.fh-rel-warta {
    background: #ECFDF5;
    color: #065F46;
    padding: 0.06rem 0.38rem;
    border-radius: 9999px;
}

.fh-rel-year {
    font-family: 'JetBrains Mono', monospace;
    color: #6E7D76;
}

.fh-rel-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.38;
    color: #1F2B25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   5. MOBILE BOTTOM FILTER FAB, FILTER SHEET & QUICK-PEEK SLIDE-OVER
   ========================================================================== */

.fh-mobile-fab-wrap {
    position: fixed;
    left: 50%;
    bottom: calc(4.65rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 43;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
    will-change: transform, opacity;
}

.fh-mobile-fab-wrap.is-dock-hidden {
    transform: translate(-50%, 150%);
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 1024px) {
    .fh-mode-wide .fh-mobile-fab-wrap {
        display: none;
    }
}

.fh-mobile-dock-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem;
    border-radius: 9999px;
    background: rgba(31, 53, 45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 30px -6px rgba(20, 34, 28, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fh-mobile-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.56rem 1.05rem;
    border-radius: 9999px;
    border: 0;
    background: linear-gradient(135deg, #4E7D6B 0%, #375E4F 100%);
    color: #FFFFFF;
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.fh-mobile-filter-pill:active,
.fh-mobile-dock-icon:active {
    transform: scale(0.94);
}

.fh-mobile-dock-icon {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.14s ease, background-color 0.16s ease;
    -webkit-tap-highlight-color: transparent;
}

.fh-mobile-dock-icon:hover {
    background: rgba(255, 255, 255, 0.22);
}

.fh-fab-badge {
    background: #E2856E;
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 0.05rem 0.42rem;
    border-radius: 9999px;
}

/* Modal / Sheet / Slide-Over Overlays */
.fh-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(28, 38, 33, 0.46);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.fh-sheet-panel {
    width: 100%;
    max-width: 560px;
    max-height: 88dvh;
    border-radius: 28px 28px 0 0;
    padding: 0.85rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
    background: #FAF7F2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fhSlideUp 0.25s cubic-bezier(0.32, 0.72, 0, 1);
    touch-action: pan-y;
}

.fh-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-sheet-header h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
}

.fh-sheet-sub {
    display: block;
    font-size: 0.69rem;
    color: #64736B;
    margin-top: 0.1rem;
}

.fh-sheet-head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fh-icon-close {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fh-sheet-body {
    padding: 0.85rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.fh-sheet-toggles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

@media (max-width: 390px) {
    .fh-sheet-toggles-grid {
        grid-template-columns: 1fr;
    }
}

.fh-sheet-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.68rem 0.8rem;
    border-radius: 14px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    font-size: 0.76rem;
    cursor: pointer;
}

.fh-sheet-toggle-row.fh-sheet-toggle-pdf {
    background: #FEF2F2;
    border-color: #FECACA;
}

.fh-sheet-toggle-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #4E7D6B;
    flex-shrink: 0;
}

.fh-sheet-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.fh-sheet-footer {
    padding-top: 0.55rem;
    border-top: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-apply-btn {
    width: 100%;
    padding: 0.78rem 1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

/* Quick-Peek Slide-Over Reader */
.fh-drawer-overlay {
    justify-content: flex-end;
    align-items: stretch;
}

.fh-quick-panel {
    width: 100%;
    max-width: 780px;
    height: 100%;
    border-radius: 0;
    background: #FAF7F2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fhSlideLeft 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}

.fh-quick-drag-handle {
    display: none;
}

@media (max-width: 767px) {
    .fh-drawer-overlay {
        align-items: flex-end;
    }

    .fh-quick-panel {
        height: 92dvh;
        border-radius: 26px 26px 0 0;
        padding-top: 0.65rem;
        animation: fhSlideUp 0.26s cubic-bezier(0.32, 0.72, 0, 1);
        touch-action: pan-y;
    }

    .fh-quick-drag-handle {
        display: block;
        margin: 0 auto 0.35rem;
        flex-shrink: 0;
    }
}

.fh-quick-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.09);
    background: rgba(250, 247, 242, 0.95);
    flex-shrink: 0;
}

.fh-quick-top-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.fh-quick-back,
.fh-aa-btn,
.fh-cite-btn,
.fh-open-full-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.78rem;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fh-quick-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* Toast Feedback */
.fh-toast {
    position: fixed;
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    background: #1E2823;
    color: #FFFFFF;
    padding: 0.58rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

@keyframes fhSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes fhSlideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 639px) {
    .fh-hide-xs,
    .fh-hide-mobile {
        display: none !important;
    }

    .fh-source-actions.fh-has-primary-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .fh-source-actions.fh-has-primary-cta .fh-cta-primary {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .fh-source-actions.fh-has-primary-cta .fh-action-cta {
        justify-content: center;
        padding: 0.6rem 0.65rem;
        font-size: 0.74rem;
    }
}

/* ==========================================================================
   6. OFFICIAL PDF PREVIEW MODAL
   ========================================================================== */

.fh-pdf-overlay {
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fh-pdf-panel {
    width: 100%;
    max-width: 1040px;
    height: min(90dvh, 880px);
    background: #FAF7F2;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fhSlideUp 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (max-width: 639px) {
    .fh-pdf-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .fh-pdf-panel {
        height: 94dvh;
        border-radius: 26px 26px 0 0;
    }
}

.fh-pdf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.09);
    background: rgba(250, 247, 242, 0.96);
    flex-shrink: 0;
}

.fh-pdf-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.fh-pdf-ico {
    font-size: 1.45rem;
    color: #DC2626;
    flex-shrink: 0;
}

.fh-pdf-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fh-pdf-heading {
    font-size: 0.82rem;
    font-weight: 800;
    color: #1E2823;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-pdf-sub {
    font-size: 0.69rem;
    color: #5C6B64;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-pdf-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.fh-pdf-dl-btn,
.fh-pdf-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fh-pdf-stage {
    position: relative;
    flex: 1;
    background: #E8EFEA;
    overflow: hidden;
}

.fh-pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #46554E;
    background: #EFF4F1;
    z-index: 2;
}

.fh-spin {
    font-size: 1.7rem;
    color: #4E7D6B;
    animation: fhSpin 0.9s linear infinite;
}

@keyframes fhSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fh-pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #FFFFFF;
}

/* ==========================================================================
   7. CLEAN OFFICIAL PRINT SHEET (@media print)
   ========================================================================== */

@media print {
    #masthead,
    #colophon,
    #mdh-bottom-nav,
    #mdh-reading-progress,
    .mdh-reading-bar,
    .fh-single-nav,
    .fh-source-actions,
    .fh-reader-mode-bar,
    .fh-single-side,
    .fh-keywords-bar,
    .fh-provenance-card,
    .fh-overlay,
    #wpadminbar {
        display: none !important;
    }

    body,
    .ambient-mesh {
        background: #FFFFFF !important;
        color: #111111 !important;
    }

    .fh-single-shell,
    .fh-single-grid,
    .fh-doc-card,
    .fh-verbatim-body {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #FFFFFF !important;
    }

    .fh-doc-title {
        font-size: 18pt !important;
        color: #000000 !important;
    }

    .fh-meta-strip {
        border: 1px solid #CCCCCC !important;
        background: #F9F9F9 !important;
        box-shadow: none !important;
        margin-bottom: 14pt !important;
    }
}

/* ==========================================================================
   SCHEMA v3.2.1 VISUAL PROOF VIEWER (WARTA / DOKUMEN ASAL & PORTAL SNAPSHOTS)
   ========================================================================== */
.fh-proof-stack {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: 0.9rem;
}

.fh-proof-figure {
    margin: 0;
    padding: 0.75rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(42, 50, 46, 0.1);
    background: rgba(255, 255, 255, 0.85);
}

.fh-proof-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0.4rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #2B453A;
}

.fh-proof-caption span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.fh-proof-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.73rem;
    font-weight: 700;
    color: #2E6F57;
    text-decoration: none;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    cursor: pointer;
    transition: background 0.16s ease;
}

.fh-proof-zoom:hover {
    background: #D1FAE5;
}

.fh-proof-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(42, 50, 46, 0.09);
    background: #FFFFFF;
    cursor: zoom-in;
}

/* Inline Arabic Quotes, Scannable Section Callouts & Bilingual Switcher (v1.8.38) */
.fh-inline-ar {
    font-family: 'Amiri', 'Noto Sans Arabic', serif;
    font-size: 1.2em;
    line-height: 2.05;
    color: #163026;
    unicode-bidi: isolate;
    padding: 0 0.18em;
}

.fh-section-callout {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 1.25rem 0 0.6rem;
    padding: 0.3rem 0.78rem;
    border-radius: 10px;
    background: rgba(91, 140, 122, 0.12);
    border-left: 3px solid #4E7D6B;
    color: #244538;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fh-section-callout.is-keputusan {
    background: #ECFDF5;
    border-left-color: #059669;
    color: #065F46;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.08);
}

.fh-bilingual-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin: 0.25rem 0 1.15rem;
    padding: 0.45rem 0.7rem;
    border-radius: 14px;
    background: rgba(91, 140, 122, 0.09);
    border: 1px solid rgba(91, 140, 122, 0.2);
}

.fh-bilingual-lbl {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.73rem;
    font-weight: 700;
    color: #2B4B3E;
}

.fh-bilingual-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.18rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.fh-bi-btn {
    border: 0;
    background: transparent;
    color: #4D5C55;
    font-size: 0.71rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.fh-bi-btn.is-active {
    background: #2E6F57;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(46, 111, 87, 0.22);
}

/* Above-the-Fold Reader QuickTools & Desktop Split-Screen Proof Stage */
.fh-reader-QuickTools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.fh-font-stepper {
    display: inline-flex;
    align-items: center;
    border-radius: 11px;
    background: var(--surface-well);
    border: 1px solid rgba(42, 50, 46, 0.08);
    padding: 0.16rem;
    gap: 0.12rem;
}

.fh-font-step-btn {
    border: 0;
    background: transparent;
    color: #2A3A33;
    font-size: 0.73rem;
    font-weight: 800;
    padding: 0.26rem 0.52rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fh-font-step-btn:hover {
    background: #FFFFFF;
}

.fh-quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.34rem 0.68rem;
    border-radius: 11px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fh-quick-pdf {
    color: #1F513F;
    border-color: rgba(46, 111, 87, 0.24);
}

.fh-split-btn {
    display: none;
}

@media (min-width: 1024px) {
    .fh-split-btn {
        display: inline-flex;
    }

    .fh-split-btn.is-active {
        background: #2E6F57;
        color: #FFFFFF;
        border-color: #2E6F57;
    }

    .fh-reader-stage.is-split-view {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        gap: 1.15rem;
        align-items: start;
        margin-top: 0.85rem;
    }

    .fh-reader-stage.is-split-view .fh-verbatim-body,
    .fh-reader-stage.is-split-view .fh-raw-panel,
    .fh-reader-stage.is-split-view .fh-proof-stack {
        margin-top: 0;
    }

    .fh-reader-stage.is-split-view .fh-stage-proof {
        position: sticky;
        top: 5.2rem;
        max-height: calc(100vh - 6.2rem);
        overflow-y: auto;
        padding: 0.65rem;
        border-radius: 18px;
        background: var(--surface-well);
        border: 1px solid rgba(42, 50, 46, 0.08);
    }
}

.fh-split-proof-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.08);
}

.fh-split-proof-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.fh-split-ptab {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.26rem 0.62rem;
    border-radius: 9px;
    border: 0;
    background: rgba(255, 255, 255, 0.65);
    color: #465750;
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
}

.fh-split-ptab.is-active {
    background: #2E6F57;
    color: #FFFFFF;
}

.fh-split-close-btn {
    border: 0;
    background: rgba(255, 255, 255, 0.75);
    color: #3B4A43;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Interactive Snapshot Zoom & Swipe Lightbox */
.fh-snap-overlay {
    z-index: 9999;
    padding: 0.75rem;
}

.fh-snap-panel {
    width: min(1180px, 96vw);
    height: min(92vh, 980px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.fh-snap-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(42, 50, 46, 0.09);
    background: rgba(255, 255, 255, 0.88);
}

.fh-snap-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fh-snap-title {
    font-size: 0.86rem;
    color: #1A2822;
}

.fh-snap-sub {
    font-size: 0.71rem;
    color: #5D6E66;
}

.fh-snap-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.fh-snap-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.62rem;
    border-radius: 10px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fh-snap-stage {
    flex: 1;
    overflow: auto;
    background: #1C2420;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

.fh-snap-stage-img {
    display: block;
    width: min(100%, 880px);
    max-width: none;
    height: auto;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
    transition: width 0.18s ease;
    cursor: zoom-in;
}

.fh-snap-stage-img.is-zoom-175 {
    width: 1450px;
    cursor: zoom-in;
}

.fh-snap-stage-img.is-zoom-250 {
    width: 2100px;
    cursor: zoom-out;
}


