/* ==========================================
 * 星枢 API — 统一样式系统 v2
 * 所有页面共享：reset · layout · header · nav · cards · forms · tabs · tags
 * ========================================== */

/* ── CSS Variables ── */
:root {
  --c-bg: #f6f7fb;
  --c-surface: #fff;
  --c-text: #2c3e50;
  --c-text-dim: #64748b;
  --c-text-muted: #94a3b8;
  --c-heading: #1a1a2e;
  --c-primary: #4361ee;
  --c-primary-light: #eef1fc;
  --c-primary-gradient: linear-gradient(135deg, #4361ee, #6c5ce7);
  --c-danger: #c62828;
  --c-success: #2e7d32;
  --c-warning: #e65100;
  --c-border: #e2e6f0;
  --c-border-light: #eef1f8;
  --c-bg-alt: #f8f9fd;
  --c-bg-card-hd: #f8f9fd;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, sans-serif;
  --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px
}

@media(max-width:750px) {
  .container {
    padding: 16px 12px
  }
}

/* ── Header (old .xs-header → hidden) ── */
.xs-header {
  display: none
}

/* ── Lucide Icons ── */
.tn-logo i {
  width: 16px;
  height: 16px
}

.hero-btn i {
  width: 16px;
  height: 16px;
  flex-shrink: 0
}

/* ══════════════════════════════════════
   顶部导航 — 桌面端主链接 + 更多下拉
   ══════════════════════════════════════ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.top-nav.tn-scrolled {
  border-bottom-color: rgba(0, 0, 0, .06);
  box-shadow: 0 1px 16px rgba(0, 0, 0, .05);
  background: rgba(255, 255, 255, .95);
}

.top-nav--home {
  background: rgba(248, 250, 253, .8);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.top-nav--home.tn-scrolled {
  background: rgba(255, 255, 255, .92);
}

.tn-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.tn-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--c-heading);
  font-weight: 800;
  font-size: .96rem;
  letter-spacing: -.3px;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.tn-brand:hover {
  opacity: .82
}

.tn-brand:active {
  transform: scale(.97)
}

.tn-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--c-primary-gradient);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(67, 97, 238, .28);
  transition: transform var(--transition);
}

.tn-brand:hover .tn-logo {
  transform: scale(1.06)
}

.tn-name {
  white-space: nowrap
}

/* ── 导航链接区 ── */
.tn-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end
}

.tn-links>a {
  font-size: .77rem;
  font-weight: 600;
  color: var(--c-text-dim);
  padding: 9px 15px;
  border-radius: 9px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tn-links>a:hover {
  color: var(--c-primary);
  background: rgba(67, 97, 238, .06)
}

.tn-links>a:active {
  transform: scale(.95)
}

.tn-links>a.active {
  color: var(--c-primary);
  background: rgba(67, 97, 238, .1);
  font-weight: 700;
}

/* ── 更多下拉 ── */
.tn-drop {
  position: relative
}

.tn-drop-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .77rem;
  font-weight: 600;
  color: var(--c-text-dim);
  padding: 9px 15px;
  border-radius: 9px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.tn-drop-btn:hover {
  color: var(--c-primary);
  background: rgba(67, 97, 238, .06)
}

.tn-drop-btn:active {
  transform: scale(.95)
}

.tn-drop-arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--transition)
}

.tn-drop--open .tn-drop-arrow {
  transform: rotate(180deg)
}

.tn-drop--active>.tn-drop-btn {
  color: var(--c-primary);
  background: rgba(67, 97, 238, .1);
  font-weight: 700
}

.tn-drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: all .2s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}

.tn-drop--open .tn-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tn-drop-link {
  display: block;
  padding: 11px 16px !important;
  font-size: .77rem !important;
  font-weight: 600 !important;
  color: var(--c-text-dim) !important;
  border-radius: 9px !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
  white-space: nowrap !important;
}

.tn-drop-link:hover {
  color: var(--c-primary) !important;
  background: rgba(67, 97, 238, .06) !important
}

.tn-drop-link.active {
  color: var(--c-primary) !important;
  background: rgba(67, 97, 238, .1) !important;
  font-weight: 700 !important
}

/* ── Mobile Hamburger ── */
.tn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
  border-radius: 9px;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.tn-hamburger:hover {
  background: rgba(67, 97, 238, .06)
}

.tn-hamburger:active {
  transform: scale(.9)
}

.tn-hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--c-heading);
  border-radius: 3px;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  transform-origin: center;
}

.tn-open .tn-hamburger span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg)
}

.tn-open .tn-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0)
}

