/* =====================================================================
   site.css — 大发快三开奖 共享外壳 / 通用组件
   侧边品牌轨道 + 紧凑命令栏 + 暖纸阅读区
   ===================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(135deg, rgba(11, 37, 69, 0.032) 0 1px, transparent 1px 14px);
  padding-top: var(--bar-h);
  padding-bottom: calc(var(--export-h) + 14px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-nav-open] { overflow: hidden; }

h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
main { display: block; }

/* ---------- 2. Tokens ---------- */
:root {
  --deep: #0B2545;
  --ink: #11161C;
  --paper: #F4ECDF;
  --ivory: #FFF9EF;
  --gold: #D6A53B;
  --coral: #F06A4F;
  --mint: #3EC6A0;
  --mist: #8FA6B8;
  --bronze: #7A5A1E;
  --night: #163A5F;

  --rail-w: 252px;
  --bar-h: 58px;
  --export-h: 54px;
  --maxw: 1280px;

  --font-sans: "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 10px 10px 0 rgba(11, 37, 69, 0.16);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
}

/* ---------- 3. Typography base ---------- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.14; letter-spacing: -0.02em; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

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

.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;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--gold);
}

.page-title {
  font-size: clamp(30px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.section-title { font-size: clamp(24px, 3.6vw, 40px); }
.lede {
  font-size: 17px;
  line-height: 1.8;
  color: #2C3A46;
  max-width: 62ch;
}

.annotation {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}
.annotation--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 5. Header shell ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

.scroll-progress {
  position: fixed;
  top: calc(var(--bar-h) - 3px);
  left: 0; right: 0;
  height: 3px;
  z-index: 61;
  pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transition: width 120ms linear;
}

/* 5.1 品牌轨道（移动为抽屉） */
.rail {
  position: fixed;
  top: 0; left: 0;
  z-index: 70;
  width: min(85vw, 320px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--deep);
  color: var(--paper);
  border-right: 3px solid var(--ink);
  overflow-y: auto;
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 240ms var(--ease), visibility 240ms;
}
.rail[data-open] {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 16px 0 0 rgba(17, 22, 28, 0.22);
  transition: transform 240ms var(--ease), visibility 0s;
}
.rail::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 72px; height: 72px;
  background: repeating-linear-gradient(45deg, rgba(214, 165, 59, 0.85) 0 3px, transparent 3px 10px);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.55;
  pointer-events: none;
}

.rail__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  background: rgba(255, 249, 239, 0.1);
  border: 2px solid rgba(244, 236, 223, 0.42);
  color: var(--ivory);
  cursor: pointer;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.rail__close:hover { background: var(--coral); border-color: var(--ink); color: var(--ink); }

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 46px;
}
.rail__stamp {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: var(--gold);
  color: var(--deep);
  font-size: 22px;
  font-weight: 800;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(17, 22, 28, 0.65);
}
.rail__wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rail__link {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ivory);
  transition: color 150ms var(--ease);
}
.rail__link:hover { color: var(--gold); }
.rail__sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.rail__note {
  position: relative;
  padding-top: 10px;
  border-top: 1px solid rgba(143, 166, 184, 0.35);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(143, 166, 184, 0.85);
}

.rail__nav { margin-top: 2px; }
.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: rgba(244, 236, 223, 0.82);
  transition: color 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}
.nav__idx {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(143, 166, 184, 0.85);
}
.nav__link:hover {
  color: var(--ivory);
  background: rgba(255, 249, 239, 0.07);
  border-left-color: rgba(214, 165, 59, 0.65);
}
.nav__link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav__link[aria-current="page"] {
  color: var(--ivory);
  font-weight: 700;
  background: rgba(214, 165, 59, 0.14);
  border-left-color: var(--gold);
}
.nav__link[aria-current="page"] .nav__idx { color: var(--gold); }
.nav__link[aria-current="page"]::after {
  content: "";
  margin-left: auto;
  width: 7px; height: 7px;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 198, 160, 0.22);
}

.rail__tail {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 166, 184, 0.28);
}
.rail__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--mist);
}
.rail__dot {
  flex: 0 0 auto;
  margin-top: 5px;
  width: 8px; height: 8px;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 198, 160, 0.2);
}

