/* ============================================================
   APEX MARKET MENTOR & ADVISER — Heritage theme
   Private-bank editorial layer on top of styles.css: Cormorant
   Garamond display type, deep green + antique gold, photography
   and live PSX market sections. Pages opt in with <body class="hx">.
   ============================================================ */

/* ---------- Heritage tokens ---------- */
:root {
  --hx-green: #032a1d;      /* deepest green — dark sections */
  --hx-green-2: #0a4a33;
  --hx-green-3: #021f15;    /* footer / under-hero */
  --hx-cream: #f7f2e6;      /* page ground */
  --hx-parchment: #efe8d6;  /* alternating band */
  --hx-paper: #fbf7ec;      /* cards and chart paper */
  --hx-rule: #ddd2b4;       /* hairlines on cream */
  --hx-rule-2: #e6dcc2;
  --hx-gold: #c9a24b;
  --hx-gold-bright: #dcb765;
  --hx-gold-ink: #7c5e17;   /* gold text on cream (AA) */
  --hx-ink: #1c2a22;
  --hx-ink-muted: #4b5a51;
  --hx-on-dark: #f7f2e6;
  --hx-on-dark-muted: #d9d2bd;
  --hx-up: #1f7a55;         /* gains on cream */
  --hx-down: #a8552b;       /* losses on cream */
  --hx-up-dark: #8fd8b0;    /* gains on green */
  --hx-down-dark: #e39a72;  /* losses on green */
  --hx-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Page ground + type ---------- */
body.hx { background: var(--hx-cream); color: var(--hx-ink); }
.hx h1, .hx h2, .hx .hx-serif { font-family: var(--hx-serif); font-weight: 500; letter-spacing: -0.005em; }
.hx-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--hx-gold-ink);
}
.hx-eyebrow--rule::before, .hx-eyebrow--rule::after { content: ""; width: 44px; height: 1px; background: var(--hx-gold); }
.hx-on-dark .hx-eyebrow, .hx-eyebrow--light { color: var(--hx-gold-bright); }
.hx-title { font-size: clamp(2.2rem, 4.4vw, 3.75rem); line-height: 1.02; color: var(--hx-green); margin: 0; }
.hx-title em { font-style: italic; color: var(--hx-gold-ink); }
.hx-on-dark .hx-title { color: var(--hx-on-dark); }
.hx-on-dark .hx-title em { color: var(--hx-gold-bright); }
.hx-lead { font-size: 1.06rem; line-height: 1.8; color: var(--hx-ink-muted); }
.hx-on-dark .hx-lead { color: var(--hx-on-dark-muted); }
.hx-section { padding: 120px 0; }
.hx-section--parchment { background: var(--hx-parchment); border-top: 1px solid var(--hx-rule); border-bottom: 1px solid var(--hx-rule); }
.hx-section--dark { background: var(--hx-green); color: var(--hx-on-dark); }
.hx-head { display: flex; flex-wrap: wrap; gap: 20px 64px; align-items: flex-end; justify-content: space-between; margin-bottom: 56px; }
.hx-head > div { flex: 1 1 520px; display: flex; flex-direction: column; gap: 16px; }
.hx-head > p { flex: 0 1 420px; margin: 0; }
.hx-head--center { flex-direction: column; align-items: center; text-align: center; }
.hx-head--center > div { flex: none; align-items: center; max-width: 760px; }

