/* ==========================================================
   HI合乐在线 — 共享样式 /assets/site.css
   蓝图网格 · 侧边轨道 · 编号索引
   ========================================================== */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body { margin: 0; }

h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, svg, video { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- tokens ---------- */
:root {
  --navy: #0B2A4A;
  --navy-deep: #071B31;
  --blue-line: #1E4C7A;
  --orange: #FF6B35;
  --orange-soft: #FFA07A;
  --teal: #2EC4B6;
  --violet: #7B61FF;
  --paper: #F6F4EF;
  --mist: #E4EDF5;
  --graphite: #2B2F36;
  --gray: #6B7684;

  --ink-1: #0B2A4A;
  --ink-2: #2B2F36;
  --ink-3: #6B7684;

  --card-bg: rgba(255, 255, 255, 0.74);
  --hair: rgba(30, 76, 122, 0.34);
  --hair-soft: rgba(30, 76, 122, 0.16);

  --font-head: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail: 88px;
  --gutter: 20px;
  --max-w: 1280px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background-color: var(--paper);
  background-image:
    radial-gradient(920px 620px at 88% -8%, rgba(46, 196, 182, 0.18), transparent 62%),
    radial-gradient(760px 520px at 4% 10%, rgba(255, 107, 53, 0.13), transparent 60%),
    radial-gradient(1100px 820px at 52% 108%, rgba(123, 97, 255, 0.11), transparent 72%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(30, 76, 122, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 76, 122, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
}

@media (min-width: 1024px) {
  body {
    font-size: 17px;
    padding-inline-start: calc(var(--rail) + 8px);
  }
}

body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--ink-1);
}

h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 1.05rem + 2vw, 2.35rem); }
h3 { font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ---------- header / rail ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  transform: translateY(-180%);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

@media (min-width: 1024px) {
  .skip-link { left: calc(var(--rail) + 16px); }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  color: #E6EFF8;
  background: linear-gradient(180deg, #0B2A4A, #08213B);
  border-bottom: 1px solid rgba(30, 76, 122, 0.9);
}

/* brand */
.brand { display: flex; align-items: center; }

.brand__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255, 160, 122, 0.55);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }

.brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #FFFFFF;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--teal);
  text-transform: uppercase;
}

/* toggle */
.nav-toggle {
  position: relative;
  z-index: 220;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #D3E2EF;
  border: 1px solid rgba(30, 76, 122, 0.95);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-toggle:hover { color: #fff; border-color: var(--orange-soft); }

.nav-toggle__bars { display: block; width: 18px; }

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  margin: 3.5px 0;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.site-header[data-open] .nav-toggle {
  color: #fff;
  border-color: var(--orange);
  background: rgba(255, 107, 53, 0.14);
}

.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* scrim */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 205;
  background: rgba(7, 27, 49, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s var(--ease);
}

.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* drawer nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 210;
  width: min(304px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 74px 20px 24px;
  overflow-y: auto;
  background: linear-gradient(180deg, #071B31, #0B2A4A 68%, #071B31);
  border-right: 1px solid rgba(30, 76, 122, 0.9);
  transform: translateX(-103%);
  transition: transform 0.3s var(--ease);
}

.site-header[data-open] .nav { transform: translateX(0); }

.nav__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(46, 196, 182, 0.82);
}

.nav__list { display: flex; flex-direction: column; gap: 2px; }

.nav__item { display: block; }

.nav__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: #A9BFD3;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav__index {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(46, 196, 182, 0.78);
}

.nav__link:hover {
  color: #FFFFFF;
  border-left-color: var(--orange-soft);
  background: rgba(255, 255, 255, 0.05);
}

.nav__link[aria-current="page"] {
  color: #FFFFFF;
  border-left-color: var(--orange);
  background: rgba(255, 107, 53, 0.14);
}

.nav__link[aria-current="page"] .nav__index { color: var(--orange-soft); }

.nav__aside {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(30, 76, 122, 0.75);
}

.nav__utility { display: flex; flex-direction: column; gap: 7px; }

.nav__utility a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #8FA9C0;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav__utility a:hover { color: var(--teal); }

/* scroll meter */
.rail-meter { display: none; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: 72px;
  padding: clamp(38px, 5vw, 66px) 0 28px;
  color: #A9BFD3;
  background: linear-gradient(180deg, #0B2A4A, #071B31 68%, #06182B);
  border-top: 1px solid rgba(46, 196, 182, 0.35);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(46, 196, 182, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(46, 196, 182, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2 * var(--gutter)), var(--max-w));
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(30, 76, 122, 0.85);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
}

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius);
}

