@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===========================
   CSS 自定义属性
   =========================== */
:root {
  --c-dark: #1A1A2E;
  --c-red: #E94560;
  --c-orange: #F5A623;
  --c-bg: #0F0F1A;
  --c-surface: #16213E;
  --c-surface2: #1E2A4A;
  --c-text: #E8E8F0;
  --c-text-muted: #9090B0;
  --c-border: #2A2A4A;
  --c-white: #FFFFFF;
  --radius: 4px;
  --font-head: 'Lexend Mega', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --transition: 160ms ease;
  --max-w: 1200px;
  --aside-w: 220px;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-red);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover, a:focus-visible {
  color: var(--c-orange);
  outline: 2px solid var(--c-orange);
  outline-offset: 2px;
}

ol, ul {
  list-style: none;
}

button, input {
  font-family: var(--font-body);
  font-size: 1rem;
}

hr {
  border: none;
  border-top: 2px solid var(--c-red);
  margin: 1rem 0 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--c-white);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }

p { margin-bottom: 1rem; line-height: 1.75; }

time { color: var(--c-orange); font-size: .875rem; }

/* ===========================
   顶部公告条
   =========================== */
.site-top-bar {
  background: var(--c-red);
  color: var(--c-white);
  text-align: center;
  font-size: .8125rem;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: .04em;
  padding: .4rem 1rem;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================
   双行 Header
   =========================== */
.site-header {
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.brand-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--c-white);
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-logo:hover, .brand-logo:focus-visible {
  color: var(--c-orange);
}

.brand-slogan {
  font-size: .8rem;
  color: var(--c-text-muted);
  font-weight: 500;
  letter-spacing: .03em;
}

/* 主导航 nav > ol > li > a */
.main-nav {
  padding: 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-nav ol {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  min-width: max-content;
}

.main-nav ol li {
  flex-shrink: 0;
}

.main-nav ol li a {
  display: block;
  padding: .7rem 1rem;
  font-size: .875rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--c-text-muted);
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.main-nav ol li a:hover,
.main-nav ol li a:focus-visible,
.main-nav ol li.active a {
  color: var(--c-white);
  border-bottom-color: var(--c-orange);
  outline: none;
}

/* ===========================
   面包屑
   =========================== */
.breadcrumb {
  background: var(--c-surface);
  padding: .6rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.breadcrumb ol {
  display: flex;
  gap: .5rem;
  list-style: none;
  font-size: .8125rem;
  flex-wrap: wrap;
}

.breadcrumb ol li {
  color: var(--c-text-muted);
}

.breadcrumb ol li:not(:last-child)::after {
  content: '›';
  margin-left: .5rem;
  color: var(--c-border);
}

.breadcrumb ol li a {
  color: var(--c-red);
}

/* ===========================
   HOME HERO
   =========================== */
.hero-section {
  position: relative;
  background: var(--c-dark);
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-diagonal {
  position: absolute;
  inset: 0;
  background: var(--c-surface);
  clip-path: polygon(0 0, 65% 0, 45% 100%, 0 100%);
  z-index: 0;
}

.hero-diagonal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-red);
  clip-path: polygon(63% 0, 67% 0, 47% 100%, 43% 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  justify-content: center;
  padding: 4rem 2rem;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
}

.hero-icon {
  flex-shrink: 0;
}

.hero-text {
  flex: 1;
  min-width: 260px;
  max-width: 600px;
  text-align: center;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--c-white);
  margin-bottom: 1rem;
  letter-spacing: -.03em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  background: var(--c-red);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: .875rem 2rem;
  border-radius: var(--radius);
  min-height: 48px;
  letter-spacing: .02em;
  transition: background var(--transition);
}

.hero-cta:hover, .hero-cta:focus-visible {
  background: var(--c-orange);
  color: var(--c-dark);
  outline: none;
}

/* ===========================
   正文主容器（抽签：main > div.wrap > article > section）
   =========================== */
main {
  width: 100%;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.content-section {
  width: 100%;
}

.page-content {
  max-width: 860px;
}

/* ===========================
   频道卡片网格（首页）
   子页列表：a > strong（不在 li 里）
   =========================== */
.channel-grid-section,
.articles-section {
  background: var(--c-surface);
  padding: 3rem 1.5rem;
}

.channel-grid-section:nth-child(even),
.articles-section {
  background: var(--c-dark);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* 子页列表：并列 <a> 块，直接子元素是 <strong>（不放 li/dt 里） */
.channel-grid .channel-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--c-text);
  transition: border-color var(--transition), background var(--transition);
  min-height: 100px;
}

.channel-grid .channel-card:hover,
.channel-grid .channel-card:focus-visible {
  border-color: var(--c-red);
  background: var(--c-surface);
  color: var(--c-white);
  outline: none;
}

.channel-card strong {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  display: block;
}

.channel-card .card-desc {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ===========================
   文章列表（首页）
   =========================== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.5rem;
}

.article-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--c-surface2);
  border-left: 3px solid var(--c-red);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-text);
  transition: background var(--transition), border-color var(--transition);
  flex-wrap: wrap;
}