/* ---------- Buttons ---------- */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 32px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid transparent; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .18s ease;
}
.hx-btn:hover { transform: translateY(-1px); }
.hx-btn--gold { background: var(--hx-gold); color: var(--hx-green); }
.hx-btn--gold:hover { background: var(--hx-gold-bright); }
.hx-btn--line-light { border-color: rgba(247,242,230,.55); color: var(--hx-on-dark); }
.hx-btn--line-light:hover { border-color: var(--hx-gold-bright); color: var(--hx-gold-bright); }
.hx-btn--green { background: var(--hx-green); color: var(--hx-on-dark); }
.hx-btn--green:hover { background: var(--hx-green-2); }
.hx-btn--line { border-color: var(--hx-green); color: var(--hx-green); }
.hx-btn--line:hover { background: var(--hx-green); color: var(--hx-on-dark); }
.hx-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header: deep green on Heritage pages ---------- */
.hx .site-header { background: rgba(3,42,29,.97); border-bottom: 1px solid rgba(201,162,75,.35); }
.hx .site-header .brand-name { color: var(--hx-on-dark); font-family: var(--hx-serif); font-weight: 600; letter-spacing: .16em; font-size: 1.32rem; }
.hx .site-header .brand-sub { color: var(--hx-gold-bright); }
.hx .site-header .btn-primary { background: var(--hx-gold); color: var(--hx-green); box-shadow: none; border-radius: 0; letter-spacing: .06em; }
.hx .site-header .btn-primary:hover { background: var(--hx-gold-bright); }
.hx .nav-toggle { background: transparent; border-color: rgba(201,162,75,.6); color: var(--hx-gold-bright); }
@media (min-width: 1152px) {
  .hx .nav-link { color: var(--hx-on-dark-muted); }
  .hx .nav-link:hover { color: var(--hx-on-dark); background: rgba(247,242,230,.08); }
  .hx .nav-link.active { color: var(--hx-gold-bright); }
}
.hx .psx-ticker-label { letter-spacing: .2em; }
.hx .site-footer { margin-top: 0; background: var(--hx-green-3); border-top: 1px solid rgba(201,162,75,.3); }
.hx .site-footer .brand-name { font-family: var(--hx-serif); font-weight: 600; letter-spacing: .16em; }
.hx .footer-col h4 { font-family: var(--hx-serif); font-size: 1.2rem; font-weight: 500; color: var(--hx-gold-bright); }

/* ---------- Photo hero ---------- */
.hx-hero { position: relative; isolation: isolate; color: var(--hx-on-dark); background: var(--hx-green); overflow: hidden; }
.hx-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hx-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(3,42,29,.9) 0%, rgba(3,42,29,.6) 45%, rgba(3,42,29,.95) 100%);
}
.hx-hero__inner { max-width: 1000px; margin: 0 auto; padding: 104px 24px 80px; display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.hx-hero__emblem { width: 104px; height: 104px; object-fit: contain; }
.hx-hero h1 { font-size: clamp(3rem, 7vw, 6.6rem); line-height: .96; color: var(--hx-on-dark); margin: 0; }
.hx-hero h1 em { color: var(--hx-gold-bright); }
.hx-hero__sub { margin: 0; max-width: 640px; font-size: 1.12rem; line-height: 1.7; color: #e6dfca; }
.hx-hero .hx-btns { justify-content: center; }
.hx-hero--page .hx-hero__inner { padding: 72px 24px 88px; }
.hx-hero--page h1 { font-size: clamp(2.8rem, 6.4vw, 6rem); }
.hx-crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--hx-on-dark-muted); }
.hx-crumbs a:hover { color: var(--hx-on-dark); }
.hx-crumbs [aria-current] { color: var(--hx-gold-bright); }

