/* ============================================================
   HISTORYX - Halaman jelajah, kategori, negara, tokoh, timeline,
   pencarian, dan beranda dinamis.
   ============================================================ */

/* ---------- Tombol ---------- */

.hx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.68rem 1.2rem;
    border: 1px solid var(--hx-border-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--hx-text);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.hx-btn-gold {
    border-color: rgba(212, 175, 55, 0.85);
    background: linear-gradient(160deg, var(--hx-gold-soft), var(--hx-gold));
    color: #191306;
}

.hx-btn-gold:hover {
    color: #120e04;
    filter: brightness(1.04);
}

.hx-btn-ghost {
    border-color: var(--hx-border-strong);
    color: var(--hx-text);
}

.hx-btn-ghost:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.07);
    color: var(--hx-gold-soft);
}

/* ---------- Kepala halaman ---------- */

.hx-page-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.2rem, 4.5vw, 4rem);
    border-bottom: 1px solid var(--hx-border);
}

.hx-page-title {
    max-width: 22ch;
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1.14;
    letter-spacing: -0.01em;
}

.hx-page-lead {
    max-width: 65ch;
    margin-top: 0.85rem;
    color: var(--hx-muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.hx-page-hero-search {
    max-width: 720px;
    margin-top: 1.7rem;
}

.hx-page-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.4rem;
    margin-top: 1.4rem;
    color: var(--hx-muted-2);
    font-size: 0.82rem;
}

.hx-page-stats .bi {
    color: var(--hx-gold);
}

.hx-page-stats strong {
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 0.9rem;
}

.hx-page-stats a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--hx-gold);
    font-weight: 600;
}

.hx-section-tight {
    padding-block: clamp(1.8rem, 3.5vw, 2.8rem);
}

/* ---------- Kotak pencarian ---------- */

.hx-search {
    position: relative;
}

.hx-search-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.35rem 0.35rem 0.9rem;
    border: 1px solid var(--hx-border-strong);
    border-radius: 12px;
    background: rgba(8, 8, 9, 0.82);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.hx-search-field:focus-within {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.13);
}

.hx-search-icon {
    flex: 0 0 auto;
    color: var(--hx-gold);
    font-size: 1rem;
}

.hx-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.2rem;
    border: 0;
    background: transparent;
    color: var(--hx-text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
}

.hx-search-input::placeholder {
    color: var(--hx-muted-2);
}

.hx-search-input::-webkit-search-cancel-button {
    filter: invert(0.7);
}

.hx-search-submit {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid rgba(212, 175, 55, 0.8);
    border-radius: 9px;
    background: linear-gradient(160deg, var(--hx-gold-soft), var(--hx-gold));
    color: #191306;
    font-size: 1rem;
    cursor: pointer;
}

.hx-search-submit:hover {
    filter: brightness(1.05);
}

.hx-search-lg .hx-search-field {
    padding: 0.5rem 0.5rem 0.5rem 1.1rem;
}

.hx-search-lg .hx-search-input {
    font-size: 1.05rem;
    padding-block: 0.65rem;
}

.hx-search-lg .hx-search-submit {
    width: 3rem;
    height: 3rem;
}

.hx-search-hint {
    margin-top: 0.5rem;
    color: var(--hx-muted-2);
    font-size: 0.76rem;
}

.hx-suggest {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 30;
    overflow: hidden;
    border: 1px solid var(--hx-border-strong);
    border-radius: 12px;
    background: #111113;
    box-shadow: var(--hx-shadow);
}

.hx-suggest[hidden] {
    display: none;
}

.hx-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--hx-border);
    color: var(--hx-text);
    font-size: 0.88rem;
}

.hx-suggest-item:last-child {
    border-bottom: 0;
}

.hx-suggest-item:hover,
.hx-suggest-item.is-active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--hx-gold-soft);
}

.hx-suggest-type {
    flex: 0 0 auto;
    padding: 0.12rem 0.45rem;
    border: 1px solid var(--hx-border-strong);
    border-radius: 999px;
    color: var(--hx-muted-2);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hx-suggest-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hx-suggest-empty {
    padding: 0.85rem 0.9rem;
    color: var(--hx-muted-2);
    font-size: 0.82rem;
}

/* ---------- Tata letak dua kolom ---------- */

.hx-discovery-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(1.2rem, 3vw, 2.4rem);
    align-items: start;
}

.hx-discovery-aside {
    position: sticky;
    top: 6rem;
}

.hx-discovery-main {
    min-width: 0;
}