/* 5.2 命令栏 */
.command-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: var(--ivory);
  border-bottom: 3px solid var(--ink);
}
.command-bar__brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--deep);
  white-space: nowrap;
}
.command-bar__status {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--bronze);
}
.command-bar__dot {
  width: 8px; height: 8px;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 198, 160, 0.18);
}
.command-bar__links {
  display: none;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.command-bar__links > a {
  color: var(--night);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.command-bar__links > a:hover { color: var(--bronze); border-bottom-color: var(--gold); }
.command-bar__cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--gold);
  color: var(--ink) !important;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.command-bar__cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--deep);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: background 150ms var(--ease), transform 150ms var(--ease);
}
.nav-toggle:hover { background: var(--night); }
.nav-toggle:active { transform: translate(1px, 1px); }
.nav-toggle__bars {
  position: relative;
  width: 16px; height: 2px;
  background: currentColor;
  transition: background 160ms var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 2px;
  background: currentColor;
  transition: transform 160ms var(--ease), top 160ms var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.nav-toggle__text { letter-spacing: 0.06em; }

/* 5.3 移动端记录导出入口 */
.mobile-export {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 65;
  height: var(--export-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-top: 3px solid var(--ink);
}
.mobile-export:focus-visible { outline: 3px solid var(--deep); outline-offset: -3px; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  background: var(--ivory);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--dark { background: var(--deep); color: var(--ivory); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--ghost:hover { background: var(--ivory); box-shadow: 4px 4px 0 var(--ink); }
.btn--sm { padding: 8px 14px; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); }
.btn--block { display: flex; width: 100%; }

/* ---------- 7. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--tight { max-width: 820px; }

.section { padding-block: clamp(32px, 5vw, 64px); }
.section--flush { padding-block: 0; }

.split { display: grid; gap: clamp(16px, 2.4vw, 28px); }

.stack > * + * { margin-top: 16px; }
.divider { height: 3px; background: var(--ink); border: 0; margin: 0; }
.hr-dashed {
  height: 0;
  border: 0;
  border-top: 2px dashed rgba(17, 22, 28, 0.28);
  margin-block: 20px;
}

/* ---------- 8. Breadcrumbs ---------- */
.breadcrumbs {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--bronze);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: rgba(122, 90, 30, 0.5);
}
.breadcrumbs__link {
  color: var(--bronze);
  border-bottom: 1px solid rgba(122, 90, 30, 0.35);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.breadcrumbs__link:hover { color: var(--deep); border-bottom-color: var(--gold); }
.breadcrumbs__item[aria-current="page"] { color: var(--ink); }

/* ---------- 9. Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--ivory);
  color: var(--ink);
  border: 2px solid var(--ink);
}
.chip--gold { background: var(--gold); }
.chip--mint { background: var(--mint); color: var(--ink); }
.chip--coral { background: var(--coral); color: var(--ivory); }
.chip--ghost { background: transparent; }

/* ---------- 10. Cards ---------- */
.card {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  background: var(--ivory);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
}
.card--hard { box-shadow: var(--shadow-hard); }
.card--deep { background: var(--deep); color: var(--paper); }
.card--deep .card__body { color: rgba(244, 236, 223, 0.84); }
.card--deep .card__meta { color: var(--gold); }
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card__title { font-size: 19px; font-weight: 800; line-height: 1.3; }
.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--bronze);
  white-space: nowrap;
}
.card__body { font-size: 15px; line-height: 1.8; color: #2B343D; }

/* ---------- 11. Panel（研究板） ---------- */
.panel {
  display: grid;
  background: var(--ivory);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
}
.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--deep);
  color: var(--ivory);
  border-bottom: 2px solid var(--ink);
}
.panel__title { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; }
.panel__body { padding: clamp(16px, 2vw, 22px); }
.panel__foot {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--bronze);
  border-top: 2px dashed rgba(17, 22, 28, 0.25);
}

/* ---------- 12. Data band / metrics ---------- */
.data-band {
  padding-block: clamp(24px, 3vw, 40px);
  background: var(--deep);
  color: var(--paper);
  border-block: 3px solid var(--ink);
}
.data-band__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.metric {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.metric__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ivory);
}
.metric__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}
.metric--gold .metric__value { color: var(--gold); }
.metric--mint .metric__value { color: var(--mint); }
.metric--coral .metric__value { color: var(--coral); }

/* ---------- 13. Timeline ---------- */
.timeline {
  position: relative;
  margin-left: 8px;
  border-left: 3px solid var(--ink);
}
.timeline__item {
  position: relative;
  padding: 0 0 22px 24px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 8px;
  width: 12px; height: 12px;
  background: var(--gold);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}
