/* ==========================================================================
   乐投指南 — 共享样式 /assets/site.css
   工业蓝结构 · 暖橙动作 · 米白呼吸 · 极细边界
   ========================================================================== */

:root {
  --blue-900: #0B2F52;
  --blue-700: #104C7C;
  --blue-500: #1E6FA8;
  --blue-200: #BBD3E6;
  --orange-600: #D2600A;
  --orange-400: #F08C2E;
  --green-600: #1F7A5C;
  --paper: #F6F3EC;
  --gray-100: #E4E9EE;
  --ink: #111820;
  --gray-500: #5B6875;

  --line: rgba(16, 76, 124, 0.18);
  --line-strong: rgba(16, 76, 124, 0.35);
  --line-on-dark: rgba(187, 211, 230, 0.22);
  --shadow-sm: 0 4px 12px rgba(11, 47, 82, 0.07);
  --shadow-md: 0 8px 22px rgba(11, 47, 82, 0.11);

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

  --radius: 2px;
  --shell: 1320px;
  --header-h: 62px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  color: var(--blue-900);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.9vw, 2.2rem); }
h3 { font-size: clamp(1.12rem, 1.8vw, 1.38rem); }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

a {
  color: var(--blue-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}
a:hover { color: var(--orange-600); }

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

button { font-family: inherit; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.94em; }

hr { border: 0; }

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

::selection {
  background: var(--blue-200);
  color: var(--blue-900);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--blue-900);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

/* ---------- Header shell ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
}

.progress-bar {
  height: 3px;
  background: var(--blue-200);
  overflow: hidden;
}

.progress-bar__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange-600);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.command-bar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.command-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  min-height: var(--header-h);
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px);
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--blue-900);
}
.brand:hover { color: var(--blue-900); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--blue-900);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  border-radius: var(--radius);
}

.brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ---------- Status ticker ---------- */
.status-ticker {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--gray-500);
}

.status-ticker__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-600);
}

.status-ticker__viewport {
  position: relative;
  display: block;
  height: 18px;
  min-width: 186px;
  overflow: hidden;
}

.status-ticker__item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(6px);
  white-space: nowrap;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.status-ticker__item.is-active {
  opacity: 1;
  transform: none;
}

/* ---------- Nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.nav-toggle:hover { border-color: var(--blue-500); color: var(--blue-900); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle__text { line-height: 1; }

/* ---------- Primary nav ---------- */
.primary-nav { margin-left: auto; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 14px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav__item { list-style: none; }

.primary-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 2px;
  border-bottom: 2px solid transparent;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.primary-nav__link:hover {
  color: var(--orange-600);
  border-bottom-color: rgba(210, 96, 10, 0.35);
}

.primary-nav__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.primary-nav__link[aria-current="page"] {
  color: var(--blue-900);
  font-weight: 900;
  border-bottom-color: var(--orange-600);
}
.primary-nav__link[aria-current="page"] .primary-nav__index { color: var(--orange-600); }

/* ---------- Header action ---------- */
.command-bar__action {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.command-bar__action .btn {
  padding: 10px 16px;
  font-size: 13.5px;
}

/* ---------- Scrim ---------- */
.nav-scrim { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease,
    border-color 0.16s ease, transform 0.16s ease;
}

.btn--primary {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: #FFFFFF;
}
.btn--primary:hover {
  background: var(--orange-400);
  border-color: var(--orange-400);
  color: #FFFFFF;
}
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--blue-700);
}
.btn--ghost:hover {
  background: rgba(30, 111, 168, 0.07);
  border-color: var(--blue-500);
  color: var(--blue-900);
}

.btn--block { width: 100%; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.container--narrow { max-width: 920px; }

#main-content {
  display: block;
  scroll-margin-top: 84px;
}

.section { padding-block: clamp(36px, 5vw, 72px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.section-title {
  position: relative;
  margin: 0;
  padding-left: 20px;
  color: var(--blue-700);
  transition: color 0.35s ease;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--blue-200);
  transition: background-color 0.35s ease, width 0.35s ease;
}

.section-title.is-current { color: var(--blue-900); }
.section-title.is-current::before {
  width: 14px;
  background: var(--orange-600);
}

.section-title__index {
  margin-right: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.46em;
  font-weight: 500;
  vertical-align: 0.34em;
  letter-spacing: 0.06em;
  color: var(--orange-600);
}

.section-desc {
  max-width: 56ch;
  margin: 0;
  font-size: 15px;
  color: var(--gray-500);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-600);
}

.eyebrow--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.28em;
  padding: 6px 0;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--8-3 { grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); }

