/* =====================================================
   财神棋牌88 · KY 开元棋牌
   Shared Site Kit — /assets/site.css
   Fingerprint: 66ba24cdbb22ae47
   ===================================================== */

/* ---------- 01. Design Tokens ---------- */
:root {
  --c-ink: #0B0B10;
  --c-ink-2: #12121A;
  --c-ink-3: #1B1B26;
  --c-ivory: #F4F1E8;
  --c-paper: #FFFCF5;
  --c-gold: #E3B44F;
  --c-sand: #D29A4C;
  --c-gold-ink: #8C6A1E;
  --c-red: #8F1D2C;
  --c-red-deep: #6E1622;
  --c-navy: #18273D;
  --c-navy-2: #223354;
  --c-mist: #D9D9D9;
  --c-warn: #B33A3A;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --sidebar-w: 260px;
  --max-w: 1400px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h-mobile: 88px;
  --dur: 200ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 02. Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

body {
  min-height: 100vh;
  padding-top: var(--header-h-mobile);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-ivory);
  background-color: var(--c-ink);
  background-image:
    repeating-linear-gradient(135deg, transparent 0 64px, rgba(227, 180, 79, 0.02) 64px 65px),
    radial-gradient(900px 500px at 100% -10%, rgba(24, 39, 61, 0.45), transparent 60%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--c-ivory);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}

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

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h-mobile) + 8px);
}

/* ---------- 03. Focus & Skip Link ---------- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 10px 22px;
  background: var(--c-gold);
  color: var(--c-ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 10px;
}

/* ---------- 04. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  background: var(--c-ink);
  border-bottom: 1px solid rgba(227, 180, 79, 0.18);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
}

.header-shell__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 900;
  line-height: 1;
  color: var(--c-ink);
  background: linear-gradient(135deg, var(--c-gold), var(--c-sand));
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.brand__words {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand__num {
  color: var(--c-gold);
  font-weight: 900;
}

.brand__sub {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: rgba(217, 217, 217, 0.6);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 44px;
  padding: 6px;
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-gold);
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}

.nav-toggle__label {
  font-size: 0.5625rem;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(217, 217, 217, 0.55);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

[data-nav] {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  display: none;
  padding: 12px 16px 20px;
  background: linear-gradient(180deg, var(--c-ink), var(--c-ink-2));
  border-bottom: 1px solid rgba(227, 180, 79, 0.22);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.55);
}

[data-nav][data-open="true"] {
  display: block;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

[data-nav][data-open="false"] {
  display: none;
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-list__item {
  border-bottom: 1px solid rgba(143, 29, 44, 0.22);
}

.nav-list__item:last-child {
  border-bottom: none;
}

.nav-link {
  display: block;
  position: relative;
  padding: 12px 14px;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: rgba(244, 241, 232, 0.76);
  border-left: 2px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.nav-link:hover {
  padding-left: 18px;
  color: var(--c-paper);
  background: rgba(143, 29, 44, 0.18);
}

.nav-link[aria-current="page"] {
  color: var(--c-gold);
  background: linear-gradient(90deg, rgba(143, 29, 44, 0.26), transparent 80%);
  border-left-color: var(--c-gold);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.icp-mini {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: rgba(217, 217, 217, 0.4);
  text-align: center;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 16px;
  border-top: 1px solid rgba(143, 29, 44, 0.55);
  background: linear-gradient(90deg, rgba(143, 29, 44, 0.2), transparent 85%);
}

.ticker__glyph {
  flex: none;
  font-size: 0.625rem;
  color: var(--c-gold);
}

.ticker__text {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--c-mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 05. Desktop Sidebar Layout ---------- */
@media (min-width: 960px) {
  body {
    margin-left: var(--sidebar-w);
    padding-top: 0;
  }

  #main-content {
    scroll-margin-top: 0;
  }

  .site-header {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 28px 20px 18px;
    border-bottom: none;
    border-right: 1px solid rgba(143, 29, 44, 0.5);
    background:
      repeating-linear-gradient(160deg, transparent 0 24px, rgba(227, 180, 79, 0.02) 24px 25px),
      var(--c-ink);
  }

  .header-shell {
    height: auto;
    padding: 0;
  }

  .header-shell__actions {
    display: none;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand__glyph {
    width: 52px;
    height: 52px;
    font-size: 2.125rem;
  }

  .nav-toggle {
    display: none;
  }

  [data-nav],
  [data-nav][data-open="true"],
  [data-nav][data-open="false"] {
    position: static;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 42px;
    padding: 0;
    background: none;
    border-bottom: none;
    box-shadow: none;
    overflow: visible;
  }

  .nav-list {
    gap: 2px;
  }

  .nav-list__item {
    border-bottom: none;
  }

  .nav-link {
    padding: 9px 12px;
    font-size: 0.875rem;
  }

  .nav-link:hover {
    padding-left: 16px;
  }

  .nav-cta {
    margin-top: auto;
    padding-top: 32px;
  }

  .ticker {
    min-height: 0;
    margin-top: 24px;
    padding: 10px 10px 0;
    border-top: 1px solid rgba(143, 29, 44, 0.5);
    background: linear-gradient(90deg, rgba(143, 29, 44, 0.22), transparent);
  }

  .ticker__glyph {
    display: none;
  }

  .ticker__text {
    white-space: normal;
    font-size: 0.6875rem;
  }
}

