/* ============================================================
   博业赛场 · 共享站点样式 /assets/site.css
   轨道 + 战术板 + 叠纸索引
   ============================================================ */

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

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

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

ol, ul { padding: 0; list-style: none; }

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

a { color: inherit; }

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

button { background: none; border: 0; cursor: pointer; }

/* ---------- tokens ---------- */
:root {
  --paper: #F6F7F3;
  --ink: #0B1110;
  --green: #0C3B2E;
  --cyan: #27E6C8;
  --mist: #A6F6E5;
  --orange: #FF6B2C;
  --grey-900: #2C3834;
  --grey-300: #C9D3CE;
  --fog: #E4EBE7;
  --lime: #B9FF66;

  --font-display: 'Oswald', 'Barlow Condensed', 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Roboto Mono', 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --rail-w: 264px;
  --gutter: clamp(18px, 4vw, 48px);
  --shell-max: 1180px;
  --line: 1px solid var(--grey-300);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(176deg, #E4EBE7 0%, #EFF3EF 34%, #F6F7F3 72%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(36px, 5.2vw, 64px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: clamp(20px, 2.2vw, 25px); line-height: 1.25; }

p { line-height: 1.8; }

strong, b { font-weight: 600; }

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

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

/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.site-rail :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--lime);
}

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--lime);
  color: var(--ink);
  font: 600 14px/1 var(--font-body);
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-220%);
  transition: transform .18s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ============================================================
   HEADER / 侧轨
   ============================================================ */
.site-rail {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  background: var(--green);
  color: var(--paper);
  border-right: 1px solid rgba(246, 247, 243, .14);
  box-shadow: 0 10px 26px -22px rgba(11, 17, 16, .8);
}

.site-rail[data-open] {
  position: fixed;
  inset: 0;
  display: block;
  overflow-y: auto;
  box-shadow: 0 0 0 100vmax rgba(11, 17, 16, .55);
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

/* --- brand --- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--cyan);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(11, 17, 16, .38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.1;
  color: var(--paper);
}

.brand-desc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .01em;
  color: rgba(166, 246, 229, .72);
}

/* --- toggle --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(166, 246, 229, .38);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(39, 230, 200, .1);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--cyan);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.site-rail[data-open] .nav-toggle-bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-rail[data-open] .nav-toggle-bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* --- nav --- */
.rail-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 16px;
  padding: 22px 0 28px;
}

.site-rail[data-open] .rail-nav { display: flex; }

.rail-nav-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(166, 246, 229, .66);
}

.nav-list {
  display: grid;
  gap: 2px;
  border-top: 1px solid rgba(246, 247, 243, .12);
}

.nav-list > li { border-bottom: 1px solid rgba(246, 247, 243, .1); }

.nav-link {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  text-decoration: none;
  color: rgba(246, 247, 243, .8);
  font-size: 15px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color .16s var(--ease), background .16s var(--ease),
              border-color .16s var(--ease), transform .16s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--cyan);
}

.nav-label { line-height: 1.3; }

.nav-link:hover {
  color: #fff;
  background: rgba(39, 230, 200, .1);
  border-left-color: var(--cyan);
  transform: translateX(2px);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--cyan);
  border-left-color: var(--orange);
  font-weight: 700;
  transform: none;
}

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

.nav-link[aria-current="page"]:hover { background: var(--mist); }

/* --- status + actions --- */
.rail-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  background: rgba(11, 17, 16, .3);
  border: 1px dashed rgba(166, 246, 229, .32);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--mist);
}

.rail-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(39, 230, 200, .22);
}

.rail-actions {
  display: grid;
  gap: 8px;
}

.rail-cta { width: 100%; }

/* --- progress --- */
.rail-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(246, 247, 243, .16);
  pointer-events: none;
}

.rail-progress-bar {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 1%);
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width .12s linear;
}

/* ============================================================
   BUTTONS / TAGS / KICKER
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .16s var(--ease),
              box-shadow .16s var(--ease);
}

.btn--primary {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 rgba(11, 17, 16, .45);
}

.btn--primary:hover {
  background: var(--mist);
  border-color: var(--mist);
  transform: translate(-1px, -2px);
  box-shadow: 5px 6px 0 rgba(11, 17, 16, .5);
}

.btn--accent {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 4px 4px 0 rgba(11, 17, 16, .45);
}

.btn--accent:hover {
  background: #ff8a56;
  border-color: #ff8a56;
  transform: translate(-1px, -2px);
}

.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn--ghost:hover {
  background: rgba(39, 230, 200, .14);
  border-color: var(--cyan);
  color: #fff;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--grey-900);
}

.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--grey-300);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.6;
  color: var(--grey-900);
  background: var(--paper);
  white-space: nowrap;
}

.tag--cyan { background: var(--mist); border-color: var(--cyan); color: var(--green); }
.tag--orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.tag--green { background: var(--green); border-color: var(--green); color: var(--mist); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--grey-300);
  margin-block: 0;
}

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

.grid > * { grid-column: span 12; min-width: 0; }

@media (min-width: 900px) {
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
  .col-9 { grid-column: span 9; }
  .col-12 { grid-column: span 12; }
}

/* paper panel */
.panel {
  position: relative;
  background: var(--paper);
  border: var(--line);
  box-shadow: 7px 7px 0 rgba(12, 59, 46, .09);
  padding: clamp(18px, 3vw, 32px);
}