.footer-brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.footer-brand__tag {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--teal);
  text-transform: uppercase;
}

.footer-brand__note {
  margin-top: 12px;
  max-width: 36ch;
  font-size: 13px;
  line-height: 1.7;
  color: #7E96AD;
}

.footer-facts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}

.footer-facts__row { display: flex; align-items: baseline; gap: 10px; }

.footer-facts dt {
  flex: 0 0 34px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(46, 196, 182, 0.85);
}

.footer-facts dd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #D7E3EE;
}

.footer-facts dd a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 196, 182, 0.45);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-facts dd a:hover { color: var(--teal); border-color: var(--teal); }

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: rgba(46, 196, 182, 0.85);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(30, 76, 122, 0.85);
}

.footer-col__list { display: flex; flex-direction: column; gap: 10px; }

.footer-col__list a {
  font-size: 14px;
  color: #A9BFD3;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-col__list a::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 1px;
  margin-right: 0;
  background: var(--orange);
  vertical-align: middle;
  transition: width 0.18s var(--ease), margin-right 0.18s var(--ease);
}

.footer-col__list a:hover { color: #FFFFFF; }

.footer-col__list a:hover::before { width: 12px; margin-right: 8px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-top: 22px;
}

.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.footer-legal a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #8FA9C0;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-legal a:hover { color: var(--teal); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #6B7F94;
}

/* ---------- layout helpers ---------- */
.wrap {
  width: min(calc(100% - 2 * var(--gutter)), var(--max-w));
  margin-inline: auto;
}

#main-content { position: relative; z-index: 1; display: block; }

@media (max-width: 1023px) {
  #main-content { padding-top: 60px; }
}

.section {
  position: relative;
  padding-block: clamp(44px, 6vw, 88px);
}

.section--tight { padding-block: clamp(28px, 4vw, 52px); }

.section--deep {
  color: #C8D8E6;
  background: linear-gradient(180deg, #0B2A4A, #071B31);
  border-block: 1px solid rgba(30, 76, 122, 0.85);
}

.section--deep h2,
.section--deep h3 { color: #FFFFFF; }

/* section head */
.sec-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 20px;
  align-items: start;
  margin-bottom: clamp(24px, 3vw, 42px);
}

.sec-head__no {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(28px, 1.4rem + 2.6vw, 46px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--orange);
}

.sec-head__body { max-width: 62ch; }

.sec-head__title { margin: 0; }

.sec-head__lede {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(15px, 0.95rem + 0.4vw, 18px);
  line-height: 1.8;
  color: var(--ink-3);
}

.section--deep .sec-head__lede { color: #93AEC6; }

/* closing rule */
.rule-end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 48px);
}

.rule-end::before {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--hair), transparent);
}

.rule-end__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gray);
  text-transform: uppercase;
  white-space: nowrap;
}

.section--deep .rule-end::before { background: linear-gradient(90deg, rgba(46, 196, 182, 0.5), transparent); }
.section--deep .rule-end__tag { color: rgba(147, 174, 198, 0.9); }

/* grid */
.grid { display: grid; gap: var(--gap, 24px); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 272px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 216px), 1fr)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn--cta {
  color: #FFFFFF;
  background: var(--orange);
  box-shadow: 0 10px 20px -12px rgba(255, 107, 53, 0.9);
}

.btn--cta:hover {
  background: #EA5A28;
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -14px rgba(255, 107, 53, 0.95);
}