/* ---------- 06. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--c-ivory);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur);
}

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

.btn--gold {
  background: linear-gradient(135deg, var(--c-gold), var(--c-sand));
  color: var(--c-ink);
  font-weight: 600;
}

.btn--gold:hover {
  background: linear-gradient(135deg, #EFC966, var(--c-gold));
}

.btn--outline {
  border: 1px solid rgba(227, 180, 79, 0.55);
  background: rgba(227, 180, 79, 0.05);
  color: var(--c-gold);
}

.btn--outline:hover {
  background: rgba(227, 180, 79, 0.14);
}

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

.btn--chamfer {
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.btn--compact {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn__text {
  font-weight: 600;
}

.btn__sub {
  font-size: 0.75rem;
  opacity: 0.72;
}

.nav-cta .btn {
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
}

.nav-cta .btn__sub {
  font-size: 0.6875rem;
  opacity: 0.65;
}

/* ---------- 07. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 56px, rgba(227, 180, 79, 0.018) 56px 57px),
    linear-gradient(0deg, var(--c-ink), #0D0D16);
  border-top: 1px solid rgba(143, 29, 44, 0.55);
}

.footer-edge {
  display: flex;
  height: 4px;
  background: linear-gradient(90deg, var(--c-red) 0%, var(--c-red) 24%, var(--c-gold) 50%, rgba(227, 180, 79, 0.2) 78%, transparent 100%);
}

.footer-edge__bar {
  display: block;
  width: 160px;
  max-width: 28%;
  height: 100%;
  margin-left: auto;
  background: linear-gradient(135deg, transparent 52%, var(--c-sand) 52%, var(--c-gold) 68%, transparent 68%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 48px var(--gutter) 36px;
}

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

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.footer-brand__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-ivory);
}

.footer-brand__num {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 900;
  color: var(--c-gold);
}

.footer-brand__sub {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: rgba(217, 217, 217, 0.55);
}

.footer-claim {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--c-gold);
}

.footer-desc {
  margin-top: 10px;
  max-width: 34em;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(217, 217, 217, 0.72);
}

.footer-heading {
  display: inline-block;
  margin-bottom: 16px;
  padding-bottom: 6px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-ivory);
  border-bottom: 1px solid rgba(227, 180, 79, 0.3);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: rgba(244, 241, 232, 0.72);
}

.contact-row__label {
  min-width: 3.6em;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(217, 217, 217, 0.5);
}

.contact-row__value {
  color: var(--c-paper);
  overflow-wrap: anywhere;
}

.copy-btn {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--c-gold);
  background: rgba(227, 180, 79, 0.05);
  border: 1px solid rgba(227, 180, 79, 0.4);
  clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}

.copy-btn:hover {
  background: rgba(227, 180, 79, 0.16);
}

.copy-btn.is-copied {
  background: var(--c-gold);
  color: var(--c-ink);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list__item {
  line-height: 1.3;
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(244, 241, 232, 0.72);
  text-decoration: none;
  transition: color var(--dur);
}

.footer-link:hover {
  color: var(--c-gold);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--gutter);
  background: rgba(143, 29, 44, 0.13);
  border-top: 1px solid rgba(143, 29, 44, 0.35);
  border-bottom: 1px solid rgba(143, 29, 44, 0.18);
}

.footer-note__symbol {
  flex: none;
  font-size: 0.625rem;
  color: var(--c-gold);
}

.footer-note__text {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(244, 241, 232, 0.7);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  font-size: 0.6875rem;
  color: rgba(217, 217, 217, 0.42);
}

.footer-bottom__copy,
.footer-bottom__icp,
.footer-bottom__trust {
  margin: 0;
}

.footer-bottom__icp {
  letter-spacing: 0.1em;
}

.footer-bottom__trust {
  flex-basis: 100%;
}

/* ---------- 08. Back to Top ---------- */
.back-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 4px 0 0;
  font-family: var(--font-sans);
  color: var(--c-ink);
  background: linear-gradient(160deg, var(--c-gold), var(--c-sand));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top__arrow {
  font-size: 1.125rem;
  line-height: 1;
  font-weight: 700;
}

