/* ==========================================================================
   赢咖指南 · 共享样式表 /assets/site.css
   语言：深靛蓝观测站仪表盘 + 暖琥珀信号色 + 霜白连续画布
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --indigo: #1B2A4A;
  --indigo-deep: #16213A;
  --ink: #0E1726;
  --amber: #E8A33D;
  --amber-deep: #C9842A;
  --frost: #F4F6F8;
  --frost-2: #E9EDF2;
  --graphite: #3C4656;
  --silver: #AAB4C0;
  --green: #5F7A61;
  --red: #D95C4A;
  --sky: #6C8EBF;

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --r-pill: 999px;

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --line-soft: rgba(60, 70, 86, .12);
  --line-dark: rgba(170, 180, 192, .18);
}

/* 3. Base typography ------------------------------------------------------ */
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--graphite);
  background: var(--frost);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--indigo);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
p { line-height: 1.75; }

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
#main-content { scroll-margin-top: 118px; }

/* 4. Layout primitives ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.canvas { background: var(--frost); }
.canvas--white { background: #fff; }
.canvas--ink { background: var(--ink); color: var(--frost); }
.canvas--indigo { background: var(--indigo); color: var(--frost); }

.section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.panel {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.panel--indigo { background: var(--indigo); color: #D6DEE9; border-color: transparent; }
.panel--indigo h2, .panel--indigo h3 { color: var(--frost); }
.panel--ink { background: var(--ink); color: #C3CCD8; border-color: transparent; }
.panel--ink h2, .panel--ink h3 { color: var(--frost); }
.panel--amber { background: var(--amber); color: var(--ink); border-color: transparent; }
.panel--amber h2, .panel--amber h3 { color: var(--ink); }
.panel--green { background: var(--green); color: #EAF0EA; border-color: transparent; }
.panel--green h2, .panel--green h3 { color: #fff; }
.panel--flush { background: transparent; border: 0; padding: 0; }

.divider {
  height: 1px;
  border: 0;
  background: var(--line-soft);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}
.divider--ticks {
  height: 14px;
  background-color: transparent;
  background-image: repeating-linear-gradient(90deg, rgba(170, 180, 192, .65) 0 1px, transparent 1px 14px);
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 12px;
}

/* 5. Text utilities ------------------------------------------------------- */
.display {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.06em;
  color: var(--indigo);
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.85;
  color: var(--graphite);
  max-width: 58ch;
}

.note { font-size: .8125rem; line-height: 1.7; color: #6B7686; }
.mono { font-family: var(--font-mono); letter-spacing: .04em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

.idx { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; color: var(--silver); }

.link {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-color: rgba(232, 163, 61, .65);
  text-underline-offset: 4px;
}
.link:hover { color: var(--amber-deep); text-decoration-color: currentColor; }

/* 6. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn--amber:hover { background: #F2B455; border-color: #F2B455; }

.btn--ghost { background: transparent; color: var(--frost); border-color: rgba(170, 180, 192, .45); }
.btn--ghost:hover { color: var(--amber); border-color: var(--amber); }

.btn--ink { background: var(--indigo); color: var(--frost); border-color: var(--indigo); }
.btn--ink:hover { background: var(--ink); border-color: var(--ink); }

.btn--line { background: transparent; color: var(--indigo); border-color: rgba(60, 70, 86, .28); }
.btn--line:hover { border-color: var(--amber); color: var(--amber-deep); }

/* 7. Tags & stats --------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .7rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(60, 70, 86, .22);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
}
.tag--amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.tag--green { background: rgba(95, 122, 97, .14); border-color: rgba(95, 122, 97, .42); color: var(--green); }
.tag--red { background: rgba(217, 92, 74, .14); border-color: rgba(217, 92, 74, .42); color: var(--red); }
.tag--ink { background: var(--indigo); border-color: var(--indigo); color: var(--frost); }

.stat { border-top: 2px solid var(--indigo); padding-top: .85rem; }
.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--indigo);
}
.stat__label { display: block; margin-top: .4rem; font-size: .8125rem; color: #6B7686; }

/* 8. Image containers ---------------------------------------------------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--indigo) 0%, var(--ink) 100%);
  aspect-ratio: 16 / 9;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--portrait { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--framed { border: 1px solid rgba(170, 180, 192, .4); padding: .5rem; background: transparent; }
.media--framed img { border-radius: calc(var(--r-lg) - 10px); }

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem .9rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--frost);
  background: linear-gradient(180deg, rgba(14, 23, 38, 0), rgba(14, 23, 38, .88));
}
.media__badge { position: absolute; top: 1rem; left: 1rem; }

.media__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(rgba(170, 180, 192, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 180, 192, .16) 1px, transparent 1px);
  background-size: 48px 48px;
}
.media__placeholder span {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--silver);
}

/* 9. Breadcrumb ----------------------------------------------------------- */
.crumb { background: #fff; border-bottom: 1px solid var(--line-soft); }
.crumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-block: .85rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--silver);
}
.crumb__list li { display: inline-flex; align-items: center; gap: .5rem; }
.crumb__list li + li::before { content: "/"; color: rgba(170, 180, 192, .8); }
.crumb__link { color: var(--silver); }
.crumb__link:hover { color: var(--amber-deep); }
.crumb__current { color: var(--indigo); }

/* 10. Index list ---------------------------------------------------------- */
.list-index { display: grid; }
.list-index__item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}
.list-index__item:first-child { border-top: 1px solid var(--line-soft); }
.list-index__no { font-family: var(--font-mono); font-size: .75rem; color: var(--amber-deep); padding-top: .3rem; }