.note {
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--cyan);
  color: var(--grey-900);
  font-size: 14px;
  line-height: 1.75;
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--grey-900);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--grey-300);
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}

.breadcrumb a:hover {
  color: var(--green);
  border-bottom-color: var(--cyan);
}

.breadcrumb [aria-current="page"] { color: var(--green); font-weight: 600; }

/* long form */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--grey-900);
}

.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  margin-top: 2.4em;
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 32px);
}

.prose h3 {
  margin-top: 1.9em;
  color: var(--green);
}

.prose ul, .prose ol {
  padding-left: 1.25em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: .5em; }

.prose a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan);
}

.prose a:hover { background: var(--mist); }

.prose blockquote {
  border-left: 3px solid var(--orange);
  padding-left: 18px;
  font-style: normal;
  color: var(--ink);
}

/* image frame */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--fog);
  border: var(--line);
  box-shadow: 6px 6px 0 rgba(12, 59, 46, .07);
  aspect-ratio: 16 / 10;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease);
}

.media-frame:hover img { transform: scale(1.02); }

.media-frame--wide { aspect-ratio: 16 / 7; }
.media-frame--square { aspect-ratio: 1 / 1; box-shadow: none; }
.media-frame--portrait { aspect-ratio: 4 / 5; }

.media-frame-label {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 5px 11px;
  background: var(--green);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(166, 246, 229, .16);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg,
      var(--green) 0 22%,
      var(--cyan) 22% 46%,
      var(--orange) 46% 56%,
      var(--grey-900) 56% 100%);
}

.footer-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(38px, 6vw, 76px) var(--gutter) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(30px, 4vw, 52px);
}

/* brand block */
.footer-lockup {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--paper);
}

.footer-line {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 24ch;
}

.footer-summary {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(246, 247, 243, .62);
  max-width: 34ch;
}

.footer-stamp {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(166, 246, 229, .55);
}

/* nav columns */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 20px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(246, 247, 243, .16);
}

.footer-links { margin-top: 12px; display: grid; gap: 2px; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14.5px;
  text-decoration: none;
  color: rgba(246, 247, 243, .78);
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-links a:hover {
  color: var(--paper);
  border-bottom-color: var(--cyan);
}

/* contact block */
.footer-contact-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(246, 247, 243, .16);
}

.footer-contact-list { margin-top: 14px; display: grid; gap: 12px; }

.footer-contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.footer-contact-item--block { align-items: flex-start; }

.footer-contact-label {
  flex: 0 0 auto;
  padding: 1px 7px;
  background: rgba(39, 230, 200, .12);
  border: 1px solid rgba(39, 230, 200, .3);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--mist);
}

.footer-contact-value {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(246, 247, 243, .9);
  word-break: break-word;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(246, 247, 243, .28);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(246, 247, 243, .74);
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease);
}

.copy-btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
}

.footer-note {
  margin-top: 18px;
  padding-left: 12px;
  border-left: 2px solid var(--orange);
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(246, 247, 243, .55);
}

/* base bar */
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  padding-block: 22px 26px;
  border-top: 1px solid rgba(246, 247, 243, .14);
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgba(246, 247, 243, .5);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-decoration: none;
  color: rgba(166, 246, 229, .72);
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-legal-links a:hover {
  color: var(--paper);
  border-bottom-color: var(--lime);
}

/* ============================================================
   MOTION / RESPONSIVE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .skip-link { transition: none; }
  .rail-progress-bar { transition: none; }
}

@media (max-width: 1023px) {
  body.nav-locked { overflow: hidden; }
}

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

@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
  }

  .site-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: var(--rail-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 22px;
    padding: 24px 20px 26px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: inset -1px 0 0 rgba(246, 247, 243, .16);
  }

  .site-rail[data-open] {
    position: fixed;
    inset: 0 auto 0 0;
    box-shadow: inset -1px 0 0 rgba(246, 247, 243, .16);
  }

  .rail-top {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .brand { align-items: flex-start; }
  .brand-desc { max-width: 20ch; }

  .nav-toggle { display: none; }

  .site-rail .rail-nav,
  .site-rail[data-open] .rail-nav {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0;
    overflow-y: auto;
  }

  .rail-progress {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
  }

  .rail-progress-bar {
    width: 100%;
    height: calc(var(--p, 0) * 1%);
    background: linear-gradient(180deg, var(--cyan), var(--lime));
    transition: height .12s linear;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

@media (min-width: 1280px) {
  :root { --rail-w: 284px; }
  .footer-line { max-width: 26ch; }
}