.tn-open .tn-hamburger span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg)
}

.tn-drop-menu>a.active {
  color: var(--c-primary);
  background: rgba(67, 97, 238, .1);
  font-weight: 700;
  padding: 11px 16px !important;
  margin: 5px 0;
  border-radius: 10px;
  font-size: .88rem;
  width: 100%;
}

/* Mobile Nav */
@media(max-width:750px) {
  .tn-inner {
    padding: 0 16px;
    height: 56px;
    gap: 8px
  }

  .tn-brand {
    font-size: .9rem;
    gap: 8px
  }

  .tn-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px
  }

  .tn-hamburger {
    display: flex
  }

  .tn-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, .99);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    padding: 8px 12px 16px;
    gap: 2px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .08);
    animation: tnSlideDown .24s cubic-bezier(.4, 0, .2, 1);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  @keyframes tnSlideDown {
    from {
      opacity: 0;
      transform: translateY(-12px)
    }

    to {
      opacity: 1;
      transform: translateY(0)
    }
  }

  .top-nav--home .tn-links {
    background: rgba(255, 255, 255, .99)
  }

  .tn-open .tn-links {
    display: flex
  }

  .tn-links>a {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: .88rem;
    width: 100%;
  }

  /* 移动端：清除桌面端 hover 残留，改用 active 反馈 */
  .tn-links>a:hover,
  .tn-drop-btn:hover,
  .tn-drop-link:hover {
    background: transparent;
    color: var(--c-text-dim)
  }

  .tn-links>a:hover.active,
  .tn-drop-link:hover.active {
    color: var(--c-primary);
    background: rgba(67, 97, 238, .1)
  }

  .tn-links>a:active,
  .tn-drop-link:active {
    background: rgba(67, 97, 238, .1);
    transform: scale(.98)
  }

  .tn-hamburger:hover {
    background: transparent
  }

  /* 移动端：下拉展开为平铺链接 */
  .tn-drop {
    display: contents
  }

  .tn-drop-btn {
    display: none
  }

  .tn-drop-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .tn-drop-link {
    padding: 14px 16px !important;
    font-size: .88rem !important;
    border-radius: 10px !important;
    width: 100% !important;
    margin: 0;

  }



  .tn-drop-menu>a.active {
    color: var(--c-primary);
    background: rgba(67, 97, 238, .1);
    font-weight: 700;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: .88rem;
    width: 100%;
  }
}

/* ══════════════════════════════════════
   Hero Section
   ══════════════════════════════════════ */
.hero {
  background: linear-gradient(170deg, #eef2ff 0%, #f5f7ff 20%, #fafbff 50%, var(--c-bg) 100%);
  text-align: center;
  padding: 80px 24px 96px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* 背景点阵装饰 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: radial-gradient(rgba(67, 97, 238, .12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* 光晕球1 */
.hero-bloom-1 {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(108, 92, 231, .12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: heroFloat 8s ease-in-out infinite;
}

/* 光晕球2 */
.hero-bloom-2 {
  position: absolute;
  bottom: -160px;
  left: -100px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(67, 97, 238, .09) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: heroFloat 10s ease-in-out infinite reverse;
}

/* 光晕球3 */
.hero-bloom-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(67, 97, 238, .04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1)
  }

  50% {
    transform: translate(14px, -16px) scale(1.06)
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--c-primary);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(67, 97, 238, .1);
  padding: 6px 20px;
  border-radius: 24px;
  margin-bottom: 24px;
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(67, 97, 238, .05);
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .2);
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .5)
  }

  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0)
  }
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 900;
  color: var(--c-heading);
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero-title em {
  font-style: normal;
  background: var(--c-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: .88rem;
  color: var(--c-text-dim);
  line-height: 1.85;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  font-size: .84rem;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.hero-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .15);
  opacity: 0;
  transition: opacity var(--transition);
}

.hero-btn:active::after {
  opacity: 1
}

.hero-btn:active {
  transform: scale(.96)
}

.hero-btn--primary {
  background: var(--c-primary-gradient);
  color: #fff;
  box-shadow: 0 4px 28px rgba(67, 97, 238, .32);
}

.hero-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(67, 97, 238, .42)
}

.hero-btn--outline {
  color: var(--c-primary);
  border: 1.5px solid rgba(67, 97, 238, .16);
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(4px);
}

.hero-btn--outline:hover {
  background: rgba(67, 97, 238, .04);
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(67, 97, 238, .08);
}

@media(max-width:750px) {
  .hero {
    padding: 48px 20px 60px
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -1px
  }

  .hero-sub {
    font-size: .8rem
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px
  }
}

