/* ==========================================================================
   HG皇CN官网 — 共享样式 /assets/site.css
   框架式导航 + 侧边导览 + 档案纸面
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --hg-ink: #12100E;
  --hg-paper: #F4EBD8;
  --hg-brown: #2A211B;
  --hg-gold: #D9A441;
  --hg-amber: #E07A2F;
  --hg-celadon: #5E8C7A;
  --hg-red: #C94F2D;
  --hg-paper-grey: #D8CFC0;
  --hg-pale-gold: #F0D9A6;
  --hg-dark-gold: #8A6A2F;
  --hg-warm-grey: #6B6258;
  --hg-deep-green: #24302B;

  --hg-font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hg-font-body: "Noto Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hg-font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --hg-shadow: 6px 6px 0 var(--hg-ink);
  --hg-shadow-sm: 4px 4px 0 var(--hg-ink);
  --hg-shadow-xs: 2px 2px 0 var(--hg-ink);

  --hg-max: 1240px;
  --hg-rail: 240px;
  --hg-ease: cubic-bezier(.2, .72, .3, 1);
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--hg-paper);
  background-image: radial-gradient(rgba(42, 33, 27, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--hg-brown);
  font-family: var(--hg-font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content { flex: 1 0 auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--hg-font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.08;
  color: var(--hg-brown);
  text-wrap: balance;
}

p { text-wrap: pretty; }
strong, b { font-weight: 700; }
code, kbd, samp { font-family: var(--hg-font-mono); font-size: .92em; }

::selection { background: var(--hg-gold); color: var(--hg-ink); }

:focus-visible {
  outline: 3px solid var(--hg-gold);
  outline-offset: 2px;
}
#main-content:focus-visible { outline-offset: -3px; }

/* ---------- 4. Skip link ---------- */
.hg-skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--hg-gold);
  color: var(--hg-ink);
  font-family: var(--hg-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  border: 2px solid var(--hg-ink);
  transition: top .18s var(--hg-ease);
}
.hg-skip:focus { top: 12px; }

/* ---------- 5. Header / 框架式导航 ---------- */
.hg-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--hg-ink);
  color: var(--hg-paper);
  border-bottom: 3px solid var(--hg-gold);
}
.hg-header::after {
  content: "";
  display: block;
  height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--hg-dark-gold) 0 1px, transparent 1px 15px);
  opacity: .85;
}
.hg-header :focus-visible { outline-color: var(--hg-paper); }

.hg-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: rgba(217, 164, 65, .16);
  pointer-events: none;
}
.hg-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--hg-amber), var(--hg-gold));
  transition: transform .12s linear;
}

.hg-header__frame {
  max-width: var(--hg-max);
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
}

/* 品牌牌坊 */
.hg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}
.hg-brand__mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--hg-gold);
  color: var(--hg-ink);
  font-family: var(--hg-font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 2px solid var(--hg-gold);
  box-shadow: inset 0 0 0 2px var(--hg-ink);
  transition: background-color .18s var(--hg-ease), color .18s var(--hg-ease);
}
.hg-brand:hover .hg-brand__mark { background: var(--hg-paper); }
.hg-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hg-brand__title {
  font-family: var(--hg-font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  line-height: 1.12;
  color: var(--hg-paper);
  white-space: nowrap;
}
.hg-brand__tag {
  font-family: var(--hg-font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
  color: var(--hg-gold);
  white-space: nowrap;
}

/* 导航 */
.hg-nav { flex: 1 1 auto; min-width: 0; }
.hg-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 2px;
}
.hg-nav__item { display: flex; }
.hg-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(244, 235, 216, .82);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  transition: color .18s var(--hg-ease), background-color .18s var(--hg-ease), border-color .18s var(--hg-ease);
}
.hg-nav__index {
  font-family: var(--hg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--hg-dark-gold);
  transition: color .18s var(--hg-ease);
}
.hg-nav__label { white-space: nowrap; }
.hg-nav__link:hover {
  color: var(--hg-gold);
  border-color: rgba(217, 164, 65, .5);
  background: rgba(217, 164, 65, .09);
}
.hg-nav__link:hover .hg-nav__index { color: var(--hg-gold); }
.hg-nav__link[aria-current="page"] {
  background: var(--hg-gold);
  color: var(--hg-ink);
  border-color: var(--hg-gold);
}
.hg-nav__link[aria-current="page"] .hg-nav__index { color: var(--hg-ink); opacity: .62; }