/* ---------- Form filter ---------- */

.hx-filter-form {
    display: grid;
    gap: 0.9rem;
    padding: 1.15rem;
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    background: linear-gradient(170deg, rgba(25, 25, 28, 0.9), rgba(17, 17, 19, 0.9));
}

.hx-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--hx-border);
}

.hx-filter-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--hx-text);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hx-filter-title .bi {
    color: var(--hx-gold);
}

.hx-filter-reset {
    color: var(--hx-muted-2);
    font-size: 0.75rem;
}

.hx-filter-reset:hover {
    color: var(--hx-gold);
}

.hx-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.hx-filter-form .hx-input {
    padding: 0.55rem 0.65rem;
    font-size: 0.86rem;
}

.hx-filter-form .hx-label {
    font-size: 0.7rem;
}

.hx-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--hx-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    cursor: pointer;
}

.hx-switch input {
    margin-top: 0.18rem;
    accent-color: var(--hx-gold);
}

.hx-switch .bi {
    color: var(--hx-gold);
}

/* ---------- Filter aktif ---------- */

.hx-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.hx-active-label {
    margin-right: 0.2rem;
    color: var(--hx-muted-2);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--hx-border-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--hx-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.hx-chip:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--hx-gold-soft);
}

.hx-chip .bi-x-lg {
    font-size: 0.62rem;
    color: var(--hx-muted-2);
}

.hx-chip.is-clear {
    border-color: rgba(168, 50, 50, 0.45);
    color: #e7a3a3;
}

.hx-chip.is-active {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.1);
    color: var(--hx-gold-soft);
}

.hx-chip-count {
    padding: 0.02rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--hx-muted-2);
    font-family: var(--hx-mono);
    font-size: 0.66rem;
}

/* ---------- Kepala hasil ---------- */

.hx-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem 1.2rem;
    margin-bottom: 1.2rem;
}

.hx-result-title {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.25;
}

.hx-result-count {
    margin-top: 0.35rem;
    color: var(--hx-muted-2);
    font-size: 0.82rem;
}

/* ---------- Kartu artikel ---------- */

.hx-arc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.hx-arc {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    background: linear-gradient(168deg, var(--hx-panel-2), var(--hx-panel));
    transition: border-color 160ms ease, transform 160ms ease;
}

.hx-arc:hover {
    border-color: rgba(212, 175, 55, 0.36);
    transform: translateY(-2px);
}

.hx-arc-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(122, 31, 31, 0.24), rgba(212, 175, 55, 0.1));
}

.hx-arc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.hx-arc:hover .hx-arc-cover img {
    transform: scale(1.03);
}

.hx-arc-cover-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(212, 175, 55, 0.55);
    font-size: 1.8rem;
}

.hx-arc-flag {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    background: rgba(8, 8, 9, 0.82);
    color: var(--hx-gold-soft);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hx-arc-flag.is-hot {
    border-color: rgba(168, 50, 50, 0.65);
    color: #e7a3a3;
}

.hx-arc-flag.is-warning {
    border-color: rgba(217, 139, 95, 0.55);
    color: #e5a97f;
}

.hx-arc-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1rem;
}

.hx-arc-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.7rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hx-arc-cat {
    color: var(--hx-gold);
}

.hx-arc-country {
    color: var(--hx-muted-2);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

.hx-arc-country:hover {
    color: var(--hx-gold-soft);
}

.hx-arc-title {
    font-size: 1.05rem;
    line-height: 1.35;
}

.hx-arc-title a {
    color: var(--hx-text);
}

.hx-arc-title a:hover {
    color: var(--hx-gold-soft);
}

.hx-arc-text {
    margin-top: 0.5rem;
    color: var(--hx-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.hx-arc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.9rem;
    margin-top: 0.75rem;
    color: var(--hx-muted-2);
    font-size: 0.72rem;
}

.hx-arc-meta .bi {
    color: var(--hx-gold);
}

.hx-arc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.9rem;
}

.hx-arc-arrow {
    color: var(--hx-muted-2);
    font-size: 0.85rem;
}

.hx-arc:hover .hx-arc-arrow {
    color: var(--hx-gold);
}

/* ---------- Kosong ---------- */

.hx-empty {
    padding: clamp(1.6rem, 4vw, 2.6rem);
    border: 1px dashed var(--hx-border-strong);
    border-radius: var(--hx-radius);
    background: rgba(20, 20, 22, 0.55);
    text-align: center;
}

.hx-empty-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.9rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    color: var(--hx-gold);
    font-size: 1.3rem;
}