/* ---------- Panel & Card ---------- */
.panel {
  padding: clamp(18px, 2.2vw, 28px);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2.2vw, 26px);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.card:hover {
  border-color: rgba(30, 111, 168, 0.45);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--blue-900);
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.card__body {
  font-size: 15px;
  color: var(--gray-500);
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card--offset { margin-top: 0; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: var(--blue-200);
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  border-radius: var(--radius);
  white-space: nowrap;
}

.tag--stock { background: var(--green-600); color: #FFFFFF; }
.tag--action { background: var(--orange-600); color: #FFFFFF; }
.tag--warranty {
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  color: var(--blue-700);
}
.tag--mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---------- Stats & Meter ---------- */
.stat { display: grid; gap: 4px; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--blue-900);
}

.stat__label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.meter {
  position: relative;
  height: 6px;
  background: var(--blue-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.meter__fill {
  display: block;
  height: 100%;
  background: var(--blue-500);
  transition: width 0.2s ease;
}

.meter__fill--current { background: var(--orange-600); }

/* ---------- Divider & Note ---------- */
.divider {
  height: 1px;
  margin: clamp(24px, 3vw, 40px) 0;
  background: var(--line);
  border: 0;
}

.note {
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--blue-200);
  font-size: 14.5px;
  color: var(--gray-500);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { margin: 0 0 clamp(18px, 2.5vw, 28px); }

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--gray-500);
}

.breadcrumbs__item { list-style: none; }

.breadcrumbs__link {
  color: var(--blue-500);
  text-decoration: none;
}
.breadcrumbs__link:hover { color: var(--orange-600); text-decoration: underline; }

.breadcrumbs__sep {
  font-family: var(--font-mono);
  color: var(--blue-200);
}

.breadcrumbs__current { color: var(--gray-500); }

/* ---------- Media frames ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.media-frame__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--blue-500);
}

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3  { aspect-ratio: 4 / 3; }
.media-frame--1x1  { aspect-ratio: 1 / 1; }
.media-frame--3x4  { aspect-ratio: 3 / 4; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--blue-900);
  border-top: 3px solid var(--orange-600);
  color: #D7E4EF;
}

.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 66px) clamp(16px, 4vw, 40px) 26px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 2fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.site-footer .brand { color: #FFFFFF; }
.site-footer .brand:hover { color: #FFFFFF; }
.site-footer .brand__name { color: #FFFFFF; }
.site-footer .brand__mark { background: var(--orange-600); color: #FFFFFF; }

.footer__tagline {
  max-width: 28ch;
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #9FB8CD;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-200);
}

.footer__list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__link {
  font-size: 14.5px;
  color: #D7E4EF;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer__link:hover {
  color: #FFFFFF;
  border-bottom-color: var(--orange-400);
}

.footer__info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 22px;
  border-top: 1px solid var(--line-on-dark);
}

.footer__info-item { display: grid; gap: 3px; }

.footer__info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--blue-200);
}

.footer__info-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #E8F1F8;
  word-break: break-word;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(187, 211, 230, 0.14);
  font-size: 12.5px;
  color: #7E98AF;
}

.footer__copy,
.footer__sign { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* --- Tablet & down: 移动抽屉导航 --- */
@media (max-width: 1119px) {
  .command-bar__inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    row-gap: 8px;
  }

  .nav-toggle {
    display: inline-flex;
    order: 1;
    margin-left: auto;
  }

  .command-bar__action { order: 2; }
  .command-bar__action .btn { padding: 9px 13px; font-size: 13px; }

  .status-ticker {
    order: 3;
    flex: 1 0 100%;
    padding-top: 8px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .status-ticker__viewport { min-width: 0; flex: 1 1 auto; }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    width: min(352px, 86vw);
    margin-left: 0;
    padding: 76px 22px 32px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 32px rgba(11, 47, 82, 0.16);
    overflow-y: auto;
    transform: translateX(102%);
    transition: transform 0.24s ease;
  }

  .site-header[data-open] .primary-nav { transform: none; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    font-size: 16px;
    color: var(--blue-900);
  }

  .primary-nav__link:hover {
    border-bottom-color: var(--line);
    border-left-color: var(--blue-200);
    color: var(--orange-600);
  }

  .primary-nav__link[aria-current="page"] {
    border-bottom-color: var(--line);
    border-left-color: var(--orange-600);
    color: var(--blue-900);
  }

  .primary-nav__index { font-size: 12px; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    padding: 0;
    border: 0;
    background: rgba(11, 47, 82, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-header[data-open] .nav-scrim {
    opacity: 1;
    visibility: visible;
  }
}

/* --- 900px & down --- */
@media (max-width: 900px) {
  .grid--8-3 { grid-template-columns: minmax(0, 1fr); }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

/* --- 760px & down --- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__info { flex-direction: column; gap: 14px; }
  .card--offset { margin-top: 0; }
}

/* --- 560px & down --- */
@media (max-width: 560px) {
  .nav-toggle__text { display: none; }
  .brand__name { font-size: 16.5px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; }
  .section-title { padding-left: 16px; }
}

/* --- 900px & up --- */
@media (min-width: 901px) {
  .card--offset { margin-top: 48px; }
  .card--offset-sm { margin-top: 24px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover { transform: none; }
  .status-ticker__item { transition: none; }
}