/* ---------- KSE-100 chart band (live ApexChart) ---------- */
.hx-chartband { margin: 0; background: var(--hx-green); border-top: 1px solid rgba(201,162,75,.35); }
.hx-chartband__head {
  max-width: 1240px; margin: 0 auto; padding: 28px 24px 8px;
  display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; justify-content: space-between;
}
.hx-chartband__label { display: flex; flex-direction: column; gap: 6px; }
.hx-chartband__label .hx-eyebrow { color: var(--hx-gold-bright); }
.hx-chartband__range { font-family: var(--hx-serif); font-size: 30px; color: var(--hx-on-dark); }
.hx-chartband__figures { display: flex; align-items: baseline; flex-wrap: wrap; gap: 18px; }
.hx-chartband__span { font-size: 14px; color: #c9b98a; font-variant-numeric: tabular-nums; }
.hx-chartband__change { font-family: var(--hx-serif); font-size: 56px; line-height: 1; color: var(--hx-gold-bright); }
.hx-chartband__chart { height: 460px; }
.hx-toolbar--band { max-width: 1240px; margin: 8px auto 0; padding: 8px 24px; background: transparent; border-top: 1px solid rgba(201,162,75,.18); }
.hx-chartband__chart:empty, .hx-chartcard__chart:empty { display: grid; place-items: center; }
.hx-chartband__chart:empty::after, .hx-chartcard__chart:empty::after {
  content: "Loading live PSX data…"; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #6b7a70;
}
.hx-chartband__chart:empty::after { color: #c9b98a; }
.hx-chartband__cap { max-width: 1240px; margin: 0 auto; padding: 0 24px 18px; font-size: 12px; letter-spacing: .06em; color: #c9b98a; }

/* ---------- Stat row ---------- */
.hx-stats { background: var(--hx-green); border-top: 1px solid rgba(201,162,75,.35); }
.hx-stats__grid { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hx-stat { padding: 30px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.hx-stat + .hx-stat { border-left: 1px solid rgba(201,162,75,.2); }
.hx-stat__num { font-family: var(--hx-serif); font-size: 48px; line-height: 1; color: var(--hx-gold-bright); }
.hx-stat__label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--hx-on-dark-muted); }

/* ---------- Split with framed photo pair ---------- */
.hx-split { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hx-split > * { flex: 1 1 440px; min-width: 0; }
.hx-split__copy { display: flex; flex-direction: column; gap: 24px; }
.hx-pair { position: relative; padding-bottom: 48px; }
.hx-pair__main, .hx-pair__inset { height: auto; }
.hx-pair__main { display: block; width: 86%; aspect-ratio: 4 / 5; max-height: 560px; object-fit: cover; outline: 1px solid var(--hx-gold); outline-offset: 12px; }
.hx-pair__inset { position: absolute; right: 0; bottom: 0; width: 50%; aspect-ratio: 3 / 2; object-fit: cover; border: 8px solid var(--hx-cream); box-shadow: 0 25px 50px -12px rgba(3,42,29,.35); }
.hx-pair--wide .hx-pair__main { aspect-ratio: 4 / 3; }
.hx-pullquote { margin: 0; padding-left: 24px; border-left: 1px solid var(--hx-gold); font-family: var(--hx-serif); font-style: italic; font-size: 1.75rem; line-height: 1.3; color: var(--hx-green); }
.hx-textlink { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #0b6141; }
.hx-textlink:hover { color: var(--hx-green); }

/* ---------- Market Ledger ---------- */
.hx-ledger { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.hx-chartcard {
  flex: 1 1 620px; min-width: 0; margin: 0; background: var(--hx-paper);
  outline: 1px solid var(--hx-gold); outline-offset: 8px; box-shadow: 0 25px 50px -12px rgba(3,42,29,.25);
  display: flex; flex-direction: column;
}
.hx-chartcard--white { background: #fff; }
.hx-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--hx-green); font-size: 12px; color: #e6dfca; }
.hx-toolbar__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chip { padding: 5px 10px; border: 1px solid rgba(201,162,75,.4); }
.hx-chip--gold { color: var(--hx-gold-bright); }
.hx-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(201,162,75,.18); color: var(--hx-gold-bright); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.hx-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse-dot 1.4s ease-in-out infinite; }
.hx-chartcard__chart { flex: 1; min-height: 460px; }

/* Toolbar controls (real buttons/selects bound by heritage-market.js) */
.hx-select, .hx-seg button, .hx-tool {
  min-height: 32px; padding: 4px 10px; font: inherit; font-size: 12px; color: #e6dfca;
  background: transparent; border: 1px solid rgba(201,162,75,.4); border-radius: 0; cursor: pointer;
}
.hx-select { padding-right: 24px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #dcb765 50%), linear-gradient(135deg, #dcb765 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.hx-select option { color: #0e1b15; background: #fff; }
.hx-seg { display: inline-flex; }
.hx-seg button + button { border-left: none; }
.hx-seg button[aria-pressed="true"], .hx-tool[aria-pressed="true"] { background: var(--hx-gold); color: var(--hx-green); border-color: var(--hx-gold); }
.hx-tool--gold { color: var(--hx-gold-bright); }
.hx-select:hover, .hx-seg button:hover, .hx-tool:hover { border-color: var(--hx-gold-bright); color: #fff; }
.hx-seg button[aria-pressed="true"]:hover, .hx-tool[aria-pressed="true"]:hover { color: var(--hx-green); }
.hx-select:focus-visible, .hx-seg button:focus-visible, .hx-tool:focus-visible { outline: 2px solid var(--hx-gold-bright); outline-offset: 1px; }
.hx-live.is-snapshot::before { background: #c9a24b; animation: none; }
.hx-chartcard:fullscreen, .hx-chartband:fullscreen { display: flex; flex-direction: column; background: var(--hx-green); outline: none; }
.hx-chartcard:fullscreen .hx-chartcard__chart, .hx-chartband:fullscreen .hx-chartband__chart { flex: 1; height: auto; }
.hx-q-link { display: block; color: inherit; }
.hx-q-link:hover .hx-q-sym { text-decoration: underline; text-decoration-color: var(--hx-gold); text-underline-offset: 3px; }
.hx-quotes tr:hover td { background: rgba(201,162,75,.08); }
.hx-chartcard__cap { padding: 12px 16px; border-top: 1px solid var(--hx-rule-2); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; color: var(--hx-ink-muted); font-variant-numeric: tabular-nums; }
.hx-chartcard__cap strong { color: var(--hx-up); }
.hx-chartcard__cap strong.is-down { color: var(--hx-down); }
.hx-quotes { flex: 1 1 380px; min-width: 0; background: var(--hx-paper); border: 1px solid var(--hx-rule); display: flex; flex-direction: column; }
.hx-quotes__head { padding: 18px 20px; border-bottom: 1px solid var(--hx-gold); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hx-quotes__title { font-family: var(--hx-serif); font-size: 26px; color: var(--hx-green); }
.hx-quotes__stamp { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--hx-gold-ink); }
.hx-quotes table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hx-quotes td { padding: 11px 8px; border-bottom: 1px solid var(--hx-rule-2); }
.hx-quotes td:first-child { padding-left: 20px; }
.hx-quotes td:last-child { padding-right: 20px; text-align: right; }
.hx-quotes tr.is-index-end td { border-bottom-color: var(--hx-gold); }
.hx-q-sym { font-weight: 600; letter-spacing: .06em; color: var(--hx-green); }
.hx-q-name { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--hx-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.hx-q-price { text-align: right; }
.hx-q-chg.up { color: var(--hx-up); }
.hx-q-chg.down { color: var(--hx-down); }
.hx-quotes__actions { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--hx-gold); display: flex; flex-wrap: wrap; gap: 10px; }
.hx-quotes__actions .hx-btn { flex: 1 1 160px; min-height: 48px; padding: 0 16px; font-size: 12px; }
.hx-note { margin: 32px 0 0; font-size: 13px; color: var(--hx-ink-muted); }

/* ---------- Photo strip ---------- */
.hx-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--hx-green); }
.hx-strip figure { margin: 0; position: relative; height: 420px; overflow: hidden; }
.hx-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hx-strip figure:hover img { transform: scale(1.03); }
.hx-strip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 28px 24px;
  background: linear-gradient(180deg, rgba(3,42,29,0), rgba(3,42,29,.92)); color: var(--hx-on-dark);
  display: flex; flex-direction: column; gap: 4px;
}
.hx-strip figcaption span:first-child { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--hx-gold-bright); }
.hx-strip figcaption span:last-child { font-family: var(--hx-serif); font-size: 26px; }

/* ---------- Service cards with photos ---------- */
.hx-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.hx-service { display: flex; flex-direction: column; background: var(--hx-cream); border: 1px solid var(--hx-rule); color: var(--hx-ink); transition: transform .22s ease, box-shadow .22s ease; }
.hx-service:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -18px rgba(3,42,29,.35); }
.hx-service img { width: 100%; height: 220px; object-fit: cover; display: block; }
.hx-service__body { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--hx-gold); }
.hx-service__num { font-family: var(--hx-serif); font-size: 20px; color: var(--hx-gold-ink); }
.hx-service h3 { font-family: var(--hx-serif); font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--hx-green); margin: 0; }
.hx-service p { margin: 0; line-height: 1.7; color: var(--hx-ink-muted); }

/* ---------- Full-bleed photo quote ---------- */
.hx-photoquote { position: relative; isolation: isolate; color: var(--hx-on-dark); background: var(--hx-green); }
.hx-photoquote img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hx-photoquote::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(3,42,29,.76); }
.hx-photoquote figure { max-width: 960px; margin: 0 auto; padding: 150px 24px; display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.hx-photoquote blockquote { margin: 0; font-family: var(--hx-serif); font-style: italic; font-size: clamp(2rem, 4.4vw, 3.75rem); line-height: 1.15; }
.hx-photoquote figcaption { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--hx-gold-bright); }
.hx-rule-gold { width: 64px; height: 1px; background: var(--hx-gold); }