/* ── Footer ── */
.xs-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-top: 40px;
  padding: 22px 12px 8px;
  border-top: 1px solid var(--c-border-light);
  font-size: .72rem;
  color: var(--c-text-muted);
}

.footer-copy {
  line-height: 1.5;
}

.filing-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  width: 100%;
  flex-wrap: wrap;
}

.filing-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  font-size: .68rem;
  line-height: 1.4;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.filing-link:hover {
  color: var(--c-primary);
  border-color: var(--c-border);
  background: var(--c-bg-alt);
}

.filing-link img {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

@media(max-width:520px) {
  .xs-footer {
    gap: 10px;
    margin-top: 28px;
    padding: 18px 8px 6px;
  }

  .filing-links {
    flex-direction: column;
    gap: 4px;
  }

  .filing-link {
    justify-content: center;
    width: 100%;
    max-width: 290px;
    padding: 5px 8px;
  }
}

/* ══════════════════════════════════════
   Card
   ══════════════════════════════════════ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md)
}

.card-hd {
  padding: 14px 18px;
  background: var(--c-bg-card-hd);
  border-bottom: 1px solid var(--c-border-light);
  font-size: .82rem;
  font-weight: 700;
  color: #34495e;
}

.card-bd {
  padding: 16px 18px
}

/* ══════════════════════════════════════
   Form Controls
   ══════════════════════════════════════ */
label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: #5a6c7d;
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

label:first-child {
  margin-top: 0
}

label.required::after {
  content: " *";
  color: #e74c3c;
  margin-left: 2px
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  font-size: .78rem;
  background: var(--c-surface);
  border: 1.5px solid #dce1ec;
  border-radius: var(--radius);
  color: var(--c-text);
  outline: none;
  font-family: inherit;
  transition: all var(--transition);
}

input:hover,
select:hover {
  border-color: #c4cde0
}

input:focus,
select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, .08);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px
}

.row {
  display: flex;
  gap: 10px
}

.row>div {
  flex: 1
}

.hint {
  font-size: .68rem;
  color: var(--c-text-muted);
  margin-top: 3px
}

/* ── Checkbox ── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: .72rem;
  font-weight: 600;
  color: #5a6c7d;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-primary);
  cursor: pointer;
  margin: 0;
}

/* ══════════════════════════════════════
   Buttons
   ══════════════════════════════════════ */
.btn {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 14px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .15);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:active::after {
  opacity: 1
}

.btn:active:not(:disabled) {
  transform: scale(.96)
}

.btn-primary {
  background: var(--c-primary-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(67, 97, 238, .2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(67, 97, 238, .3);
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ══════════════════════════════════════
   Tabs
   ══════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--c-border-light);
  margin-bottom: 24px;
  justify-content: center;
}

.tabs button {
  padding: 10px 24px;
  background: none;
  border: none;
  color: #78909c;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.tabs button:hover {
  color: #546e7a
}

.tabs button.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

.tabs button:active {
  transform: scale(.94)
}

/* ══════════════════════════════════════
   Tags
   ══════════════════════════════════════ */
.tag {
  font-size: .62rem;
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-block;
}

.tag-fire {
  background: #fce4e4;
  color: #c0392b
}

.tag-earth {
  background: #e8f5e9;
  color: var(--c-success)
}

.tag-air {
  background: #e3f2fd;
  color: #1565c0
}

.tag-water {
  background: #ede7f6;
  color: #4527a0
}

.tag-wood {
  background: #e8f5e9;
  color: var(--c-success)
}

.tag-metal {
  background: #fff8e1;
  color: #f9a825
}

.tag-sun {
  background: #fff9c4;
  color: #f57f17
}

.tag-moon {
  background: #ede7f6;
  color: #6a1b9a
}

.tag-neutral {
  background: #f5f5f5;
  color: #546e7a
}

.tag-night {
  background: #263238;
  color: #b0bec5
}

.tag-day {
  background: #fff9c4;
  color: #f57f17
}

.tag-harmonious {
  background: #e8f5e9;
  color: var(--c-success)
}

.tag-tense {
  background: #ffebee;
  color: var(--c-danger)
}

/* ══════════════════════════════════════
   Detail Panel
   ══════════════════════════════════════ */
.detail {
  display: none
}

.detail.show {
  display: block
}

.detail-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.detail-hd {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-hd .dh-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-heading)
}