/* 动作区 */
.hg-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* ---------- 6. Buttons ---------- */
.hg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: var(--hg-font-display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--hg-ink);
  background: var(--hg-paper);
  border: 2px solid var(--hg-ink);
  box-shadow: var(--hg-shadow-sm);
  cursor: pointer;
  transition: transform .16s var(--hg-ease), box-shadow .16s var(--hg-ease),
              background-color .16s var(--hg-ease), color .16s var(--hg-ease);
}
.hg-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--hg-shadow); }
.hg-btn:active { transform: translate(1px, 1px); box-shadow: var(--hg-shadow-xs); }

.hg-btn--gold { background: var(--hg-gold); color: var(--hg-ink); }
.hg-btn--amber { background: var(--hg-amber); color: #1B1208; }
.hg-btn--ghost {
  background: transparent;
  color: var(--hg-paper);
  border-color: var(--hg-gold);
  box-shadow: 4px 4px 0 rgba(217, 164, 65, .35);
}
.hg-btn--ghost:hover { box-shadow: 6px 6px 0 rgba(217, 164, 65, .45); }

.hg-header__cta {
  border-color: var(--hg-gold);
  box-shadow: 4px 4px 0 0 var(--hg-dark-gold);
}
.hg-header__cta:hover { box-shadow: 6px 6px 0 0 var(--hg-dark-gold); }

/* 移动目录按钮 */
.hg-nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: var(--hg-paper);
  border: 2px solid var(--hg-gold);
  cursor: pointer;
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  transition: background-color .18s var(--hg-ease), color .18s var(--hg-ease);
}
.hg-nav-toggle:hover { background: rgba(217, 164, 65, .14); }
.hg-nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.hg-nav-toggle__bars span {
  display: block;
  height: 2px;
  background: var(--hg-gold);
  transition: transform .18s var(--hg-ease), opacity .18s var(--hg-ease);
}
.hg-nav-toggle[aria-expanded="true"] .hg-nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hg-nav-toggle[aria-expanded="true"] .hg-nav-toggle__bars span:nth-child(2) { opacity: 0; }
.hg-nav-toggle[aria-expanded="true"] .hg-nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.hg-nav-toggle__label { display: inline-block; }

/* ---------- 7. Footer ---------- */
.hg-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--hg-ink);
  color: var(--hg-paper);
  border-top: 3px solid var(--hg-gold);
}
.hg-footer :focus-visible { outline-color: var(--hg-paper); }

.hg-footer__ruler {
  height: 8px;
  background-image: repeating-linear-gradient(90deg, var(--hg-dark-gold) 0 1px, transparent 1px 16px);
  opacity: .7;
  border-bottom: 1px solid rgba(217, 164, 65, .18);
}

.hg-footer__frame {
  max-width: var(--hg-max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(16px, 3vw, 32px) 0;
}

.hg-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
  gap: clamp(22px, 3vw, 44px);
  align-items: start;
}

.hg-footer__brand { min-width: 0; }
.hg-footer__brandlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.hg-footer__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--hg-gold);
  color: var(--hg-ink);
  font-family: var(--hg-font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 2px var(--hg-ink);
}
.hg-footer__title {
  font-family: var(--hg-font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--hg-paper);
}
.hg-footer__brandlink:hover .hg-footer__title { color: var(--hg-gold); }
.hg-footer__note {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(244, 235, 216, .68);
  max-width: 32ch;
}
.hg-footer__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 235, 216, .16);
  font-family: var(--hg-font-mono);
  font-size: 11px;
  letter-spacing: .07em;
  color: rgba(244, 235, 216, .6);
}
.hg-footer__key {
  font-family: var(--hg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--hg-gold);
  flex: 0 0 auto;
}

.hg-footer__col { min-width: 0; }
.hg-footer__heading {
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--hg-gold);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(217, 164, 65, .35);
}
.hg-footer__list { display: flex; flex-direction: column; gap: 2px; }
.hg-footer__link {
  display: inline-block;
  padding: 5px 0;
  font-size: 13.5px;
  color: rgba(244, 235, 216, .8);
  border-bottom: 1px solid transparent;
  transition: color .16s var(--hg-ease), border-color .16s var(--hg-ease);
}
.hg-footer__link:hover {
  color: var(--hg-gold);
  border-bottom-color: var(--hg-gold);
}

.hg-footer__contact { display: flex; flex-direction: column; }
.hg-footer__contact li {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(244, 235, 216, .14);
  font-size: 13px;
  line-height: 1.6;
}
.hg-footer__contact li:last-child { border-bottom: 0; }
.hg-footer__value {
  color: rgba(244, 235, 216, .88);
  word-break: break-word;
}