.hx-empty-title {
    font-size: 1.25rem;
}

.hx-empty-text {
    max-width: 56ch;
    margin: 0.5rem auto 0;
    color: var(--hx-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.hx-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1.3rem;
}

/* ---------- Paginasi ---------- */

.hx-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--hx-border);
}

.hx-pager-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 2.2rem;
    padding: 0.42rem 0.6rem;
    border: 1px solid var(--hx-border);
    border-radius: 8px;
    color: var(--hx-muted);
    font-family: var(--hx-mono);
    font-size: 0.78rem;
    justify-content: center;
}

.hx-pager-link:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--hx-gold-soft);
}

.hx-pager-link.is-current {
    border-color: rgba(212, 175, 55, 0.75);
    background: rgba(212, 175, 55, 0.12);
    color: var(--hx-gold-soft);
}

.hx-pager-link.is-nav {
    font-family: var(--hx-sans);
    font-size: 0.76rem;
    padding-inline: 0.7rem;
}

.hx-pager-gap {
    padding-inline: 0.3rem;
    color: var(--hx-muted-2);
}

/* ---------- Kategori ---------- */

.hx-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hx-cat-card {
    display: flex;
    flex-direction: column;
    padding: 1.3rem;
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    background: linear-gradient(168deg, var(--hx-panel-2), var(--hx-panel));
}

.hx-cat-card-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.hx-cat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--hx-gold);
    font-size: 1.2rem;
}

.hx-cat-icon.is-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 1.7rem;
}

.hx-cat-title {
    font-size: 1.15rem;
    line-height: 1.3;
}

.hx-cat-title a {
    color: var(--hx-text);
}

.hx-cat-title a:hover {
    color: var(--hx-gold-soft);
}

.hx-cat-count {
    display: block;
    margin-top: 0.2rem;
    color: var(--hx-muted-2);
    font-family: var(--hx-mono);
    font-size: 0.7rem;
}

.hx-cat-desc {
    margin-top: 0.8rem;
    color: var(--hx-muted);
    font-size: 0.85rem;
    line-height: 1.65;
}

.hx-cat-children {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.hx-cat-children li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.6rem;
    border: 1px solid var(--hx-border);
    border-radius: 999px;
    font-size: 0.74rem;
}

.hx-cat-children a {
    color: var(--hx-muted);
}

.hx-cat-children span {
    color: var(--hx-muted-2);
    font-family: var(--hx-mono);
    font-size: 0.66rem;
}

.hx-cat-card .hx-link-arrow {
    margin-top: auto;
    padding-top: 0.9rem;
    font-size: 0.8rem;
}

.hx-cat-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
}

.hx-subcat-bar,
.hx-century-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}

.hx-subcat-label {
    margin-right: 0.2rem;
    color: var(--hx-muted-2);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Negara ---------- */

.hx-inline-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem;
    max-width: 760px;
    margin-top: 1.5rem;
}

.hx-inline-filter .hx-search-field,
.hx-inline-filter .hx-field {
    flex: 1 1 200px;
    min-width: 0;
}

.hx-inline-filter .hx-field {
    display: grid;
    gap: 0.3rem;
}

.hx-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.7rem;
}

.hx-country-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.7);
    color: var(--hx-text);
    transition: border-color 150ms ease, transform 150ms ease;
}

.hx-country-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--hx-text);
    transform: translateY(-1px);
}

.hx-country-flag {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--hx-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 1.25rem;
    line-height: 1;
}

.hx-country-flag.is-large {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    font-size: 2rem;
}

.hx-country-body {
    min-width: 0;
    flex: 1 1 auto;
}

.hx-country-name {
    display: block;
    font-family: var(--hx-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.hx-country-meta {
    display: block;
    margin-top: 0.12rem;
    color: var(--hx-muted-2);
    font-size: 0.7rem;
}

.hx-country-count {
    flex: 0 0 auto;
    color: var(--hx-muted-2);
    font-size: 0.64rem;
    text-align: right;
    line-height: 1.35;
}

.hx-country-count strong {
    display: block;
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 0.9rem;
}

/* ---------- Tokoh ---------- */

.hx-figure-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.8rem;
}

.hx-figure-card-link {
    color: inherit;
    transition: border-color 150ms ease, transform 150ms ease;
}

.hx-figure-card-link:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: inherit;
    transform: translateY(-1px);
}

.hx-figure-index-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    margin-top: 0.45rem;
    color: var(--hx-muted-2);
    font-size: 0.7rem;
}