/* ---------- Values / ruled list ---------- */
.hx-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.hx-value { padding: 24px 0; border-top: 1px solid var(--hx-gold); display: flex; flex-direction: column; gap: 6px; }
.hx-value h3 { font-family: var(--hx-serif); font-weight: 500; font-size: 26px; color: var(--hx-green); margin: 0; }
.hx-value p { margin: 0; line-height: 1.7; color: var(--hx-ink-muted); }
.hx-framed { width: 100%; height: 300px; object-fit: cover; outline: 1px solid var(--hx-gold); outline-offset: 10px; }

/* ---------- Closing CTA split ---------- */
.hx-close { background: var(--hx-green); color: var(--hx-on-dark); display: flex; flex-wrap: wrap; }
.hx-close__copy { flex: 1 1 520px; min-width: 0; padding: 112px 48px; display: flex; flex-direction: column; gap: 24px; justify-content: center; }
.hx-close__copy > * { max-width: 560px; }
.hx-close img { flex: 1 1 480px; min-width: 0; height: auto; min-height: 520px; align-self: stretch; object-fit: cover; }

/* ---------- Academy: outcomes, curriculum, reasons ---------- */
.hx-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(201,162,75,.35); background: rgba(3,42,29,.6); }
.hx-outcome { padding: 36px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.hx-outcome + .hx-outcome { border-left: 1px solid rgba(201,162,75,.25); }
.hx-outcome span:first-child { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--hx-gold-bright); }
.hx-outcome span:last-child { font-family: var(--hx-serif); font-size: 26px; line-height: 1.2; }
.hx-ruled { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hx-gold); }
.hx-ruled li { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hx-rule); }
.hx-ruled__num { font-family: var(--hx-serif); font-size: 22px; color: var(--hx-gold-ink); width: 48px; flex-shrink: 0; }
.hx-ruled__text { flex: 1; font-family: var(--hx-serif); font-size: 26px; line-height: 1.2; color: var(--hx-green); }
.hx-ruled__tag { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--hx-ink-muted); }
.hx-reasons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--hx-gold); border-left: 1px solid var(--hx-rule); }
.hx-reasons > div { padding: 32px 24px; border-right: 1px solid var(--hx-rule); border-bottom: 1px solid var(--hx-rule); font-family: var(--hx-serif); font-size: 22px; line-height: 1.25; color: var(--hx-green); }