/* 11. Reveal -------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* 12. Header -------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: .6rem 1rem;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: .75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--frost);
  border-bottom: 1px solid var(--line-dark);
}

.cmd-strip { background: var(--indigo); border-bottom: 1px solid rgba(170, 180, 192, .14); }
.cmd-strip__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silver);
}
.cmd-strip__tag { color: var(--amber); flex: 0 0 auto; }
.cmd-strip__hint {
  margin-inline-end: auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cmd-strip__status { display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, .22);
}

.cmd-bar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding-block: .55rem;
}

.brand { display: inline-flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.brand__mark {
  padding: .38rem .55rem;
  border-radius: var(--r-sm);
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.06; }
.brand__name { font-size: 1.125rem; font-weight: 800; color: var(--frost); letter-spacing: .02em; }
.brand__sub {
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--silver);
}

.nav { margin-inline-start: auto; }
.nav__list { display: flex; align-items: center; gap: .15rem; }
.nav__item { display: block; }
.nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: var(--r-pill);
  color: #CBD4E0;
  font-size: .9375rem;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav__idx { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .06em; color: var(--silver); }
.nav__label { display: inline-block; }
.nav__link:hover { color: var(--frost); background: rgba(108, 142, 191, .2); }
.nav__link[aria-current="page"] { background: var(--amber); color: var(--ink); font-weight: 700; }
.nav__link[aria-current="page"] .nav__idx { color: rgba(14, 23, 38, .62); }

.nav__actions { display: none; }

.cmd-bar__actions { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  align-items: center;
  gap: .55rem;
  padding: .5rem .85rem;
  border: 1px solid rgba(170, 180, 192, .45);
  border-radius: var(--r-pill);
  color: var(--frost);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.nav-toggle:hover { border-color: var(--amber); color: var(--amber); }
.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--sky));
}

/* 13. Footer -------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  background: var(--ink);
  color: var(--silver);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 163, 61, .65), transparent);
}
.footer-rail {
  height: 16px;
  background-image: repeating-linear-gradient(90deg, rgba(170, 180, 192, .32) 0 1px, transparent 1px 22px);
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.footer-brand__mark {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--amber);
}
.footer-brand__name { margin-top: .4rem; font-size: 1.25rem; font-weight: 800; color: var(--frost); }
.footer-brand__line { margin-top: .8rem; max-width: 34ch; font-size: .9375rem; line-height: 1.8; color: #95A1B0; }
.footer-brand__meta {
  margin-top: .8rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: var(--amber);
}

.footer-col__title {
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--frost);
}

.footer-nav__list,
.footer-legal__list { display: grid; gap: .55rem; }

.footer-link { color: #A9B4C2; font-size: .9375rem; transition: color .18s var(--ease); }
.footer-link:hover { color: var(--amber); }
.footer-link[aria-current="page"] { color: var(--amber); }

.footer-contact__list { display: grid; gap: .85rem; }
.footer-contact__item { display: grid; gap: .15rem; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--silver);
}
.footer-contact__val { font-size: .875rem; line-height: 1.6; color: #C3CCD8; word-break: break-word; }

.footer-base { border-top: 1px solid var(--line-dark); background: rgba(0, 0, 0, .22); }
.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  color: #7C8798;
}
.footer-base__copy { margin-inline-end: auto; }
.footer-base__icp .footer-link { font-size: .6875rem; color: #A9B4C2; }
.footer-base__note { color: #7C8798; }

/* 14. Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .cmd-bar__actions { display: none; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 70;
    display: block;
    margin: 0;
    padding: .6rem var(--gutter) 1.4rem;
    max-height: calc(100vh - 120px);
    overflow: auto;
    background: var(--indigo);
    border-bottom-left-radius: var(--r-lg);
    border-bottom-right-radius: var(--r-lg);
    box-shadow: 0 26px 44px rgba(14, 23, 38, .42);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s linear;
  }
  .site-header [data-nav][data-open="true"] { visibility: visible; opacity: 1; transform: none; }

  .nav__list { flex-direction: column; align-items: stretch; gap: .2rem; }
  .nav__item { width: 100%; }
  .nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: .8rem .9rem;
    border-radius: var(--r-md);
    font-size: 1rem;
  }
  .nav__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-dark);
  }
  .nav__action { flex: 1 1 auto; }

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

@media (max-width: 860px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .cmd-strip__status { display: none; }
  .cmd-strip__inner { min-height: 30px; }
  .brand__sub { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-base__copy { margin-inline-end: 0; }
}

/* 15. Motion preferences -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
