/* ==========================================================================
   365游戏入口 — /assets/site.css
   深海墨蓝夜航街机厅：切角面板 / 索引编号 / 霓虹青与暖金强调
   ========================================================================== */

/* ---------- 1. Variables ---------- */
:root {
  --ink: #06121F;
  --ink-2: #0C1F31;
  --steel: #16324A;
  --cyan: #34E6D2;
  --orange: #FF7A3D;
  --gold: #F2C36B;
  --mist: #EAF2F7;
  --slate: #8FA6B8;
  --deep-teal: #0E5A57;
  --amber: #FFB020;

  --line: rgba(143, 166, 184, 0.18);
  --line-strong: rgba(143, 166, 184, 0.32);
  --cyan-line: rgba(52, 230, 210, 0.26);

  --sans: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --bar-h: 56px;
  --ticker-h: 36px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --cut: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + var(--ticker-h) + 12px);
}

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

ul, ol { list-style: none; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(920px 540px at 78% -14%, rgba(52, 230, 210, 0.10), transparent 62%),
    radial-gradient(720px 460px at 6% 2%, rgba(255, 122, 61, 0.07), transparent 64%),
    linear-gradient(transparent 0 23px, rgba(143, 166, 184, 0.045) 23px 24px),
    linear-gradient(90deg, transparent 0 23px, rgba(143, 166, 184, 0.045) 23px 24px);
  background-size: auto, auto, 24px 24px, 24px 24px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  color: var(--mist);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.02em;
  font-stretch: 92%;
  color: var(--mist);
}

h1 { font-size: clamp(2rem, 6vw, 5rem); line-height: 1.05; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2.1vw, 1.5rem); }
h4 { font-size: 1.02rem; }

p { max-width: 34em; }
p + p { margin-top: 0.9em; }

small { font-size: 0.78rem; color: var(--slate); }

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

.num { color: var(--gold); font-size: 1.08em; }
.num--cyan { color: var(--cyan); }
.num--orange { color: var(--orange); }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 4. Layout ---------- */
#main-content { display: block; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.stack > * + * { margin-top: clamp(18px, 2.6vw, 32px); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

/* 章节标题 + 大编号 */
.section-head {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.4vw, 20px);
  margin-bottom: clamp(18px, 3vw, 34px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: clamp(48px, 12vw, 120px);
  height: 2px;
  background: var(--cyan);
  transform: skewX(-12deg);
  transform-origin: left center;
}

.section-idx {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.section-title {
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.section-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--slate);
  white-space: nowrap;
}

/* 竖排注释 */
.anno {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--slate);
  text-transform: uppercase;
  line-height: 1;
  display: none;
}

@media (min-width: 1024px) {
  .anno { display: block; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-bg: var(--steel);
  --btn-fg: var(--mist);
  --btn-bd: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.25em;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--btn-fg);
  background-color: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(52, 230, 210, 0.35);
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--cyan);
}

.btn-gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
  --btn-bd: rgba(242, 195, 107, 0.9);
}
.btn-gold:hover {
  --btn-bg: #FFD98F;
  --btn-fg: var(--ink);
}

.btn-cyan {
  --btn-bg: var(--cyan);
  --btn-fg: var(--ink);
  --btn-bd: var(--cyan);
}
.btn-cyan:hover { --btn-bg: #6FF2E4; }

.btn-orange {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink);
  --btn-bd: var(--orange);
}
.btn-orange:hover { --btn-bg: #FF9563; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--mist);
  --btn-bd: var(--line-strong);
}
.btn-ghost:hover {
  --btn-bg: rgba(14, 90, 87, 0.4);
  --btn-fg: var(--cyan);
}

.btn-sm {
  padding: 0.44em 0.9em;
  font-size: 0.78rem;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.btn-block { width: 100%; }

/* ---------- 6. Panels / cards / chips ---------- */
.panel,
.card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(16px, 2.4vw, 26px);
}

.card--cut,
.panel--cut {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.card--cut:hover,
.card--cut:focus-within {
  border-color: var(--cyan-line);
}

.card-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.4em;
}

.card-text {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.7;
  max-width: 32em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.42em 0.9em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--slate);
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.chip:hover {
  color: var(--cyan);
  border-color: var(--cyan-line);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
}