.back-top__label {
  font-size: 0.5625rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

/* ---------- 09. Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.8125rem;
}

.breadcrumb-item {
  color: rgba(217, 217, 217, 0.55);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 8px;
  color: var(--c-red);
}

.breadcrumb-link {
  color: var(--c-gold);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-item[aria-current="page"] {
  color: var(--c-ivory);
}

/* ---------- 10. Layout Primitives ---------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 8vw, 100px);
}

.section--tight {
  padding-block: 36px;
}

.section-kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--c-gold);
}

.section-title {
  position: relative;
  padding-left: 18px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.14em;
  bottom: 0.14em;
  width: 5px;
  background: linear-gradient(180deg, var(--c-gold), var(--c-red));
}

/* ---------- 11. Prose ---------- */
.html-prose {
  max-width: 72ch;
}

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

.html-prose h2,
.html-prose h3,
.html-prose h4 {
  margin-top: 1.8em;
}

.html-prose p {
  color: rgba(244, 241, 232, 0.82);
}

.html-prose ul {
  margin-top: 1em;
}

.html-prose ul li {
  position: relative;
  padding-left: 1.15em;
  color: rgba(244, 241, 232, 0.82);
}

.html-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--c-red);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.html-prose ol {
  padding-left: 1.3em;
  color: rgba(244, 241, 232, 0.82);
}

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