/* ---------- Pricing ---------- */
.hx-plans-wrap { position: relative; margin-top: -48px; }
.hx-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; outline: 1px solid var(--hx-gold); outline-offset: 8px; box-shadow: 0 25px 50px -12px rgba(3,42,29,.18); }
.hx-plan { padding: 48px 36px; display: flex; flex-direction: column; gap: 18px; text-align: center; align-items: center; }
.hx-plan + .hx-plan { border-left: 1px solid var(--hx-rule-2); }
.hx-plan__name { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--hx-gold-ink); }
.hx-plan__price { font-family: var(--hx-serif); font-size: 40px; line-height: 1.05; color: var(--hx-green); }
.hx-plan__period { font-size: 13px; color: var(--hx-ink-muted); }
.hx-plan__desc { margin: 0; line-height: 1.7; color: var(--hx-ink-muted); }
.hx-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--hx-ink); }
.hx-plan__note { margin: 0; font-size: 12px; color: var(--hx-ink-muted); }
.hx-plan .hx-btn { margin-top: auto; width: 100%; padding: 0 16px; }
.hx-plan--featured { background: var(--hx-green); color: var(--hx-on-dark); }
.hx-plan--featured .hx-plan__name { color: var(--hx-gold-bright); }
.hx-plan--featured .hx-plan__price { color: var(--hx-gold-bright); }
.hx-plan--featured .hx-plan__period, .hx-plan--featured .hx-plan__desc, .hx-plan--featured .hx-plan__note { color: var(--hx-on-dark-muted); }
.hx-plan--featured ul { color: var(--hx-on-dark); }
.hx-plan-notice { margin: 32px auto 0; text-align: center; font-family: var(--hx-serif); font-style: italic; font-size: 20px; color: var(--hx-ink-muted); }
.hx .plan-notice { margin-top: 24px; }
.hx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hx-gold); }
.hx-steps li { padding: 36px 32px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.hx-steps li + li { border-left: 1px solid var(--hx-rule); }
.hx-steps img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 12px; }
.hx-steps__num { font-family: var(--hx-serif); font-size: 48px; line-height: 1; color: var(--hx-gold-ink); }
.hx-steps h3 { font-family: var(--hx-serif); font-weight: 500; font-size: 28px; color: var(--hx-green); margin: 0; }
.hx-steps p { margin: 0; line-height: 1.7; color: var(--hx-ink-muted); }
.hx-faq { border-top: 1px solid var(--hx-gold); }
.hx-faq details { padding: 24px 0; border-bottom: 1px solid var(--hx-rule); }
.hx-faq summary { font-family: var(--hx-serif); font-size: 26px; color: var(--hx-green); cursor: pointer; min-height: 32px; list-style-position: outside; }
.hx-faq p { margin: 12px 0 0; line-height: 1.8; color: var(--hx-ink-muted); }
.hx-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hx-gold); font-variant-numeric: tabular-nums; }
.hx-figures > div { padding: 14px 0; border-bottom: 1px solid var(--hx-rule); }
.hx-figures > div + div { padding-left: 16px; border-left: 1px solid var(--hx-rule); }
.hx-figures span { display: block; }
.hx-figures span:first-child { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--hx-gold-ink); }
.hx-figures span:last-child { font-family: var(--hx-serif); font-size: 28px; color: var(--hx-green); }