.btn--ghost {
  color: var(--ink-1);
  border-color: var(--hair);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.btn--quiet {
  color: var(--ink-1);
  background: rgba(30, 76, 122, 0.07);
}

.btn--quiet:hover { background: rgba(30, 76, 122, 0.14); }

.section--deep .btn--ghost { color: #D7E3EE; border-color: rgba(147, 174, 198, 0.45); }
.section--deep .btn--ghost:hover { color: #fff; border-color: var(--teal); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.crumbs a {
  color: var(--ink-1);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.crumbs a:hover { color: var(--orange); border-color: var(--orange); }

.crumbs [aria-current="page"] { color: var(--ink-3); border: 0; }

.crumbs__sep { color: var(--blue-line); opacity: 0.7; }

/* ---------- card ---------- */
.card {
  position: relative;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(11, 42, 74, 0.05);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: 0 14px 28px -16px rgba(11, 42, 74, 0.55);
}

.card__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--teal);
  text-transform: uppercase;
}

.card__title {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.42;
  color: var(--ink-1);
}

.card__text {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.card__foot {
  margin-top: 16px;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--hair-soft);
}

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: rgba(228, 237, 245, 0.72);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.tag--orange { color: #8A3312; background: rgba(255, 160, 122, 0.24); border-color: rgba(255, 107, 53, 0.5); }
.tag--teal { color: #0F6B63; background: rgba(46, 196, 182, 0.16); border-color: rgba(46, 196, 182, 0.5); }
.tag--violet { color: #4230A8; background: rgba(123, 97, 255, 0.14); border-color: rgba(123, 97, 255, 0.45); }

/* ---------- filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gray);
  text-transform: uppercase;
}

.filter {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.filter:hover { color: var(--orange); border-color: var(--orange-soft); }

.filter[aria-pressed="true"] {
  color: #FFFFFF;
  background: var(--orange);
  border-color: var(--orange);
}

.filter[aria-pressed="true"]:hover { background: #EA5A28; color: #fff; }

.filter-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gray);
}

/* ---------- fold ---------- */
.fold {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.fold + .fold { margin-top: 10px; }

.fold > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-1);
  background: rgba(228, 237, 245, 0.55);
  cursor: pointer;
  transition: background-color 0.18s var(--ease);
}

.fold > summary:hover { background: rgba(228, 237, 245, 0.95); }

.fold > summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--orange);
}

.fold[open] > summary::after { content: "\2013"; }

.fold__body {
  padding: 16px 18px 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
  border-top: 1px solid var(--hair-soft);
}

/* ---------- figure ---------- */
.figure { margin: 0; }

.figure__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(140deg, rgba(30, 76, 122, 0.14), rgba(46, 196, 182, 0.10) 58%, rgba(255, 107, 53, 0.10));
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(30, 76, 122, 0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 76, 122, 0.10) 1px, transparent 1px);
  background-size: 32px 32px;
}

.figure__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--tall .figure__frame { aspect-ratio: 4 / 5; }
.figure--square .figure__frame { aspect-ratio: 1 / 1; }

.figure__cap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gray);
}

/* ---------- misc ---------- */
.coord {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gray);
  text-transform: uppercase;
}

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- desktop rail ---------- */
@media (min-width: 1024px) {
  .site-header {
    width: var(--rail);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 16px 0 14px;
    border-bottom: 0;
    border-right: 1px solid rgba(30, 76, 122, 0.9);
    background: linear-gradient(180deg, #071B31, #0B2A4A 55%, #071B31);
  }

  .brand { justify-content: center; }

  .brand__link {
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
    text-align: center;
  }

  .brand__mark { flex: 0 0 38px; width: 38px; height: 38px; font-size: 15px; }

  .brand__text { align-items: center; }

  .brand__name {
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 1.35;
    word-break: break-all;
  }

  .brand__tag { display: none; }

  .nav-toggle { display: none; }

  .nav-scrim { display: none; }

  .nav {
    position: static;
    transform: none;
    width: auto;
    flex: 1 1 auto;
    margin-top: 14px;
    padding: 12px 6px;
    gap: 12px;
    overflow: visible;
    background: none;
    border-right: 0;
    border-top: 1px solid rgba(30, 76, 122, 0.6);
  }

  .nav__title { display: none; }

  .nav__list { gap: 4px; }

  .nav__link {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 2px;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }

  .nav__index { font-size: 10px; }

  .nav__aside {
    gap: 10px;
    padding: 12px 6px 0;
  }

  .nav__aside .btn {
    width: 100%;
    padding: 10px 4px;
    font-size: 11px;
    letter-spacing: 0.02em;
    white-space: normal;
  }

  .nav__utility { align-items: center; }
  .nav__utility a { font-size: 10px; }

  .rail-meter {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(30, 76, 122, 0.55);
  }

  .rail-meter__fill {
    display: block;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, var(--teal), var(--orange));
    transition: height 0.12s linear;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .btn:hover { transform: none; }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