.hg-footer__legal {
  margin-top: clamp(26px, 4vw, 42px);
  padding: 18px 0 26px;
  border-top: 1px solid rgba(244, 235, 216, .16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
  font-family: var(--hg-font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: rgba(244, 235, 216, .6);
}
.hg-footer__copy { color: rgba(244, 235, 216, .74); }
.hg-footer__tip { color: rgba(244, 235, 216, .5); }

/* ---------- 8. Back to top ---------- */
.hg-backtop {
  position: fixed;
  right: clamp(12px, 2.5vw, 28px);
  bottom: clamp(12px, 2.5vw, 28px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--hg-ink);
  color: var(--hg-gold);
  border: 2px solid var(--hg-gold);
  box-shadow: 4px 4px 0 rgba(18, 16, 14, .3);
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s var(--hg-ease), transform .2s var(--hg-ease),
              visibility .2s var(--hg-ease), background-color .16s var(--hg-ease);
}
.hg-backtop[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.hg-backtop:hover { background: var(--hg-gold); color: var(--hg-ink); }
.hg-backtop__arrow { font-size: 13px; line-height: 1; }

/* ---------- 9. Layout skeleton ---------- */
.hg-main { display: block; }
.hg-container {
  width: 100%;
  max-width: var(--hg-max);
  margin: 0 auto;
  padding-inline: clamp(16px, 3.2vw, 36px);
}
.hg-shell {
  display: grid;
  grid-template-columns: var(--hg-rail) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}
.hg-content { min-width: 0; }
.hg-section { padding-block: clamp(32px, 5vw, 64px); }
.hg-section--tight { padding-block: clamp(20px, 3vw, 32px); }
.hg-rule { height: 3px; background: var(--hg-ink); border: 0; }
.hg-hair { height: 1px; background: var(--hg-paper-grey); border: 0; }

/* 侧边导览轨道 */
.hg-rail {
  position: sticky;
  top: clamp(88px, 13vh, 128px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  background: var(--hg-paper);
  border: 2px solid var(--hg-ink);
  box-shadow: var(--hg-shadow-sm);
}
.hg-rail__title {
  font-family: var(--hg-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--hg-dark-gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hg-paper-grey);
}
.hg-toc { display: flex; flex-direction: column; gap: 2px; }
.hg-toc__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 8px;
  border-left: 3px solid transparent;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hg-brown);
  transition: background-color .16s var(--hg-ease), border-color .16s var(--hg-ease), color .16s var(--hg-ease);
}
.hg-toc__link:hover { background: var(--hg-pale-gold); }
.hg-toc__link.is-active,
.hg-toc__link[aria-current="true"] {
  border-left-color: var(--hg-amber);
  background: var(--hg-pale-gold);
  font-weight: 700;
}
.hg-toc__index {
  font-family: var(--hg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--hg-dark-gold);
}

/* ---------- 10. Typography helpers ---------- */
.hg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--hg-dark-gold);
}
.hg-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--hg-gold);
  flex: 0 0 auto;
}
.hg-title {
  font-family: var(--hg-font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.08;
  color: var(--hg-brown);
}
.hg-title--xl { font-size: clamp(2rem, 5vw, 3.5rem); }
.hg-title--lg { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
.hg-title--md { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.25; }
.hg-lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.8;
  color: var(--hg-brown);
}

/* ---------- 11. Crumbs ---------- */
.hg-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hg-warm-grey);
}
.hg-crumbs a {
  color: var(--hg-dark-gold);
  border-bottom: 1px solid transparent;
  transition: color .16s var(--hg-ease), border-color .16s var(--hg-ease);
}
.hg-crumbs a:hover { color: var(--hg-amber); border-bottom-color: currentColor; }
.hg-crumbs__sep { color: var(--hg-paper-grey); }
.hg-crumbs [aria-current="page"] { color: var(--hg-brown); }

/* ---------- 12. Frame / Card / Tag ---------- */
.hg-frame {
  position: relative;
  border: 3px solid var(--hg-ink);
  background: var(--hg-paper);
  box-shadow: var(--hg-shadow);
}
.hg-frame::before,
.hg-frame::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  pointer-events: none;
}
.hg-frame::before {
  top: -3px;
  left: -3px;
  border-top: 3px solid var(--hg-gold);
  border-left: 3px solid var(--hg-gold);
}
.hg-frame::after {
  bottom: -3px;
  right: -3px;
  border-bottom: 3px solid var(--hg-gold);
  border-right: 3px solid var(--hg-gold);
}