.timeline__item.is-current::before { background: var(--mint); }
.timeline__issue {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--bronze);
}
.timeline__title { font-size: 16px; font-weight: 700; }
.timeline__text { font-size: 14px; color: #3A4550; }

/* ---------- 14. Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ivory);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
}
.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table caption {
  caption-side: bottom;
  padding: 10px 14px;
  font-size: 12px;
  text-align: left;
  color: var(--bronze);
}
.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 22, 28, 0.16);
}
.data-table thead th {
  background: var(--night);
  color: var(--ivory);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--ink);
}
.data-table tbody tr:nth-child(even) { background: rgba(11, 37, 69, 0.045); }
.data-table tbody tr:hover { background: rgba(214, 165, 59, 0.16); }
.data-table .is-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.data-table .is-highlight {
  background: rgba(240, 106, 79, 0.14);
  box-shadow: inset 3px 0 0 var(--coral);
}

/* ---------- 15. Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 249, 239, 0.78);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(11, 37, 69, 0.14);
}
.filter-btn {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  background: var(--ivory);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease);
}
.filter-btn:hover { background: var(--gold); }
.filter-btn:focus-visible { outline: 3px solid var(--night); outline-offset: 2px; }
.filter-btn[aria-pressed="true"] {
  background: var(--deep);
  color: var(--ivory);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.filter-item[hidden] { display: none; }
.filter-empty {
  padding: 18px;
  font-size: 14px;
  color: var(--bronze);
  border: 2px dashed rgba(17, 22, 28, 0.35);
}

/* ---------- 16. Reveal & spy ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.spy-link { transition: color 150ms var(--ease), background 150ms var(--ease); }
.spy-link[aria-current="true"] {
  color: var(--deep);
  background: rgba(214, 165, 59, 0.22);
  box-shadow: inset 3px 0 0 var(--gold);
}

/* ---------- 17. Media frame（图片占位基础） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, var(--deep) 0%, var(--night) 52%, var(--ink) 100%);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 78% 22%, rgba(214, 165, 59, 0.32), transparent 46%),
    repeating-linear-gradient(115deg, rgba(255, 249, 239, 0.06) 0 2px, transparent 2px 18px);
}
.media-frame__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: rgba(11, 37, 69, 0.88);
  border-top: 2px solid var(--gold);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 18. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  background: var(--ink);
  color: rgba(244, 236, 223, 0.86);
  border-top: 3px solid var(--deep);
}
.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg,
    var(--gold) 0 22%,
    var(--coral) 22% 34%,
    var(--mint) 34% 42%,
    var(--deep) 42% 100%);
}

.footer__grid {
  display: grid;
  gap: clamp(22px, 3vw, 36px);
  padding-block: clamp(32px, 4vw, 56px);
}
.footer__brand { display: grid; gap: 10px; align-content: start; }
.footer__mark {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--gold);
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  border: 2px solid var(--paper);
  box-shadow: 4px 4px 0 rgba(214, 165, 59, 0.4);
}
.footer__name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--ivory); }
.footer__tagline { font-size: 13px; letter-spacing: 0.04em; color: var(--mist); }
.footer__status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(214, 165, 59, 0.45);
}
.footer__dot { width: 7px; height: 7px; background: var(--mint); }

.footer__col { display: grid; align-content: start; min-width: 0; }
.footer__col--contact { min-width: 0; }
.footer__title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  border-bottom: 2px solid rgba(214, 165, 59, 0.5);
}
.footer__list { display: grid; gap: 8px; font-size: 14px; }
.footer__list--contact { display: grid; gap: 10px; }
.footer__link {
  color: rgba(244, 236, 223, 0.8);
  border-bottom: 1px solid transparent;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.footer__link:hover { color: var(--gold); border-bottom-color: var(--gold); }
.footer__link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.footer__text { font-size: 13px; line-height: 1.7; color: rgba(244, 236, 223, 0.66); }

.footer__meta {
  background: rgba(11, 37, 69, 0.62);
  border-top: 1px solid rgba(244, 236, 223, 0.18);
}
.footer__meta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-block: 16px;
  font-size: 12px;
  color: rgba(244, 236, 223, 0.6);
}
.footer__legal { font-family: var(--font-mono); letter-spacing: 0.04em; }
.footer__note { font-size: 12px; }
.footer__live {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mint);
  min-height: 1em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 249, 239, 0.06);
  color: rgba(244, 236, 223, 0.9);
  border: 1px solid rgba(244, 236, 223, 0.28);
  cursor: pointer;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.copy-btn:hover { background: rgba(214, 165, 59, 0.18); border-color: var(--gold); color: var(--ivory); }
.copy-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.copy-btn.is-copied { background: rgba(62, 198, 160, 0.18); border-color: var(--mint); }
.copy-btn__hint {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.copy-btn.is-copied .copy-btn__hint { color: var(--mint); }

/* ---------- 19. Responsive ---------- */
@media (min-width: 560px) {
  .command-bar__status { display: inline-flex; }
}

@media (min-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .command-bar__links { display: flex; }
  .nav-toggle { margin-left: 0; }
}

@media (min-width: 820px) {
  .split--asym { grid-template-columns: 1.35fr 0.85fr; align-items: start; }
  .split--halves { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1080px) {
  body {
    padding-left: var(--rail-w);
    padding-bottom: 0;
  }
  .rail {
    width: var(--rail-w);
    padding: 26px 20px 24px;
    transform: none;
    visibility: visible;
    border-right: 3px solid var(--ink);
    box-shadow: none;
    transition: none;
  }
  .rail__brand { padding-right: 0; }
  .rail__close { display: none; }
  .command-bar { left: var(--rail-w); padding: 0 22px; }
  .command-bar__brand { display: none; }
  .scroll-progress { left: var(--rail-w); }
  .mobile-export { display: none; }
  .footer__grid { grid-template-columns: 1.4fr 0.8fr 0.8fr 1.3fr; }
}

@media (min-width: 1240px) {
  .container { padding-inline: 32px; }
}

/* ---------- 20. 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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