.detail-hd .dh-meta {
  font-size: .74rem;
  color: var(--c-text-dim);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.detail-hd .dh-meta span {
  white-space: nowrap
}

.detail-hd .dh-back {
  cursor: pointer;
  font-size: .8rem;
  color: var(--c-primary);
  font-weight: 600;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.detail-hd .dh-back:hover {
  opacity: .75
}

.detail-bd {
  padding: 0 24px 24px
}

.detail-bd h3 {
  font-size: .82rem;
  font-weight: 700;
  color: #34495e;
  margin: 16px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #f0f2f8;
}

.detail-bd h3:first-child {
  margin-top: 0
}

.detail-bd p {
  font-size: .76rem;
  color: #546e7a;
  line-height: 1.75
}

/* ── Info Grid ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media(max-width:750px) {
  .info-grid {
    grid-template-columns: 1fr
  }
}

.info-grid .ig-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  font-size: .74rem;
  transition: background var(--transition);
}

.info-grid .ig-item:hover {
  background: #f0f2fa
}

.info-grid .ig-label {
  color: var(--c-text-muted);
  flex-shrink: 0
}

.info-grid .ig-value {
  color: var(--c-text);
  font-weight: 600
}

/* ── Loader ── */
.loader {
  text-align: center;
  padding: 48px;
  display: none
}

.loader.show {
  display: block
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.loader-text {
  font-size: .78rem;
  color: var(--c-text-muted)
}

/* ── SVG Wrapper ── */
.svg-wrap {
  padding: 14px;
  text-align: center;
  background: #fafbfd;
  overflow: auto
}

.svg-wrap svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius)
}

.svg-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius)
}

@media(min-width:751px) {

  .svg-wrap svg,
  .svg-wrap img {
    max-height: 600px
  }
}

/* ── Article Items ── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.article-item {
  padding: 12px 16px;
  background: var(--c-bg-alt);
  border: 1.5px solid var(--c-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.article-item:hover {
  border-color: #93b4f0;
  background: var(--c-primary-light);
  transform: translateX(2px)
}

.article-item.open {
  background: var(--c-primary-light);
  border-color: var(--c-primary)
}

.article-item .at-cat {
  font-size: .64rem;
  color: var(--c-primary);
  font-weight: 600;
  text-transform: uppercase
}

.article-item .at-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-heading);
  margin: 2px 0
}

.article-item .at-content {
  font-size: .72rem;
  color: #546e7a;
  line-height: 1.65;
  display: none;
  margin-top: 6px
}

.article-item.open .at-content {
  display: block
}

/* ── Relation Items ── */
.rel-list {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.rel-item {
  padding: 10px 14px;
  background: #fafbfd;
  border: 1.5px solid var(--c-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.rel-item:hover {
  border-color: #93b4f0;
  transform: translateX(2px)
}

.rel-item.open {
  border-color: var(--c-primary);
  background: var(--c-primary-light)
}

.rel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.rel-type {
  font-size: .66rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.rel-type.anhuai {
  background: #fce4ec;
  color: var(--c-danger)
}

.rel-type.rongqin {
  background: #e8f5e9;
  color: var(--c-success)
}

.rel-type.weicheng {
  background: #fff3e0;
  color: var(--c-warning)
}

.rel-type.youshuai {
  background: #e3f2fd;
  color: #1565c0
}

.rel-type.yetai {
  background: #fff9c4;
  color: #f57f17
}

.rel-type.ming {
  background: #ede7f6;
  color: #6a1b9a
}

.rel-dist {
  font-size: .62rem;
  color: var(--c-text-muted);
  white-space: nowrap
}

.rel-target {
  font-weight: 700;
  font-size: .76rem;
  color: var(--c-heading);
  white-space: nowrap
}

.rel-title {
  font-size: .74rem;
  color: var(--c-text);
  margin-top: 6px;
  line-height: 1.5
}

.rel-content {
  font-size: .72rem;
  color: #546e7a;
  line-height: 1.65;
  display: none;
  margin-top: 6px
}

.rel-item.open .rel-content {
  display: block
}

/* ── Compare layout ── */
.compare-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap
}

.compare-col {
  flex: 1;
  min-width: 280px
}

@media(max-width:750px) {
  .compare-col {
    min-width: 100%
  }
}

/* ── Separator ── */
.section-div {
  border-top: 1.5px solid var(--c-border-light);
  margin: 12px 0;
  padding-top: 12px;
  font-size: .74rem;
  font-weight: 700;
  color: #546e7a;
}

/* ── Filters ── */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px
}

.filters select {
  padding: 7px 10px;
  font-size: .72rem;
  border-radius: var(--radius);
  border: 1.5px solid #dce1ec;
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
}

/* ── Result Containers ── */
.result {
  display: none
}

.result.show {
  display: block
}

/* ══════════════════════════════════════
   Responsive Breakpoints
   ══════════════════════════════════════ */
@media(max-width:750px) {
  .tabs button {
    font-size: .74rem;
    padding: 8px 14px
  }

  .detail-hd {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 8px
  }

  .detail-hd .dh-name {
    font-size: 1.1rem
  }

  .detail-bd {
    padding: 0 16px 16px
  }
}

/* ══════════════════════════════════════
   Demo page polish · auth · states
   ══════════════════════════════════════ */
.tn-inner {
  position: relative;
}

.tn-key-control {
  position: relative;
  flex-shrink: 0;
}

.tn-key-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text-dim);
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.tn-key-toggle:hover,
.tn-key-toggle[aria-expanded="true"] {
  color: var(--c-primary);
  border-color: rgba(67, 97, 238, .35);
  background: var(--c-primary-light);
}

.tn-key-toggle svg {
  width: 15px;
  height: 15px;
}

.tn-key-state {
  color: var(--c-text-muted);
  font-size: .62rem;
  font-weight: 600;
}

.tn-key-state.is-set {
  color: var(--c-success);
}

.tn-key-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: min(300px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow-lg);
}