.hx-figure-index-meta .bi {
    color: var(--hx-gold);
}

.hx-figure-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
}

.hx-figure-hero-portrait {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    color: var(--hx-gold);
    font-family: var(--hx-serif);
    font-size: 3rem;
}

.hx-figure-hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hx-figure-hero-life {
    margin-top: 0.4rem;
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 0.85rem;
}

.hx-figure-hero-credit {
    margin-top: 0.8rem;
    color: var(--hx-muted-2);
    font-size: 0.74rem;
    line-height: 1.6;
}

.hx-figure-hero-credit span {
    display: block;
}

.hx-source-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.hx-source {
    display: flex;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.65);
}

.hx-source-type {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 0.16rem 0.5rem;
    border: 1px solid var(--hx-border-strong);
    border-radius: 999px;
    color: var(--hx-gold);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hx-source-body {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.55;
}

.hx-source-title {
    color: var(--hx-text);
    font-weight: 600;
}

.hx-source-meta,
.hx-source-article {
    color: var(--hx-muted-2);
    font-size: 0.75rem;
}

.hx-source-article a {
    color: var(--hx-gold-soft);
}

/* ---------- Timeline ---------- */

.hx-timeline {
    display: grid;
    gap: 1.6rem;
}

.hx-tl-century-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hx-border);
}

.hx-tl-century-title {
    color: var(--hx-gold-soft);
    font-size: 1.15rem;
}

.hx-tl-century-count {
    color: var(--hx-muted-2);
    font-family: var(--hx-mono);
    font-size: 0.7rem;
}

.hx-tl-list {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.15rem;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.hx-tl-list::before {
    content: "";
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    left: 0.3rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.05));
}

.hx-tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.6);
}

.hx-tl-item::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: -1.02rem;
    width: 9px;
    height: 9px;
    border: 1px solid var(--hx-gold);
    border-radius: 50%;
    background: var(--hx-bg);
}

.hx-tl-year {
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
}

.hx-tl-title {
    font-size: 1rem;
    line-height: 1.4;
}

.hx-tl-title a {
    color: var(--hx-text);
}

.hx-tl-title a:hover {
    color: var(--hx-gold-soft);
}

.hx-tl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.8rem;
    margin-top: 0.25rem;
    color: var(--hx-muted-2);
    font-size: 0.72rem;
}

.hx-tl-meta a {
    color: var(--hx-muted);
}

.hx-tl-meta a:hover {
    color: var(--hx-gold);
}

.hx-tl-text {
    margin-top: 0.35rem;
    color: var(--hx-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.hx-mini-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.hx-mini-timeline li {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: 0.55rem 0.8rem;
    border-left: 2px solid rgba(212, 175, 55, 0.45);
    background: rgba(20, 20, 22, 0.45);
}

.hx-mini-time {
    flex: 0 0 80px;
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 0.76rem;
}

.hx-mini-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.7rem;
    font-size: 0.86rem;
}

.hx-mini-body a {
    color: var(--hx-text);
}

.hx-mini-body a:hover {
    color: var(--hx-gold-soft);
}

.hx-mini-meta {
    color: var(--hx-muted-2);
    font-size: 0.72rem;
}

/* ---------- Istilah populer & tautan cepat ---------- */

.hx-term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.hx-term-block {
    padding: 1.1rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.6);
}

.hx-term-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--hx-sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hx-term-title .bi {
    color: var(--hx-gold);
}

.hx-term-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.hx-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.hx-quick-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.55);
    color: var(--hx-text);
}

.hx-quick-link:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--hx-text);
}

.hx-quick-link > .bi {
    color: var(--hx-gold);
    font-size: 1.1rem;
}

.hx-quick-link span {
    display: grid;
    line-height: 1.3;
}

.hx-quick-link strong {
    font-size: 0.86rem;
    font-weight: 650;
}

.hx-quick-link small {
    color: var(--hx-muted-2);
    font-size: 0.7rem;
}

/* ---------- Beranda dinamis ---------- */

.hx-home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.6rem;
    margin-top: 1.6rem;
    color: var(--hx-muted-2);
    font-size: 0.8rem;
}

.hx-hero-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
}

.hx-home-stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.hx-home-stats strong {
    color: var(--hx-gold-soft);
    font-family: var(--hx-mono);
    font-size: 1.05rem;
}

.hx-feature-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
}

.hx-feature-main {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 340px;
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    background: linear-gradient(180deg, rgba(20, 20, 22, 0.2), rgba(11, 11, 12, 0.96));
    color: var(--hx-text);
}