/* ---------- 7. Breadcrumb ---------- */
.breadcrumb {
  padding-block: clamp(14px, 2vw, 22px);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--steel);
}

.breadcrumb-list a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.14s ease;
}

.breadcrumb-list a:hover { color: var(--cyan); }

.breadcrumb-list [aria-current="page"] { color: var(--cyan); }

/* ---------- 8. Media containers ---------- */
.media {
  --media-ratio: 16 / 10;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(22, 50, 74, 0.96), rgba(12, 31, 49, 0.96) 62%),
    var(--ink-2);
  border: 1px solid var(--line);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media--cut {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.media--wide { --media-ratio: 21 / 9; }
.media--square { --media-ratio: 1 / 1; }
.media--tall { --media-ratio: 3 / 4; }

.media--scan::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(52, 230, 210, 0.07) 0 1px, transparent 1px 4px);
  opacity: 0.7;
}

.media-caption {
  margin-top: 0.6em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

/* ---------- 9. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.44s var(--ease), transform 0.44s var(--ease);
  will-change: opacity, transform;
}

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

/* ---------- 10. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 0.62em 1.1em;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--cyan);
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 11. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(6, 18, 31, 0.96);
  border-bottom: 1px solid var(--cyan-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cmdbar {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  height: var(--bar-h);
  padding-inline: clamp(14px, 3vw, 32px);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--mist);
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.brand:hover .brand-mark {
  background: var(--orange);
  transform: translateY(-1px);
}

.brand-text {
  display: block;
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-domain {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  line-height: 1.35;
  white-space: nowrap;
}

/* Primary nav (desktop) */
.primary-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  padding: 0.5em 0.7em;
  font-size: 0.855rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--slate);
  text-decoration: none;
  box-shadow: inset 0 0 0 transparent;
  transition: color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.nav-idx {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--steel);
  transition: color 0.14s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--mist);
  background-color: rgba(14, 90, 87, 0.48);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav-link:hover .nav-idx,
.nav-link:focus-visible .nav-idx { color: var(--cyan); }

.nav-link[aria-current="page"] {
  color: var(--cyan);
  background-color: rgba(14, 90, 87, 0.34);
}

.nav-link[aria-current="page"] .nav-idx { color: var(--gold); }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7em;
  right: 0.7em;
  bottom: 0.1em;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(52, 230, 210, 0.75);
}

/* Command bar actions */
.cmdbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  padding: 0.44em 0.72em;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.cmd-btn:hover,
.cmd-btn[aria-expanded="true"] {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(14, 90, 87, 0.35);
}