/* ============================================================
   Legacy page components in Heritage dress
   The remaining pages keep their markup; these rules restyle the
   shared components so every page reads as one Heritage site.
   ============================================================ */
/* Pages pick their hero photo with style="--hx-hero-img: url('../img/heritage/x.jpg')"
   on <body>. The url() resolves against this stylesheet, not the page. */
.hx .page-hero {
  padding: 96px 0 88px; text-align: center; color: var(--hx-on-dark);
  background:
    linear-gradient(180deg, rgba(3,42,29,.9) 0%, rgba(3,42,29,.66) 50%, rgba(3,42,29,.95) 100%),
    var(--hx-hero-img, url("../img/heritage/reading-room.jpg")) center / cover no-repeat,
    var(--hx-green);
  border-bottom: 1px solid rgba(201,162,75,.35);
}
.hx .page-hero::before, .hx .page-hero::after { display: none; }
.hx .page-hero .container { display: flex; flex-direction: column; align-items: center; }
.hx .page-hero h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1; max-width: 20ch; margin: 10px auto 0; color: var(--hx-on-dark); }
.hx .page-hero p { margin: 22px auto 0; max-width: 62ch; color: #e6dfca; font-size: 1.1rem; line-height: 1.7; }
.hx .page-hero .hero-cta { justify-content: center; }
.hx .breadcrumb { justify-content: center; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--hx-on-dark-muted); }
.hx .breadcrumb a:hover { color: var(--hx-on-dark); }
.hx .breadcrumb > span:last-child { color: var(--hx-gold-bright); }
.hx .page-hero .badge, .hx .page-hero .badge--gold { background: transparent; border-color: rgba(201,162,75,.55); color: var(--hx-gold-bright); border-radius: 0; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }

.hx .section { padding: 112px 0; }
.hx .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .28em; color: var(--hx-gold-ink); }
.hx .eyebrow::before { width: 32px; height: 1px; background: var(--hx-gold); border-radius: 0; }
.hx h2.section-title { font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.05; color: var(--hx-green); }
.hx .section-head p, .hx .lead { color: var(--hx-ink-muted); line-height: 1.75; }
.hx .section[style*="var(--surface)"] { background: var(--hx-parchment) !important; border-color: var(--hx-rule) !important; }
.hx h3, .hx h4 { color: var(--hx-green); }

/* Buttons */
/* The sign-in pop-up and the PDF viewer are appended to <body>, outside <main>, so they are named too. */
.hx main .btn, .hx .signin-popup .btn, .hx .mat-viewer .btn { border-radius: 0; letter-spacing: .1em; text-transform: uppercase; font-size: 0.8rem; min-height: 48px; }
.hx main .btn-primary, .hx .signin-popup .btn-primary, .hx .mat-viewer .btn-primary { background: var(--hx-green); color: var(--hx-on-dark); box-shadow: none; }
.hx main .btn-primary:hover, .hx .signin-popup .btn-primary:hover, .hx .mat-viewer .btn-primary:hover { background: var(--hx-green-2); }
.hx main .btn-dark { background: var(--hx-gold); color: var(--hx-green); }
.hx main .btn-dark:hover { background: var(--hx-gold-bright); }
.hx main .btn-outline, .hx .mat-viewer .btn-outline { border-color: var(--hx-green); color: var(--hx-green); }
.hx .page-hero .btn-primary, .hx .cta-band .btn-primary { background: var(--hx-gold); color: var(--hx-green); }
.hx .page-hero .btn-primary:hover, .hx .cta-band .btn-primary:hover { background: var(--hx-gold-bright); }
.hx main .btn-ghost-light { background: transparent; border-color: rgba(247,242,230,.55); }