.hx-feature-main:hover {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--hx-text);
}

.hx-feature-main-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hx-feature-main-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hx-feature-main-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 7, 8, 0.15) 15%, rgba(7, 7, 8, 0.92) 78%);
}

.hx-feature-main-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: auto;
    padding: 1.4rem;
}

.hx-feature-main-title {
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
    line-height: 1.25;
}

.hx-feature-main-text {
    color: var(--hx-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.hx-feature-side {
    display: grid;
    gap: 0.7rem;
}

.hx-feature-item {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--hx-border);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.66);
    color: var(--hx-text);
}

.hx-feature-item:hover {
    border-color: rgba(212, 175, 55, 0.38);
    color: var(--hx-text);
}

.hx-feature-thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.08);
}

.hx-feature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hx-feature-thumb span {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--hx-gold);
}

.hx-feature-item-body {
    min-width: 0;
}

.hx-feature-item-meta,
.hx-feature-item-title {
    display: block;
}

.hx-feature-item-meta {
    color: var(--hx-gold);
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hx-feature-item-title {
    margin-top: 0.15rem;
    font-family: var(--hx-serif);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.hx-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.8rem;
}

.hx-topic-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(168, 50, 50, 0.34);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(122, 31, 31, 0.18), rgba(20, 20, 22, 0.65));
    color: var(--hx-text);
}

.hx-topic-card:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--hx-text);
}

.hx-topic-card-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #e7a3a3;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hx-topic-card-title {
    font-family: var(--hx-serif);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
}

.hx-topic-card-text {
    color: var(--hx-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.hx-country-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hx-country-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--hx-border);
    border-radius: 999px;
    background: rgba(20, 20, 22, 0.6);
    color: var(--hx-text);
    font-size: 0.82rem;
}

.hx-country-chip:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--hx-gold-soft);
}

.hx-country-chip .hx-country-flag {
    width: 26px;
    height: 20px;
    border: 0;
    background: transparent;
    font-size: 0.95rem;
}

.hx-country-chip small {
    color: var(--hx-muted-2);
    font-family: var(--hx-mono);
    font-size: 0.66rem;
}

.hx-tech {
    margin-top: 2rem;
    border: 1px solid var(--hx-border);
    border-radius: var(--hx-radius);
    background: rgba(20, 20, 22, 0.5);
}

.hx-tech summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    color: var(--hx-muted);
    font-size: 0.84rem;
    list-style: none;
}

.hx-tech summary::-webkit-details-marker {
    display: none;
}

.hx-tech summary .bi-chevron-down {
    margin-left: auto;
    transition: transform 150ms ease;
}

.hx-tech[open] summary .bi-chevron-down {
    transform: rotate(180deg);
}

.hx-tech-body {
    padding: 0 1.2rem 1.2rem;
}

/* ---------- Responsif ---------- */

@media (max-width: 991.98px) {
    .hx-discovery-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-discovery-aside {
        position: static;
    }

    .hx-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-feature-main {
        min-height: 280px;
    }
}

@media (max-width: 767.98px) {
    .hx-page-hero {
        padding-block: 2rem;
    }

    .hx-cat-hero,
    .hx-figure-hero {
        flex-direction: column;
        gap: 1rem;
    }

    .hx-figure-hero-portrait {
        width: 96px;
        height: 96px;
        font-size: 2.2rem;
    }

    .hx-tl-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }

    .hx-tl-year {
        font-size: 0.78rem;
    }

    .hx-filter-row {
        grid-template-columns: 1fr;
    }

    .hx-arc-grid,
    .hx-figure-index,
    .hx-cat-grid,
    .hx-country-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-pager-link.is-nav {
        font-size: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .hx-inline-filter {
        align-items: stretch;
    }

    .hx-inline-filter .hx-search-field,
    .hx-inline-filter .hx-field,
    .hx-inline-filter .hx-btn {
        flex: 1 1 100%;
    }

    .hx-page-stats {
        gap: 0.4rem 1rem;
    }

    .hx-feature-thumb {
        width: 64px;
        height: 52px;
    }

    .hx-source {
        flex-direction: column;
        gap: 0.35rem;
    }

    .hx-mini-timeline li {
        flex-direction: column;
        gap: 0.1rem;
    }

    .hx-mini-time {
        flex-basis: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx-arc,
    .hx-arc-cover img,
    .hx-country-card,
    .hx-figure-card-link,
    .hx-tech summary .bi-chevron-down {
        transition: none;
    }
}