.tn-key-panel[hidden] {
  display: none;
}

.tn-key-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--c-heading);
  font-size: .72rem;
  font-weight: 700;
}

.tn-key-panel input {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg-alt);
  color: var(--c-text);
  font: inherit;
  font-size: .72rem;
}

.tn-key-panel input:focus {
  outline: 2px solid rgba(67, 97, 238, .18);
  border-color: var(--c-primary);
}

.tn-key-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tn-key-actions button {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-text-dim);
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}

.tn-key-actions .tn-key-save {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: #fff;
}

.tn-key-hint {
  margin-top: 9px;
  color: var(--c-text-muted);
  font-size: .64rem;
  line-height: 1.5;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--c-border-light);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--c-primary);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-kicker svg {
  width: 14px;
  height: 14px;
}

.page-intro h1 {
  color: var(--c-heading);
  font-size: 1.6rem;
  line-height: 1.2;
}

.page-intro p {
  max-width: 720px;
  margin-top: 7px;
  color: var(--c-text-dim);
  font-size: .78rem;
  line-height: 1.65;
}

/* Static supporting copy keeps interactive pages understandable before API data loads. */
.seo-copy {
  margin: 28px 0 4px;
  padding: 24px 0 4px;
  border-top: 1px solid var(--c-border-light);
  color: var(--c-text-dim);
}

.seo-copy h2 {
  margin-bottom: 10px;
  color: var(--c-heading);
  font-size: 1.05rem;
  line-height: 1.35;
}

.seo-copy p {
  max-width: 900px;
  margin-top: 8px;
  font-size: .78rem;
  line-height: 1.8;
}

.seo-copy a {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text-dim);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.page-badge svg {
  width: 14px;
  height: 14px;
}

.page-badge--free {
  border-color: rgba(46, 125, 50, .2);
  background: #f1f8f2;
  color: var(--c-success);
}

.page-badge--billable {
  border-color: rgba(230, 81, 0, .2);
  background: #fff6ed;
  color: var(--c-warning);
}

.demo-status {
  min-height: 24px;
  color: var(--c-text-muted);
  font-size: .68rem;
}

.demo-status.is-error {
  color: var(--c-danger);
}

.btn:disabled,
button:disabled {
  cursor: wait;
  opacity: .58;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(67, 97, 238, .22);
  outline-offset: 2px;
}

@media(min-width: 751px) {

  .form-panel,
  .side,
  .ziwei-sidebar,
  .lunar-panel .lp-form {
    position: sticky;
    top: 78px;
    align-self: flex-start;
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

@media(max-width:750px) {
  .tn-inner {
    padding-right: 12px;
  }

  .tn-key-control {
    margin-left: auto;
  }

  .tn-key-toggle {
    min-width: 36px;
    width: 36px;
    padding: 8px;
    justify-content: center;
  }

  .tn-key-toggle span:not(.tn-key-state) {
    display: none;
  }

  .tn-key-state {
    position: absolute;
    right: 3px;
    bottom: 2px;
    width: 6px;
    height: 6px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--c-text-muted);
    font-size: 0;
  }

  .tn-key-state.is-set {
    background: var(--c-success);
  }

  .tn-key-panel {
    position: fixed;
    top: 64px;
    right: 12px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .page-badge {
    align-self: flex-start;
  }

  .page-intro h1 {
    font-size: 1.35rem;
  }
}