.cmd-btn-icon { flex: 0 0 auto; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45em;
  padding: 0.44em 0.7em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mist);
  background: var(--steel);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  height: 14px;
  flex: 0 0 auto;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.site-header[data-open="true"] .nav-toggle {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.site-header[data-open="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.site-header[data-open="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.site-header[data-open="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Ticker */
.ticker {
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(242, 195, 107, 0.12), rgba(242, 195, 107, 0.02) 72%);
  border-top: 1px solid rgba(242, 195, 107, 0.22);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(14px, 3vw, 32px);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ticker-track::-webkit-scrollbar { display: none; }

.ticker-tag {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: var(--gold);
  padding: 0.16em 0.6em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.ticker-item {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.ticker-sep {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--gold);
  opacity: 0.5;
  transform: rotate(45deg);
}

/* ---------- 12. Search panel ---------- */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  padding: 11vh clamp(16px, 4vw, 44px) 28px;
  background: rgba(4, 13, 22, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.search-panel[data-open="true"] { display: block; }

.search-box {
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(18px, 3vw, 28px);
  background: var(--ink-2);
  border: 1px solid var(--cyan-line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.search-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: var(--cyan);
  margin-bottom: 0.9em;
  max-width: none;
}

.search-input {
  width: 100%;
  padding: 0.75em 0.9em;
  font-size: 0.98rem;
  color: var(--mist);
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.search-input::placeholder { color: rgba(143, 166, 184, 0.75); }

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(52, 230, 210, 0.18);
}

.search-results {
  margin-top: 0.9em;
  max-height: 46vh;
  overflow-y: auto;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 0.62em 0.8em;
  font-size: 0.9rem;
  color: var(--mist);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.search-item::after {
  content: "\2192";
  font-family: var(--mono);
  color: var(--steel);
}

.search-item:hover,
.search-item:focus-visible {
  color: var(--cyan);
  background: rgba(14, 90, 87, 0.45);
  border-left-color: var(--cyan);
}

.search-item:hover::after,
.search-item:focus-visible::after { color: var(--cyan); }

.search-empty {
  padding: 0.8em;
  font-size: 0.85rem;
  color: var(--slate);
}

.search-close {
  margin-top: 1em;
  padding: 0.5em 1.05em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.search-close:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- 13. Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 350;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange) 62%, var(--gold));
  pointer-events: none;
  will-change: transform;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: linear-gradient(180deg, var(--ink) 0%, #040C15 100%);
  border-top: 1px solid var(--cyan-line);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange) 46%, var(--gold) 100%);
  opacity: 0.85;
}

.footer-inner {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 62px) clamp(18px, 4vw, 44px) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.25fr;
  gap: clamp(22px, 3.4vw, 52px);
  align-items: start;
}

.footer-brand { min-width: 0; }

.brand--footer { margin-bottom: 1em; }

.footer-pitch {
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--slate);
  max-width: 24em;
}

.footer-icp {
  margin-top: 1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.footer-icp-key {
  padding: 0.1em 0.4em;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--steel);
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.95em;
  padding-bottom: 0.6em;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--mist);
  border-bottom: 1px solid var(--line);
  max-width: none;
}

.footer-title-idx {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.footer-links li + li { margin-top: 0.5em; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.86rem;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.14s ease;
}

.footer-links a::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--steel);
  transition: width 0.16s var(--ease), background-color 0.16s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible { color: var(--cyan); }

.footer-links a:hover::before,
.footer-links a:focus-visible::before {
  width: 14px;
  background: var(--cyan);
}

.footer-contact li {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 0.55em;
  align-items: baseline;
  font-size: 0.84rem;
  color: var(--slate);
}

.footer-contact li + li { margin-top: 0.6em; }

.contact-key {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  opacity: 0.8;
}

.contact-val { overflow-wrap: anywhere; }

.footer-base {
  margin-top: clamp(26px, 4vw, 46px);
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
}

.footer-copyright {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--slate);
  max-width: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9em;
}

.footer-legal li {
  display: inline-flex;
  align-items: center;
}

.footer-legal li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 0.9em;
  background: var(--steel);
  transform: rotate(45deg);
}

.footer-legal a {
  font-size: 0.78rem;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.14s ease;
}

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

.footer-tick {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  max-width: none;
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 1.4em;
  }
  .footer-contact li + li { margin-top: 0; }
}

@media (max-width: 1000px) {
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 90;
    padding: 12px clamp(14px, 4vw, 26px) 20px;
    background: var(--ink-2);
    border-top: 1px solid var(--cyan-line);
    border-bottom: 1px solid var(--cyan-line);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.6);
    max-height: calc(100vh - var(--bar-h) - var(--ticker-h));
    overflow-y: auto;
  }

  .site-header[data-open="true"] .primary-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    padding: 0.85em 0.85em;
    font-size: 0.98rem;
    border-bottom: 1px solid rgba(143, 166, 184, 0.12);
  }

  .nav-idx { font-size: 0.68rem; }

  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    box-shadow: 0 0 12px rgba(52, 230, 210, 0.8);
  }

  .nav-toggle { display: inline-flex; }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .cmd-btn-text { display: none; }
  .cmd-btn { padding: 0.44em 0.55em; }
  .section-note { display: none; }
  .grid-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand-domain { display: none; }
  .brand-name { font-size: 0.9rem; }
  .cmd-cta { padding: 0.42em 0.7em; font-size: 0.74rem; }
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .search-panel { padding-top: 8vh; }
}

@media (max-width: 380px) {
  .nav-toggle-text { display: none; }
}

/* ---------- 16. 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 !important;
    transform: none !important;
  }

  .skip-link { transition: none; }
  .scroll-progress { display: none; }
}
