/* 潮汐 Tide — Apple-minimal market desk */

:root {
  --bg: #f5f5f7;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --secondary: #86868b;
  --tertiary: #d2d2d7;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --up: #ff3b30;
  --up-soft: rgba(255, 59, 48, 0.1);
  --down: #34c759;
  --down-soft: rgba(52, 199, 89, 0.12);
  --warn: #ff9f0a;
  --warn-soft: rgba(255, 159, 10, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.03);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, "Liberation Mono",
    monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
  box-sizing: border-box;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin-inline: auto;
  padding-inline: 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-mark {
  color: var(--accent);
  display: grid;
  place-items: center;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--secondary);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 3px var(--up-soft);
}

/* ---------- Shared ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding: 88px 0 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-desc {
  margin: 0;
  max-width: 480px;
  color: var(--secondary);
  font-size: 15px;
}

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 100%;
  min-width: 0;
}

.panel-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
}

.panel-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.flat {
  color: var(--secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-warn {
  background: var(--warn-soft);
  color: #c27400;
}

.badge-up {
  background: var(--up-soft);
  color: var(--up);
}

.badge-down {
  background: var(--down-soft);
  color: #1f9e48;
}

.badge-neutral {
  background: rgba(0, 0, 0, 0.05);
  color: var(--secondary);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Segmented control */

.segmented {
  display: inline-flex;
  padding: 3px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  gap: 2px;
}

.seg-btn {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.seg-btn.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* Buttons */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
  min-width: 0;
}