.article-item:hover, .article-item:focus-visible {
  background: var(--c-surface);
  border-color: var(--c-orange);
  color: var(--c-white);
  outline: none;
}

.article-title {
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-white);
}

.article-meta {
  font-size: .8125rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ===========================
   频道页 HERO
   =========================== */
.channel-hero {
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-red);
  position: relative;
  overflow: hidden;
}

.channel-hero-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background: var(--c-red);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: .08;
}

.channel-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.channel-eyebrow,
.about-eyebrow,
.privacy-eyebrow {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: .75rem;
}

.channel-hero-desc {
  margin-top: .75rem;
  color: var(--c-text-muted);
  max-width: 640px;
  margin-bottom: 0;
}

/* ===========================
   频道页 BODY（aside 在左）
   =========================== */
.channel-body,
.article-body,
.about-body,
.privacy-body,
.default-body {
  display: flex;
  align-items: flex-start;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  gap: 2rem;
}

/* aside 在内容区左侧 */
.channel-aside,
.article-aside,
.about-aside,
.privacy-aside,
.default-aside {
  width: var(--aside-w);
  flex-shrink: 0;
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

.channel-main,
.article-main,
.about-main,
.privacy-main,
.default-main {
  flex: 1;
  min-width: 0;
}

.channel-main .wrap,
.article-main .wrap,
.about-main .wrap,
.privacy-main .wrap,
.default-main .wrap {
  padding: 0;
}

.aside-title {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--c-orange);
  display: block;
  margin-bottom: .75rem;
  text-transform: uppercase;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.aside-list li a {
  display: block;
  padding: .45rem .6rem;
  font-size: .875rem;
  color: var(--c-text-muted);
  border-radius: var(--radius);
  min-height: 36px;
  display: flex;
  align-items: center;
  transition: background var(--transition), color var(--transition);
}

.aside-list li a:hover,
.aside-list li a:focus-visible {
  background: var(--c-surface2);
  color: var(--c-white);
  outline: none;
}

.aside-block {
  border-top: 1px solid var(--c-border);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* ===========================
   子页卡片（频道页）
   =========================== */
.sub-cards-wrap {
  margin-top: 2.5rem;
}

.sub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.sub-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--c-text);
  transition: border-color var(--transition);
}

.sub-card:hover, .sub-card:focus-visible {
  border-color: var(--c-red);
  color: var(--c-white);
  outline: none;
}

.sub-card strong {
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--c-white);
}

.sub-card .sub-desc {
  font-size: .8125rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.sub-card .sub-date {
  font-size: .75rem;
  margin-top: .25rem;
}

/* ===========================
   文章页样式
   =========================== */
.article-header {
  margin-bottom: 1.5rem;
}

.article-label {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--c-orange);
  margin-bottom: .6rem;
  text-transform: uppercase;
}

.article-meta-bar {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.meta-item {
  font-size: .8125rem;
  color: var(--c-text-muted);
}

.article-prose,
.about-prose,
.privacy-prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}

.article-prose h2,
.about-prose h2,
.privacy-prose h2 {
  margin-top: 2rem;
  margin-bottom: .25rem;
}

.article-prose h3,
.about-prose h3,
.privacy-prose h3 {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.article-prose ul,
.article-prose ol,
.about-prose ul,
.about-prose ol,
.privacy-prose ul,
.privacy-prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  list-style: disc;
}

.article-prose ol,
.about-prose ol,
.privacy-prose ol {
  list-style: decimal;
}

.article-prose li,
.about-prose li,
.privacy-prose li {
  margin-bottom: .375rem;
}

.article-prose a,
.about-prose a,
.privacy-prose a {
  color: var(--c-red);
  text-decoration: underline;
}

.article-prose a:hover,
.about-prose a:hover,
.privacy-prose a:hover {
  color: var(--c-orange);
}

/* ===========================
   关于页 HERO
   =========================== */
.about-hero,
.privacy-hero {
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-red);
}

.about-hero-inner,
.privacy-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.privacy-date {
  margin-top: .75rem;
  color: var(--c-text-muted);
  font-size: .875rem;
  margin-bottom: 0;
}