.hg-card {
  position: relative;
  background: var(--hg-paper);
  border: 2px solid var(--hg-ink);
  box-shadow: var(--hg-shadow-sm);
  padding: clamp(16px, 2vw, 26px);
}
.hg-card--accent::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 46px;
  height: 6px;
  background: var(--hg-gold);
}
.hg-card__num {
  display: inline-block;
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--hg-dark-gold);
  margin-bottom: 8px;
}

.hg-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--hg-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.6;
  color: var(--hg-ink);
  background: var(--hg-paper-grey);
  border: 1px solid var(--hg-ink);
  white-space: nowrap;
}
.hg-tag--gold { background: var(--hg-pale-gold); }
.hg-tag--amber { background: var(--hg-amber); color: #1B1208; }
.hg-tag--celadon { background: var(--hg-celadon); color: #0E1A16; }
.hg-tag--red { background: var(--hg-red); color: #FFF3E6; border-color: var(--hg-red); }
.hg-tag--dark { background: var(--hg-deep-green); color: var(--hg-paper); border-color: var(--hg-deep-green); }

/* ---------- 13. Grid ---------- */
.hg-grid { display: grid; gap: clamp(14px, 2vw, 26px); }
.hg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 14. Media ---------- */
.hg-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(217, 164, 65, .2), rgba(244, 235, 216, 0) 62%),
    var(--hg-paper-grey);
  border: 2px solid var(--hg-ink);
  box-shadow: var(--hg-shadow-sm);
}
.hg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hg-media--wide { aspect-ratio: 21 / 9; }
.hg-media--tall { aspect-ratio: 4 / 5; }
.hg-media--crop img { object-position: left top; }
.hg-media--empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(42, 33, 27, .14) 0 1px, transparent 1px 12px);
  pointer-events: none;
}

/* ---------- 15. Reveal ---------- */
[data-reveal] {
  transition: opacity .3s var(--hg-ease), transform .3s var(--hg-ease);
}
[data-reveal].is-reveal-armed {
  opacity: 0;
  transform: translateY(14px);
}
[data-reveal].is-reveal-in {
  opacity: 1;
  transform: none;
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1080px) {
  .hg-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex: 0 0 auto;
    background: var(--hg-ink);
    border-bottom: 3px solid var(--hg-gold);
    box-shadow: 0 18px 30px rgba(18, 16, 14, .4);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .26s var(--hg-ease), visibility .26s var(--hg-ease);
  }
  .hg-nav[data-open="true"] {
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    visibility: visible;
  }
  .hg-nav__list {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 6px 0 14px;
  }
  .hg-nav__item { border-bottom: 1px solid rgba(217, 164, 65, .16); }
  .hg-nav__item:last-child { border-bottom: 0; }
  .hg-nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 13px clamp(16px, 4vw, 28px);
    font-size: 15px;
    border: 0;
    border-left: 3px solid transparent;
  }
  .hg-nav__link:hover { background: rgba(217, 164, 65, .12); border-left-color: var(--hg-gold); }
  .hg-nav__link[aria-current="page"] { border-left-color: var(--hg-paper); }
  .hg-nav-toggle { display: inline-flex; }
  .hg-shell { grid-template-columns: minmax(0, 1fr); }
  .hg-rail { position: static; }
}

@media (max-width: 900px) {
  .hg-footer__grid { grid-template-columns: 1fr 1fr; }
  .hg-footer__brand { grid-column: 1 / -1; }
  .hg-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hg-brand__tag { display: none; }
  .hg-brand__mark { width: 40px; height: 40px; font-size: 13px; }
  .hg-brand__title { font-size: 15.5px; }
  .hg-nav-toggle__label { display: none; }
  .hg-nav-toggle { padding: 10px; }
  .hg-header__cta { padding: 9px 12px; font-size: 12.5px; }
  .hg-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .hg-footer__legal { flex-direction: column; align-items: flex-start; }
  .hg-grid--2,
  .hg-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .hg-backtop { padding: 9px 12px; font-size: 10.5px; }
  .hg-card { box-shadow: var(--hg-shadow-xs); }
  .hg-media { box-shadow: var(--hg-shadow-xs); }
}

@media (max-width: 400px) {
  .hg-brand__title { font-size: 14px; }
  .hg-header__cta { padding: 8px 10px; font-size: 12px; }
}

/* ---------- 17. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hg-btn:hover,
  .hg-btn:active { transform: none; }
  .hg-backtop { transform: none; }
  [data-reveal].is-reveal-armed { opacity: 1; transform: none; }
}