.hero-grid > * {
  min-width: 0;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-desc {
  margin: 0 0 28px;
  max-width: 460px;
  font-size: 17px;
  color: var(--secondary);
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Fear gauge card */

.fear-card {
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
  max-width: 100%;
  min-width: 0;
}

.fear-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.fear-card-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.gauge-wrap {
  position: relative;
  width: min(240px, 100%);
  margin: 8px auto 4px;
}

.gauge {
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: var(--tertiary);
  stroke-width: 12;
  stroke-linecap: round;
}

.gauge-progress {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke: var(--warn);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 578;
  stroke-dashoffset: 578;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gauge-value {
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gauge-label {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

.fear-caption {
  margin: 12px 0 16px;
  text-align: center;
  font-size: 14px;
  color: var(--secondary);
  min-height: 2.6em;
}

.fear-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  font-size: 11px;
  color: var(--secondary);
  text-align: center;
  overflow: hidden;
}

.fear-scale span {
  padding: 6px 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Market stats */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--secondary);
}

.stat-value {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-value .unit {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
  margin-left: 4px;
}

.stat-change {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sectors ---------- */

.sector-panel {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-width: 0;
}

.sector-panel > * {
  min-width: 0;
}

.sector-list {
  padding: 12px 8px 12px 12px;
  max-height: 520px;
  overflow-y: auto;
}

.sector-item {
  display: grid;
  grid-template-columns: 28px 110px 1fr 78px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  width: 100%;
  text-align: left;
}

.sector-item:hover,
.sector-item:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.sector-item.is-active {
  background: var(--accent-soft);
}

.sector-rank {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
  text-align: center;
}

.sector-name {
  font-size: 14px;
  font-weight: 500;
}

.sector-bar-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.sector-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sector-bar.is-up {
  background: var(--up);
}

.sector-bar.is-down {
  background: var(--down);
}

.sector-pct {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sector-detail {
  padding: 28px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #fafafa 0%, var(--paper) 100%);
  display: flex;
  flex-direction: column;
}

.sector-detail-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sector-detail-desc {
  margin: 0 0 20px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.65;
}

.leader-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leader-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  font-size: 14px;
}

.leader-list .leader-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
  margin-left: 8px;
}

.leader-list .leader-pct {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mini-metrics {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mini-label {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Stock ---------- */

.stock-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
  color: var(--secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.stock-chip:hover {
  color: var(--ink);
}

.stock-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stock-chip.is-active {
  background: var(--accent);
  color: #fff;
}

.stock-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stock-name {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stock-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--secondary);
}

.stock-quote {
  text-align: right;
}

.stock-price {
  margin: 0;
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stock-delta {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.chart-wrap {
  margin-bottom: 28px;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-label {
  font-size: 13px;
  color: var(--secondary);
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--secondary);
}

.chart-legend .swatch {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.swatch.up {
  background: var(--up);
}

.swatch.accent {
  background: var(--accent);
}

.stock-chart {
  width: 100%;
  height: 240px;
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.04) 0%, transparent 100%);
  border-radius: 12px;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.metric-item {
  padding: 14px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
}

.metric-item .m-label {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--secondary);
}

.metric-item .m-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stock-note {
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.stock-note-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  max-width: 820px;
}

/* ---------- Dragon table ---------- */

.table-panel {
  padding: 8px 8px 18px;
}

.table-scroll {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th {
  text-align: left;
  padding: 16px 18px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table td {
  padding: 16px 18px;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.025);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.t-name {
  font-weight: 600;
  font-size: 15px;
}

.t-code {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
  font-weight: 400;
  margin-top: 2px;
}

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

.t-seat {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  max-width: 220px;
  display: block;
  line-height: 1.45;
}

.table-foot {
  margin: 8px 18px 4px;
  font-size: 12px;
  color: var(--secondary);
}

/* ---------- Hot money ---------- */

.hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.hot-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.hot-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}

.hot-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.hot-seat {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
}

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hot-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hot-stat {
  text-align: center;
}

.hot-stat .hs-label {
  display: block;
  font-size: 11px;
  color: var(--secondary);
  margin-bottom: 4px;
}

.hot-stat .hs-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hot-strategy {
  margin: 0;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.65;
  flex: 1;
}

.strategy-panel {
  margin-top: 8px;
}

.strategy-head h3 {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.principle-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
}

.principle-list li {
  counter-increment: principle;
  position: relative;
  padding: 18px 18px 18px 52px;
  background: rgba(0, 0, 0, 0.025);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--secondary);
}

.principle-list li::before {
  content: counter(principle, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.principle-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Fear breakdown ---------- */

.fear-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 110px 1fr 52px;
  align-items: center;
  gap: 12px;
}

.bd-name {
  font-size: 14px;
  font-weight: 500;
}

.bd-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.bd-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--warn);
  width: 0;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.bd-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.scale-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scale-row {
  display: grid;
  grid-template-columns: 64px 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.025);
  font-size: 13px;
}

.scale-range {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
}

.scale-name {
  font-weight: 600;
}

.scale-desc {
  color: var(--secondary);
}

.fear-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 88px;
  padding: 48px 0 56px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #ebebf0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.footer-disclaimer {
  margin: 0;
  max-width: 720px;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.7;
}

.footer-copy {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--secondary);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .sector-panel {
    grid-template-columns: 1fr;
  }

  .sector-detail {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

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

  .hot-grid {
    grid-template-columns: 1fr;
  }

  .principle-list {
    grid-template-columns: 1fr;
  }

  .fear-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .header-inner {
    padding-inline: 16px;
  }

  .section {
    padding: 64px 0 16px;
  }

  .header-meta {
    display: none;
  }

  .brand-sub {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-title {
    font-size: 36px;
  }

  .stat-value {
    font-size: 22px;
  }

  .panel {
    padding: 20px;
  }

  .sector-item {
    grid-template-columns: 22px 88px 1fr 70px;
    gap: 8px;
    padding: 10px 8px;
  }

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

  .stock-price {
    font-size: 34px;
  }

  .stock-quote {
    text-align: left;
  }

  .stock-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .breakdown-item {
    grid-template-columns: 88px 1fr 44px;
  }

  .scale-row {
    grid-template-columns: 52px 48px 1fr;
    gap: 8px;
    padding: 10px;
    font-size: 12px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* ---------- Stock screener ---------- */

.rules-panel {
  margin-bottom: 20px;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.rule-tag {
  flex-shrink: 0;
  min-width: 36px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
  color: var(--secondary);
}

.rule-tag.plus {
  min-width: 52px;
  background: var(--accent-soft);
  color: var(--accent);
}

.rule-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.6;
}

.screen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.track-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
  color: var(--secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.track-chip:hover {
  color: var(--ink);
}

.track-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.track-chip.is-active {
  background: var(--accent);
  color: #fff;
}

.screen-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--secondary);
  white-space: nowrap;
}

.screen-table .tier {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.screen-table .tier.t3 {
  color: var(--up);
}

.screen-table .tier.t2 {
  color: var(--warn);
}

.screen-table .tier.t1 {
  color: var(--secondary);
}

.screen-table .score {
  font-family: var(--mono);
  font-weight: 600;
  text-align: center;
}

.screen-table td {
  font-size: 13px;
}

.screen-table .cell-note {
  max-width: 220px;
  color: var(--secondary);
  line-height: 1.45;
}

.screen-table .cell-risk {
  max-width: 160px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

.screen-table .chg {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

@media (max-width: 960px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .screen-table td {
    font-size: 12px;
  }

  .screen-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
 *  潮汐 · 数据驱动版新增样式
 *  （原样式保持不动，此处仅补齐 app.js 动态生成的类）
 * ============================================================ */

/* 数据源状态 */
.live-text {
  font-size: 12px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.live-dot.is-offline {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
  animation: none;
}

/* 离线提示条 */
.offline-banner {
  max-width: var(--max);
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid rgba(255, 159, 10, 0.28);
  color: #8a5200;
  font-size: 13px;
  line-height: 1.5;
}

.offline-banner b {
  font-weight: 600;
}

/* 涨停 / 跌停池 */
.pool-table .cell-theme {
  max-width: 190px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.pool-table .cell-note {
  max-width: 260px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

/* 表格空态 */
.table-empty,
.empty-hint {
  display: block;
  padding: 28px 12px;
  text-align: center;
  color: var(--secondary);
  font-size: 13px;
}

/* 图表区间标注 */
.chart-range {
  color: var(--secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* 恐慌指数原始读数 */
.raw-kicker {
  margin-top: 22px;
}

.fear-raw {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.fear-raw > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.fear-raw span {
  font-size: 11px;
  color: var(--secondary);
}

.fear-raw strong {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fear-raw strong.up {
  color: var(--up);
}

.fear-raw strong.down {
  color: var(--down);
}

/* 分项权重角标 */
.bd-weight {
  margin-left: 6px;
  font-style: normal;
  font-size: 10px;
  color: var(--secondary);
  opacity: 0.75;
}

/* 游资卡片今日对照 */
.hot-today {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--tertiary);
  font-size: 12px;
  color: var(--accent);
  line-height: 1.5;
}

.hot-today.is-muted {
  color: var(--secondary);
}

/* 导航当前项 */
.main-nav a.is-current {
  color: var(--ink);
  font-weight: 600;
}

/* 板块领涨股空态 */
.leader-empty {
  color: var(--secondary);
  font-size: 12px;
  padding: 10px 0;
}

/* 响应式：小屏原始读数两列 */
@media (max-width: 640px) {
  .fear-raw {
    grid-template-columns: repeat(2, 1fr);
  }

  .offline-banner {
    margin: 12px 16px 0;
  }
}

/* ============================================================
 *  情绪阶段门
 * ============================================================ */

.stage-gate-panel {
  margin-top: 24px;
  padding: 26px 28px;
}

.gate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.gate-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.gate-stage {
  color: var(--accent);
}

.gate-pos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.gate-pos-label {
  font-size: 11px;
  color: var(--secondary);
}

.gate-pos-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gate-pos-value.accent {
  color: var(--accent);
}

.gate-pos-value.warn {
  color: var(--warn);
}

.gate-pos-value.down {
  color: var(--down);
}

.gate-hint {
  margin: 14px 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--secondary);
}

.gate-hint b {
  color: var(--ink);
  font-weight: 600;
}

.gate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gate-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 3px solid var(--tertiary);
}

.gate-item.is-pass {
  border-left-color: var(--down);
}

.gate-item.is-fail {
  border-left-color: var(--up);
}

.gate-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--paper);
  background: var(--up);
  margin-top: 1px;
}

.gate-item.is-pass .gate-mark {
  background: var(--down);
}

.gate-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.gate-body strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.gate-body em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--secondary);
  line-height: 1.45;
}

.gate-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--tertiary);
  font-size: 12px;
  line-height: 1.6;
  color: var(--secondary);
}

@media (max-width: 640px) {
  .stage-gate-panel {
    padding: 20px 18px;
  }

  .gate-list {
    grid-template-columns: 1fr;
  }

  .gate-pos {
    align-items: flex-start;
  }
}

/* ============================================================
 *  资讯 · 财联社快讯 + 雪球股民跟踪
 * ============================================================ */

.feed-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-6, 24px);
  margin-bottom: var(--spacing-6, 24px);
}

.feed-panel {
  padding: var(--spacing-5, 20px) var(--spacing-5, 20px) var(--spacing-4, 16px);
  max-height: 760px;
  overflow-y: auto;
}

.feed-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line, #e5e5e7);
  position: sticky;
  top: calc(var(--spacing-5, 20px) * -1);
  background: var(--surface, #fff);
  z-index: 2;
}

.feed-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
  letter-spacing: 0.01em;
}

.feed-panel-sub {
  font-size: 12px;
  color: var(--muted, #86868b);
}

.feed-panel-sub code {
  font-family: var(--mono, monospace);
  font-size: 11px;
  background: var(--chip-bg, #f5f5f7);
  padding: 1px 5px;
  border-radius: 4px;
}

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

.feed-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft, #f0f0f2);
}

.feed-item:last-child { border-bottom: none; }

.feed-item.is-key {
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.045), transparent 60%);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 8px;
}

.feed-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.feed-time {
  font-family: var(--mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
  letter-spacing: 0.02em;
}

.feed-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.6;
}

.feed-badge.b-key { color: #ff3b30; background: rgba(255, 59, 48, 0.1); }
.feed-badge.b-watch { color: var(--accent, #0071e3); background: rgba(0, 113, 227, 0.09); }

.feed-tag {
  font-size: 11px;
  color: var(--muted, #86868b);
  background: var(--chip-bg, #f5f5f7);
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.6;
}

.feed-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink, #1d1d1f);
  text-decoration: none;
  margin-bottom: 4px;
}

.feed-title:hover { color: var(--accent, #0071e3); }

.feed-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-2, #424245);
}

.post-body { white-space: pre-wrap; }

.feed-item-foot {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted, #86868b);
}

.post-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
}

.post-link {
  color: var(--accent, #0071e3);
  text-decoration: none;
  font-size: 12px;
}

.post-link:hover { text-decoration: underline; }

.feed-empty {
  margin: 0;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #86868b);
}

/* 正文内的个股标签 $名称(代码)$ */
.sym-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #0071e3);
  background: rgba(0, 113, 227, 0.08);
  padding: 0 5px;
  border-radius: 4px;
  margin: 0 1px;
}

.sym-tag i {
  font-style: normal;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 400;
  opacity: 0.62;
}

/* 被讨论个股聚合 */
.buzz-panel, .topics-panel {
  padding: var(--spacing-5, 20px);
  margin-bottom: var(--spacing-6, 24px);
}

.buzz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.buzz-card {
  padding: 14px;
  border: 1px solid var(--line, #e5e5e7);
  border-radius: 12px;
  background: var(--surface, #fff);
  transition: border-color 0.18s ease;
}

.buzz-card:hover { border-color: var(--accent, #0071e3); }

.buzz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.buzz-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #1d1d1f);
}

.buzz-code {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #86868b);
}

.buzz-meter {
  display: flex;
  gap: 10px;
  margin: 7px 0 9px;
}

.buzz-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--warn, #ff9f0a);
}

.buzz-authors {
  font-size: 12px;
  color: var(--muted, #86868b);
}

.buzz-snippet {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.66;
  color: var(--ink-2, #424245);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buzz-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.buzz-author {
  font-size: 11px;
  color: var(--muted, #86868b);
  background: var(--chip-bg, #f5f5f7);
  padding: 1px 7px;
  border-radius: 999px;
}

/* 话题标签云 */
.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.topic-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--chip-bg, #f5f5f7);
  color: var(--ink-2, #424245);
  line-height: 1.5;
}

.topic-chip i {
  font-style: normal;
  font-family: var(--mono, monospace);
  font-size: 10px;
  opacity: 0.55;
}

.topic-chip.lv-5 { background: rgba(255, 59, 48, 0.11); color: #d70015; font-weight: 600; font-size: 14px; }
.topic-chip.lv-4 { background: rgba(255, 159, 10, 0.13); color: #b25000; font-weight: 600; font-size: 13.5px; }
.topic-chip.lv-3 { background: rgba(0, 113, 227, 0.09); color: #0060c0; font-size: 13px; }
.topic-chip.lv-2 { font-size: 12.5px; }
.topic-chip.lv-1 { font-size: 12px; }

@media (max-width: 900px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-panel { max-height: 520px; }
  .buzz-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