/* ===========================
   页脚（footer > article×4 + div.footer-bottom）
   =========================== */
.site-footer {
  background: var(--c-dark);
  border-top: 3px solid var(--c-red);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 2rem;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 100%;
}

.site-footer article {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.site-footer article strong {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--c-orange);
  text-transform: uppercase;
}

.site-footer article p {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin: 0;
}

.site-footer article ol {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.site-footer article ol li a {
  font-size: .875rem;
  color: var(--c-text-muted);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.site-footer article ol li a:hover,
.site-footer article ol li a:focus-visible {
  color: var(--c-white);
}

/* 联系表单 */
.footer-form {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.footer-form input[type="email"] {
  flex: 1;
  min-width: 160px;
  padding: .6rem .875rem;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-size: .875rem;
  min-height: 44px;
}

.footer-form input[type="email"]:focus {
  outline: 2px solid var(--c-red);
  outline-offset: 1px;
  border-color: var(--c-red);
}

.footer-form button {
  background: var(--c-red);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .875rem;
  padding: .6rem 1.25rem;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition);
}

.footer-form button:hover, .footer-form button:focus-visible {
  background: var(--c-orange);
  color: var(--c-dark);
  outline: 2px solid var(--c-orange);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
  font-size: .8125rem;
  color: var(--c-text-muted);
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom-links a {
  color: var(--c-text-muted);
  margin: 0 .25rem;
}

.footer-bottom-links a:hover {
  color: var(--c-white);
}

/* ===========================
   Scroll Reveal 动效
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===========================
   响应式 — 平板
   =========================== */
@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .channel-body,
  .article-body,
  .about-body,
  .privacy-body,
  .default-body {
    flex-direction: column;
    padding: 1.5rem 1rem;
  }

  .channel-aside,
  .article-aside,
  .about-aside,
  .privacy-aside,
  .default-aside {
    width: 100%;
    position: static;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--c-surface);
  }

  .aside-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-list li a {
    min-height: 40px;
    white-space: nowrap;
  }
}

/* ===========================
   响应式 — 手机
   =========================== */
@media (max-width: 600px) {
  :root {
    --aside-w: 100%;
  }

  .brand-row {
    padding: .6rem 1rem;
    gap: .75rem;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .main-nav {
    padding: 0 .75rem;
  }

  .main-nav ol li a {
    padding: .6rem .75rem;
    font-size: .8rem;
  }

  .hero-section {
    min-height: 60vh;
  }

  .hero-inner {
    padding: 3rem 1rem;
    gap: 1.5rem;
  }

  .hero-diagonal {
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 75%);
  }

  .hero-text h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

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

  .sub-cards {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 1rem;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: .5rem;
  }

  .wrap {
    padding: 1.5rem 1rem;
  }

  .channel-hero-inner,
  .about-hero-inner,
  .privacy-hero-inner {
    padding: 2rem 1rem;
  }

  .breadcrumb {
    padding: .5rem 1rem;
  }

  .article-meta-bar {
    gap: .75rem;
  }

  .site-top-bar {
    font-size: .75rem;
    padding: .35rem .75rem;
  }
}

/* ===========================
   正文内容 HTML 样式
   =========================== */
.page-content h2 {
  margin-top: 2rem;
  margin-bottom: .25rem;
}

.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  color: var(--c-orange);
}

.page-content p {
  line-height: 1.8;
}

.page-content ul,
.page-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }

.page-content li {
  margin-bottom: .375rem;
  line-height: 1.7;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

.page-content th,
.page-content td {
  padding: .6rem .875rem;
  border: 1px solid var(--c-border);
  text-align: left;
}

.page-content th {
  background: var(--c-surface2);
  font-weight: 700;
  color: var(--c-orange);
}

.page-content tr:nth-child(even) td {
  background: var(--c-surface);
}

.page-content blockquote {
  border-left: 4px solid var(--c-red);
  padding: .75rem 1.25rem;
  background: var(--c-surface);
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.page-content a {
  color: var(--c-red);
  text-decoration: underline;
}

.page-content a:hover {
  color: var(--c-orange);
}

.page-content code {
  background: var(--c-surface2);
  padding: .15em .4em;
  border-radius: 3px;
  font-size: .875em;
  font-family: monospace;
}

.page-content pre {
  background: var(--c-surface2);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

/* ===========================
   跳转链接无障碍
   =========================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--c-red);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 9999;
  font-family: var(--font-head);
  font-size: .875rem;
}

.skip-link:focus {
  top: 0;
}
