:root {
  --font-zh: "Noto Sans TC", sans-serif;
  --font-en: "Roboto", sans-serif;
  --color-primary: #4487e4;
  --color-secondary: #2258c3;
  --color-success: #40c111;
  --color-danger: #cc1800;
  --color-warning: #e5cc0b;
  --color-accent: #dc7a18;
  --color-surface-light: #f5f5f5;
  --color-surface-dark: #303442;
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-20: 20px;
  --space-40: 40px;
  --space-80: 80px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.12);
  --bg: #09111f;
  --bg-muted: rgba(255, 255, 255, 0.06);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #f7fbff;
  --text-muted: rgba(247, 251, 255, 0.72);
  --border: rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-muted: rgba(48, 52, 66, 0.05);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(68, 135, 228, 0.12);
  --text: #121826;
  --text-muted: rgba(18, 24, 38, 0.68);
  --border: rgba(18, 24, 38, 0.1);
  --shadow-card: 0 20px 50px rgba(20, 35, 60, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-zh);
  background:
    radial-gradient(circle at top left, rgba(68, 135, 228, 0.3), transparent 32%),
    radial-gradient(circle at top right, rgba(34, 88, 195, 0.24), transparent 28%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg), #000 8%));
  color: var(--text);
}

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

button {
  font: inherit;
}

.site-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #26c4ff 0%, #1579e5 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: rgba(3, 10, 21, 0.58);
  border-radius: 999px;
}

.brand-mark::before {
  width: 30px;
  height: 11px;
  left: 4px;
  top: 10px;
  transform: rotate(-44deg);
}

.brand-mark::after {
  width: 30px;
  height: 11px;
  right: 4px;
  bottom: 10px;
  transform: rotate(-44deg);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-en);
  letter-spacing: 0.08em;
  font-size: 1.25rem;
}

.brand-copy small {
  font-family: var(--font-en);
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions a,
#theme-toggle {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
}

#theme-toggle {
  cursor: pointer;
}

.hero,
.section-card,
.archive-card,
.event-card,
.article-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.hero {
  border-radius: 36px;
  overflow: hidden;
  padding: 40px;
  display: grid;
  gap: 24px;
  background:
    linear-gradient(135deg, rgba(68, 135, 228, 0.26), rgba(34, 88, 195, 0.08)),
    var(--surface);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(68, 135, 228, 0.16);
  color: #9fd1ff;
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero p,
.page-head p,
.section-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-stats,
.event-meta,
.archive-grid,
.article-list,
.section-grid,
.hero-links {
  display: grid;
  gap: 16px;
}

.hero-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 10px;
}

.page-stack {
  display: grid;
  gap: 28px;
  margin-top: 20px;
}

.page-head {
  display: grid;
  gap: 14px;
  margin: 24px 0 8px;
}

.section-card,
.archive-card {
  border-radius: 28px;
  padding: 28px;
}

.section-card {
  display: grid;
  gap: 24px;
}

.section-head,
.section-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-meta h2,
.archive-card h2,
.event-card h3 {
  margin: 0;
}

.section-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.event-card {
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.event-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.rank-badge,
.tone-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 0.85rem;
}

.rank-badge {
  background: rgba(68, 135, 228, 0.16);
  color: #a5d0ff;
}

.tone-badge[data-tone="pos"] {
  background: rgba(64, 193, 17, 0.18);
  color: #aff18c;
}

.tone-badge[data-tone="neg"] {
  background: rgba(204, 24, 0, 0.18);
  color: #ffb8ae;
}

.tone-badge[data-tone="neu"] {
  background: rgba(229, 204, 11, 0.18);
  color: #ffef96;
}

.event-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-muted);
}

.metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

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

.keywords span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(68, 135, 228, 0.12);
  color: var(--text);
  font-size: 0.88rem;
}

.article-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.article-card {
  border-radius: 20px;
  padding: 18px;
}

.article-card.is-disabled {
  opacity: 0.7;
  border: 1px dashed var(--border);
}

.article-card strong {
  display: block;
  margin-bottom: 10px;
  line-height: 1.5;
}

.article-card p,
.meta-line {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.meta-line {
  font-family: var(--font-en);
  font-size: 0.85rem;
  margin-top: 12px;
}

.archive-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.archive-month {
  padding: 22px;
  border-radius: 22px;
  background: var(--bg-muted);
  display: grid;
  gap: 14px;
}

.archive-day-card {
  border: 1px solid var(--border);
}

.archive-day-card:hover {
  background: var(--surface);
}

.archive-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
}

.archive-days {
  display: grid;
  gap: 8px;
}

.archive-day-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
}

.empty-state {
  padding: 40px;
  border: 1px dashed var(--border);
  border-radius: 24px;
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .site-shell {
    width: min(100vw - 20px, 1240px);
    padding-top: 16px;
  }

  .site-header,
  .section-head,
  .section-meta {
    flex-direction: column;
    align-items: start;
  }

  .hero,
  .section-card,
  .archive-card {
    padding: 22px;
    border-radius: 24px;
  }

  .event-meta {
    grid-template-columns: 1fr;
  }
}