/* Cards and lists */
.hx main .card { background: var(--hx-paper); border: 1px solid var(--hx-rule); border-top: 2px solid var(--hx-gold); border-radius: 0; box-shadow: none; }
.hx main .card:hover { box-shadow: 0 20px 40px -18px rgba(3,42,29,.3); border-color: var(--hx-rule); border-top-color: var(--hx-gold); }
.hx main .card h3 { font-family: var(--hx-serif); font-weight: 500; font-size: 1.7rem; line-height: 1.12; }
.hx main .card-icon { background: transparent; border: 1px solid var(--hx-gold); border-radius: 0; color: var(--hx-gold-ink); }
.hx .card-link { color: #0b6141; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.hx .service-card::before { display: none; }
.hx .value-card { background: transparent; border: none; border-top: 1px solid var(--hx-gold); border-radius: 0; box-shadow: none; padding: 24px 0; }
.hx .value-num { background: transparent; border-radius: 0; width: auto; min-width: 40px; height: auto; font-family: var(--hx-serif); font-size: 2rem; font-weight: 500; color: var(--hx-gold-ink); }
.hx .value-card h4 { font-family: var(--hx-serif); font-weight: 500; font-size: 1.55rem; }
.hx .chip { background: var(--hx-paper); border-color: var(--hx-rule); border-radius: 0; box-shadow: none; font-family: var(--hx-serif); font-size: 1.2rem; color: var(--hx-green); }
.hx .chip:hover { border-color: var(--hx-gold); }
.hx .chip .chip-ic, .hx .feature-list .fl-tick { background: transparent; border: 1px solid var(--hx-gold); border-radius: 0; color: var(--hx-gold-ink); }
.hx .badge { border-radius: 0; }
.hx .stat-band { background: var(--hx-green); border-radius: 0; outline: 1px solid var(--hx-gold); outline-offset: 8px; }
.hx .stat-band .num { font-family: var(--hx-serif); font-weight: 500; color: var(--hx-gold-bright); }
.hx .media-frame { border-radius: 0; outline: 1px solid var(--hx-gold); outline-offset: 8px; }

/* Closing CTA band */
.hx .cta-band { background: var(--hx-green); border-radius: 0; outline: 1px solid var(--hx-gold); outline-offset: -14px; padding: 72px 56px; }
.hx .cta-band::before { background: radial-gradient(600px 300px at 80% 120%, rgba(201,162,75,.18), transparent 60%); }
.hx .cta-band h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.hx .cta-band p { color: var(--hx-on-dark-muted); }

/* Blog list + posts */
.hx .filter-btn { border-radius: 0; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.hx .filter-btn.active { background: var(--hx-green); border-color: var(--hx-green); }
.hx .post-thumb { filter: saturate(.75); }
.hx .post-cat { color: var(--hx-gold-ink); letter-spacing: .2em; font-weight: 500; }
.hx .post-card h3 { font-size: 1.55rem; }
.hx .post-article h1 { font-family: var(--hx-serif); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; color: var(--hx-green); }
.hx .post-article h2 { font-family: var(--hx-serif); font-weight: 500; font-size: 2rem; color: var(--hx-green); }
.hx .post-article p, .hx .post-article li { line-height: 1.85; }
.hx .post-article blockquote { border-left: 1px solid var(--hx-gold); background: transparent; font-family: var(--hx-serif); font-style: italic; font-size: 1.5rem; color: var(--hx-green); border-radius: 0; }
.hx .post-article .post-featured-img { border-radius: 0; outline: 1px solid var(--hx-gold); outline-offset: 8px; filter: saturate(.75); }
.hx .post-nav { border-color: var(--hx-gold); }
.hx .post-nav .pn-title { font-family: var(--hx-serif); font-size: 1.3rem; color: var(--hx-green); }

/* Forms, FAQ, legal, misc */
.hx .form-card { background: var(--hx-paper); border: 1px solid var(--hx-rule); border-top: 2px solid var(--hx-gold); border-radius: 0; box-shadow: 0 25px 50px -20px rgba(3,42,29,.2); }
.hx .form-card h2, .hx .auth-wrap .form-card h2 { font-family: var(--hx-serif); font-weight: 500; font-size: 2rem; color: var(--hx-green); }
.hx .field input, .hx .field select, .hx .field textarea { border-radius: 0; background: #fff; }
.hx .faq-item { background: transparent; border: none; border-top: 1px solid var(--hx-gold); border-radius: 0; box-shadow: none; }
.hx .faq-item summary { font-family: var(--hx-serif); font-size: 1.45rem; color: var(--hx-green); }
.hx .legal-placeholder { border-radius: 0; background: var(--hx-paper); border-color: var(--hx-rule); }
.hx .channel-card { border-radius: 0; background: var(--hx-paper); border-color: var(--hx-rule); border-top: 2px solid var(--hx-gold); }

/* PSX Charts page: frames only, the workspace itself is untouched */
.hx .tv-chart-container { border-radius: 0; outline: 1px solid var(--hx-gold); outline-offset: 6px; }
.hx .index-card, .hx .stock-card { border-radius: 0; }
.hx .stock-card.selected { border-color: var(--hx-gold); }

@media (max-width: 780px) {
  .hx .page-hero { padding: 64px 0 56px; }
  .hx .page-hero h1 { font-size: 2.6rem; }
  .hx .section { padding: 64px 0; }
  .hx .cta-band { padding: 48px 24px; outline-offset: -10px; }
  .hx main .grid-4 { grid-template-columns: 1fr; }
}
.hx main .grid > * { min-width: 0; }
.hx main .card h3 { overflow-wrap: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hx-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-plans { grid-template-columns: 1fr; }
  .hx-plan + .hx-plan { border-left: none; border-top: 1px solid var(--hx-rule-2); }
}
@media (max-width: 780px) {
  .hx-section { padding: 64px 0; }
  .hx-head { margin-bottom: 32px; }
  .hx-hero__inner { padding: 56px 20px 44px; gap: 20px; }
  .hx-hero__emblem { width: 72px; height: 72px; }
  .hx-hero h1 { font-size: 3rem; }
  .hx-hero .hx-btns { flex-direction: column; align-self: stretch; }
  .hx-hero .hx-btn { width: 100%; }
  .hx-chartband__head { padding: 18px 16px 4px; }
  .hx-chartband__range { font-size: 22px; }
  .hx-chartband__change { font-size: 40px; }
  .hx-chartband__chart { height: 320px; }
  .hx-toolbar--band { padding: 8px 16px; }
  .hx-toolbar { gap: 6px; padding: 8px 10px; }
  .hx-select, .hx-seg button, .hx-tool { min-height: 36px; padding: 4px 8px; }
  .hx-chartband__cap { padding: 0 16px 14px; }
  .hx-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .hx-stat { padding: 18px 8px; }
  .hx-stat + .hx-stat { border-left: none; }
  .hx-stat:nth-child(even) { border-left: 1px solid rgba(201,162,75,.2); }
  .hx-stat:nth-child(n+3) { border-top: 1px solid rgba(201,162,75,.2); }
  .hx-stat__num { font-size: 34px; }
  .hx-stat__label { font-size: 11px; letter-spacing: .14em; }
  .hx-split { gap: 36px; }
  .hx-pair { padding-bottom: 36px; }
  .hx-pair__main { width: 84%; outline-offset: 8px; }
  .hx-pair__inset { border-width: 5px; }
  .hx-pullquote { font-size: 1.4rem; padding-left: 16px; }
  .hx-chartcard { outline-offset: 5px; }
  .hx-chartcard__chart { min-height: 340px; }
  .hx-quotes td { padding: 10px 6px; }
  .hx-quotes td:first-child { padding-left: 14px; }
  .hx-quotes td:last-child { padding-right: 14px; }
  .hx-q-name { max-width: 120px; }
  .hx-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
  .hx-strip figure { height: 200px; }
  .hx-strip figure:first-child { grid-column: 1 / -1; height: 240px; }
  .hx-strip figcaption { padding: 28px 14px 12px; }
  .hx-strip figcaption span:first-child { display: none; }
  .hx-strip figcaption span:last-child { font-size: 18px; }
  .hx-services { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc(50% - 50vw); padding: 0 16px 8px; scroll-padding-inline: 16px; }
  .hx-service { flex: 0 0 280px; scroll-snap-align: start; }
  .hx-service img { height: 170px; }
  .hx-service__body { padding: 18px; }
  .hx-service h3 { font-size: 24px; }
  .hx-photoquote figure { padding: 72px 20px; }
  .hx-values { grid-template-columns: 1fr; }
  .hx-framed { height: 220px; outline-offset: 8px; }
  .hx-close__copy { padding: 48px 20px 56px; }
  .hx-close img { min-height: 220px; flex-basis: 100%; order: -1; }
  .hx-outcomes { grid-template-columns: 1fr; }
  .hx-outcome + .hx-outcome { border-left: none; border-top: 1px solid rgba(201,162,75,.25); }
  .hx-outcome { padding: 18px 16px; }
  .hx-outcome span:last-child { font-size: 22px; }
  .hx-ruled__text { font-size: 21px; }
  .hx-reasons { grid-template-columns: 1fr; }
  .hx-reasons > div { padding: 18px 16px; font-size: 20px; }
  .hx-plans-wrap { margin-top: -32px; }
  .hx-plans { outline-offset: 4px; }
  .hx-plan { padding: 32px 22px; }
  .hx-steps { grid-template-columns: 1fr; }
  .hx-steps li + li { border-left: none; border-top: 1px solid var(--hx-rule); }
  .hx-steps li { padding: 28px 8px; }
  .hx-faq summary { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-btn, .hx-service, .hx-strip img { transition: none; }
  .hx-live::before { animation: none; }
}