.html-prose a {
  color: var(--c-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.html-prose blockquote {
  margin-top: 1.4em;
  padding: 14px 18px;
  border-left: 3px solid var(--c-gold);
  background: rgba(227, 180, 79, 0.05);
  color: rgba(244, 241, 232, 0.78);
}

.html-prose strong {
  font-weight: 600;
  color: var(--c-paper);
}

/* ---------- 12. Panels ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(145deg, var(--c-ink-2), var(--c-ink-3));
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.panel--red {
  background: linear-gradient(145deg, rgba(143, 29, 44, 0.38), rgba(110, 22, 34, 0.2));
}

.panel--red::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-red), transparent 65%);
}

.panel--navy {
  background: linear-gradient(145deg, var(--c-navy), var(--c-navy-2));
}

.panel--ivory {
  background: linear-gradient(145deg, var(--c-paper), var(--c-ivory));
  color: var(--c-ink);
}

.panel--ivory h3,
.panel--ivory h4 {
  color: var(--c-navy);
}

.panel--ivory p {
  color: rgba(11, 11, 16, 0.78);
}

/* ---------- 13. Grids ---------- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.5vw, 28px);
}

/* ---------- 14. Metric ---------- */
.metric {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-gold);
}

.metric small {
  margin-left: 4px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: rgba(217, 217, 217, 0.62);
}

/* ---------- 15. Data Table ---------- */
.data-table-wrap {
  overflow-x: auto;
  background: var(--c-paper);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 0.875rem;
}

.data-table th {
  padding: 13px 16px;
  background: var(--c-navy);
  color: var(--c-paper);
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(11, 11, 16, 0.08);
  color: rgba(11, 11, 16, 0.82);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(11, 11, 16, 0.03);
}

.data-table .cell-mark {
  color: var(--c-gold-ink);
  font-weight: 700;
}

.data-table .cell-warn {
  color: var(--c-warn);
  font-weight: 600;
}

/* ---------- 16. Tag ---------- */
.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--c-gold);
  background: rgba(227, 180, 79, 0.05);
  border: 1px solid rgba(227, 180, 79, 0.45);
  cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}

.tag:hover {
  background: rgba(227, 180, 79, 0.16);
}

.tag.is-active,
.tag[aria-pressed="true"] {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-ink);
  font-weight: 600;
}

/* ---------- 17. Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--c-gold) 0%, var(--c-red) 100%);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--c-gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.timeline-item.is-live::before {
  animation: timeline-pulse 1.8s ease-out infinite;
}

.timeline-item__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-ivory);
}

.timeline-item__time {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--c-gold);
}

.timeline-item p {
  margin-top: 6px;
  max-width: 52ch;
  font-size: 0.875rem;
  color: rgba(244, 241, 232, 0.72);
}

@keyframes timeline-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 180, 79, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(227, 180, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 180, 79, 0);
  }
}

/* ---------- 18. Accordion ---------- */
.accordion {
  border-top: 1px solid rgba(143, 29, 44, 0.4);
}

.accordion-item {
  border-bottom: 1px solid rgba(143, 29, 44, 0.28);
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 4px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--c-ivory);
  cursor: pointer;
  transition: color var(--dur);
}

.accordion-toggle:hover {
  color: var(--c-gold);
}

.accordion-toggle::after {
  content: '+';
  flex: none;
  margin-left: 16px;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--c-gold);
  transition: transform var(--dur) var(--ease);
}

.accordion-item[data-open="true"] .accordion-toggle::after {
  transform: rotate(45deg);
}

.accordion-content {
  display: none;
  padding: 0 4px 18px;
  color: rgba(244, 241, 232, 0.74);
}

.accordion-content p {
  margin-bottom: 8px;
}

.accordion-content p:last-child {
  margin-bottom: 0;
}

.accordion-item[data-open="true"] .accordion-content {
  display: block;
}

/* ---------- 19. Image Frames ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--c-ink-3);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.img-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.img-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--tall {
  aspect-ratio: 3 / 4;
}

.img-frame > img,
.img-frame > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: var(--c-ink-2);
  background-image:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(227, 180, 79, 0.04) 18px 19px),
    radial-gradient(120px 80px at 70% 30%, rgba(24, 39, 61, 0.8), transparent);
}

.figure-placeholder::after {
  content: '图示位';
  padding: 6px 16px;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(227, 180, 79, 0.5);
  border: 1px solid rgba(227, 180, 79, 0.28);
}

.figure-placeholder--alt::after {
  content: '对局示意';
}

.figure-placeholder--metric::after {
  content: '数据示意';
}

/* ---------- 20. Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 21. Responsive Grid Breakpoints ---------- */
@media (min-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 3fr 2fr 1.6fr;
  }

  .footer-bottom__trust {
    flex-basis: auto;
    margin-left: auto;
    text-align: right;
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- 22. 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;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .back-top {
    transition: none;
  }
}
