/* ============================================================
   House of Afghanistan — interactive history timeline
   Card + clickable era-ribbon UX. Tokens from home.css.
   ============================================================ */
.htl-sec { background: var(--slate-deep); padding: clamp(96px, 12vw, 168px) 0; overflow: hidden; }
.htl-wrap { max-width: var(--maxw, 1180px); margin: 0 auto; padding: 0 40px; }
.htl-head { display: flex; flex-direction: column; gap: 16px; max-width: 64ch; margin-bottom: clamp(40px, 5vw, 64px); }
.htl-eyebrow { font-family: var(--caps); font-weight: 500; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--champagne); display: inline-flex; align-items: center; gap: 12px; }
.htl-eyebrow .n { color: var(--champagne); opacity: .7; }
.htl-title { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -.02em; color: var(--ivory); }
.htl-title em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }
.htl-sub { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.6; color: var(--on-dark-mut); max-width: 60ch; }

.tlx { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }

/* the card */
.tlx__card { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 72px); height: clamp(390px, 40vw, 440px); align-items: start; transition: opacity .16s var(--ease); }
.tlx__card.is-sw { opacity: 0; }
.tlx__main { display: flex; flex-direction: column; gap: 9px; }
.tlx__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 2px; }
.tlx__era { display: inline-flex; align-items: center; gap: 9px; font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-mut); }
.tlx__era-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--era, var(--champagne)); transition: background .3s var(--ease); }
.tlx__count { font-family: var(--caps); font-size: 11px; letter-spacing: .18em; color: var(--champagne); opacity: .7; }
.tlx__date { font-family: var(--caps); font-size: 13px; letter-spacing: .12em; color: var(--champagne); margin-top: 4px; }
.tlx__name { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -.02em; color: var(--ivory); }
.tlx__name em { font-style: italic; font-weight: 400; color: var(--champagne-soft); }
.tlx__region { font-family: var(--font-sans, 'Inter', sans-serif); font-size: 13px; line-height: 1.45; color: var(--champagne-soft); opacity: .85; }
.tlx__sig { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.6; color: #D7DEE2; max-width: 56ch; }
.tlx__world { margin-top: 8px; display: flex; gap: 12px; align-items: baseline; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.45; color: var(--on-dark-mut); opacity: .82; }
.tlx__world b { font-style: normal; font-family: var(--caps); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); opacity: .9; flex: 0 0 auto; align-self: center; }

.tlx__facts { display: flex; flex-direction: column; gap: 16px; padding-left: clamp(0px, 3vw, 40px); border-left: 1px solid rgba(199,164,104,.16); }

.tlx__facts-h { font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); }
.tlx__key { display: flex; flex-direction: column; gap: 4px; }
.tlx__key-l { font-family: var(--caps); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne-soft); opacity: .85; }
.tlx__key-v { font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #DCE2E5; }
.tlx__key[data-k="tid"] .tlx__key-v { color: var(--ivory); font-size: 17px; }

/* nav: prev / ribbon / next */
.tlx__nav { display: flex; align-items: center; gap: 18px; }
.tlx__btn { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 999px; border: 1px solid rgba(199,164,104,.42); background: transparent; color: var(--champagne); font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.tlx__btn:hover:not(:disabled) { background: var(--champagne); color: var(--slate-deep); border-color: var(--champagne); }
.tlx__btn:disabled { opacity: .28; cursor: default; }
.tlx__ribbon { flex: 1; position: relative; display: flex; gap: 2px; height: 46px; align-items: stretch; cursor: pointer; touch-action: none; }
.tlx__seg { flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: var(--era); opacity: .26; border-radius: 2px; cursor: pointer; transition: opacity .18s var(--ease), transform .18s var(--ease); }
.tlx__seg:hover { opacity: .6; }
.tlx__seg.is-active { opacity: 1; transform: scaleY(1.16); }

.tlx__ends { display: flex; justify-content: space-between; font-family: var(--caps); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-mut); padding: 0 68px; }

/* world-event anchors above the ribbon — labels on top, lines pointing DOWN to the scale */
.tlx__wrail { position: relative; height: 92px; margin: 0 68px 8px; }
.tlx__wmk { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 122px; text-align: center; pointer-events: none; }
.tlx__wmk-tick { width: 1px; background: rgba(199,164,104,.5); }
.tlx__wmk--hi .tlx__wmk-tick { height: 14px; }
.tlx__wmk--lo .tlx__wmk-tick { height: 52px; }
.tlx__wmk-d { font-family: var(--caps); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne); opacity: .9; }
.tlx__wmk-l { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.2; color: var(--on-dark-mut); }

.tlx__legend { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: clamp(24px, 3vw, 36px); }
.tlx__leg { display: inline-flex; align-items: center; gap: 11px; font-family: var(--caps); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark); opacity: .9; }
.tlx__leg::before { content: ""; width: 13px; height: 13px; border-radius: 999px; background: var(--era); }

.tlx:focus-visible { outline: none; }
.tlx:focus-visible .tlx__ribbon { box-shadow: 0 0 0 3px rgba(199,164,104,.25); border-radius: 4px; }

@media (max-width: 760px) {
  .tlx__card { grid-template-columns: 1fr; gap: 26px; height: auto; min-height: 0; }
  .tlx__facts { padding-left: 0; border-left: 0; border-top: 1px solid rgba(199,164,104,.16); padding-top: 22px; }
  .tlx__ends { padding: 0; }
  .tlx__wrail { margin: 8px 50px 0; height: 84px; }
  .tlx__wmk { width: 84px; }
  .tlx__wmk-l { font-size: 12px; }
  .tlx__btn { width: 44px; height: 44px; font-size: 21px; }
  .tlx__ribbon { height: 40px; }
}
