/* ==========================================================
   品牌日志 · 黑匣子日志面板
   页面作用域：.page-news
   ========================================================== */
.page-news {
  --news-panel-bg: #0D1631;
  --news-panel-border: #1C2B5E;
  --news-grid-line: rgba(0, 229, 255, 0.05);
  --news-glow-orange: rgba(255, 107, 53, 0.18);
  --news-glow-green: rgba(74, 222, 128, 0.12);
  --news-scan-line: rgba(0, 229, 255, 0.08);
  background-color: var(--bg);
  color: var(--text);
}

.page-news .container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

.page-news .breadcrumb {
  padding-block: var(--space-3) var(--space-1);
  font-size: 14px;
}

.page-news .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-news .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-news .breadcrumb a:hover,
.page-news .breadcrumb a:focus-visible {
  color: var(--accent2);
}

.page-news .breadcrumb-sep {
  color: var(--border-strong);
  margin-inline: 4px;
}

.page-news .breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================
   Hero 区 · 黑匣子铭牌
   ========================================================== */
.page-news .news-hero {
  padding-block: var(--space-5) var(--space-6);
  position: relative;
  overflow: hidden;
}

.page-news .news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--news-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--news-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.page-news .news-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--news-glow-orange), transparent 70%);
  pointer-events: none;
}

.page-news .news-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.page-news .news-eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent2);
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-news .news-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent2);
  flex: none;
}

.page-news .news-hero-copy h1 {
  font-family: var(--font-headline);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.page-news .news-h1-sub {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--accent);
  margin-top: 10px;
}

.page-news .news-lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 620px;
  margin: var(--space-3) 0 var(--space-4);
}

.page-news .news-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: rgba(16, 27, 58, 0.7);
  font-size: 14px;
  color: var(--text);
  border-radius: 0;
}

.page-news .news-hero-status .mono {
  color: var(--text);
}

.page-news .news-hero-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.page-news .news-hero-svg svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 340 / 220;
  filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.08));
}

/* ==========================================================
   通用 Section
   ========================================================== */
.page-news .news-section {
  padding-block: var(--space-5);
  position: relative;
}

.page-news .news-section + .news-section::before {
  content: "";
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-2);
  border-top: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.page-news .news-section-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
  margin: var(--space-2) 0 var(--space-4);
}

.page-news .section-head {
  margin-bottom: var(--space-4);
}

.page-news .section-index {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent2);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  display: inline-block;
}

.page-news .section-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ==========================================================
   最新日志卡片
   ========================================================== */
.page-news .news-latest-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  overflow: hidden;
}

.page-news .news-latest-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 107, 53, 0.06) 50%);
  pointer-events: none;
  z-index: 0;
}

.page-news .news-latest-media {
  margin: 0;
  overflow: hidden;
}

.page-news .news-latest-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.page-news .news-latest-body {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

.page-news .news-latest-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-news .news-version-chip,
.page-news .news-time-chip {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(0, 229, 255, 0.08);
  padding: 4px 8px;
  border: 1px solid var(--border);
}

.page-news .news-latest-body h3 {
  font-family: var(--font-headline);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

.page-news .news-latest-body p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
}

.page-news .news-latest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* ==========================================================
   标签筛选区
   ========================================================== */
.page-news .news-filter-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.page-news .news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.page-news .news-tabs .tab-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.page-news .news-tabs .tab-btn:hover,
.page-news .news-tabs .tab-btn:focus-visible {
  color: var(--accent2);
  border-color: var(--accent2);
  outline: none;
}

.page-news .news-tabs .tab-btn.is-active {
  color: var(--bg);
  background: var(--accent2);
  border-color: var(--accent2);
  font-weight: 600;
}

.page-news .news-log-panel {
  background: var(--news-panel-bg);
  border: 1px solid var(--border);
  position: relative;
}

.page-news .news-log-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--news-scan-line) 1px, transparent 1px);
  background-size: 100% 36px;
  pointer-events: none;
}

.page-news .news-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-news .news-log-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-news .news-log-item:last-child {
  border-bottom: none;
}

.page-news .news-log-item:hover {
  background: rgba(0, 229, 255, 0.04);
}

.page-news .news-log-module {
  font-size: 12px;
  color: var(--accent2);
  white-space: nowrap;
  text-align: right;
}

.page-news .news-log-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.page-news .news-filter-fig {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

/* ==========================================================
   时间线区
   ========================================================== */
.page-news .news-timeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.page-news .news-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.page-news .news-timeline-list::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--error), var(--warning) 38%, var(--warning) 62%, var(--success));
  opacity: 0.7;
}

.page-news .news-timeline-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: var(--space-3);
}

.page-news .news-timeline-item:last-child {
  margin-bottom: 0;
}

.page-news .news-timeline-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  transition: border-color 0.25s ease;
}

.page-news .news-timeline-details[open] {
  border-left-color: var(--accent2);
}

.page-news .news-timeline-details summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 16px 16px 12px;
  cursor: pointer;
  list-style: none;
}

.page-news .news-timeline-details summary::-webkit-details-marker {
  display: none;
}

.page-news .news-timeline-details summary:hover,
.page-news .news-timeline-details summary:focus-visible {
  background: rgba(0, 229, 255, 0.04);
  outline: none;
}

.page-news .news-timeline-details summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.page-news .news-timeline-details[open] summary::after {
  content: "–";
}

.page-news .news-timeline-details p {
  margin: 0;
  padding: 0 16px 16px 42px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.page-news .news-timeline-dot {
  position: absolute;
  left: -41px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border-strong);
  flex: none;
}

.page-news .news-timeline-dot.is-error {
  background: var(--error);
  box-shadow: 0 0 0 2px var(--error), 0 0 16px rgba(248, 113, 113, 0.4);
}

.page-news .news-timeline-dot.is-warning {
  background: var(--warning);
  box-shadow: 0 0 0 2px var(--warning), 0 0 16px rgba(255, 209, 102, 0.4);
  animation: news-dot-pulse-warning 2s ease-in-out infinite;
}

.page-news .news-timeline-dot.is-success {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success), 0 0 16px rgba(74, 222, 128, 0.4);
}

@keyframes news-dot-pulse-warning {
  0%, 100% { box-shadow: 0 0 0 2px var(--warning), 0 0 8px rgba(255, 209, 102, 0.3); }
  50% { box-shadow: 0 0 0 2px var(--warning), 0 0 22px rgba(255, 209, 102, 0.6); }
}

.page-news .news-timeline-phase {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(136, 146, 176, 0.12);
  border: 1px solid var(--border);
  padding: 2px 8px;
  letter-spacing: 0.08em;
}

.page-news .news-timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.page-news .news-timeline-side {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.page-news .news-timeline-side img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.page-news .news-timeline-legend {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--space-3);
}

.page-news .news-legend-title {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}

.page-news .news-timeline-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.page-news .news-timeline-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

/* ==========================================================
   版本更新记录
   ========================================================== */
.page-news .news-versions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

.page-news .news-versions-main {
  display: grid;
  gap: var(--space-4);
}

.page-news .news-version-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  padding: var(--space-4);
  position: relative;
}

.page-news .news-version-item::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 64px;
  height: 3px;
  background: var(--accent);
}

.page-news .news-version-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-2);
}

.page-news .news-version-num {
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.page-news .news-version-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

.page-news .news-version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.page-news .news-version-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.page-news .news-version-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.page-news .news-versions-side {
  display: grid;
  gap: var(--space-2);
}

.page-news .news-versions-side img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.page-news .news-versions-side p {
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================
   订阅更新
   ========================================================== */
.page-news .news-subscribe-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent2);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
  scroll-margin-top: 120px;
}

.page-news .news-subscribe-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--news-scan-line) 1px, transparent 1px),
    radial-gradient(circle at 100% 0%, var(--news-glow-orange), transparent 60%);
  background-size: 100% 32px, 100% 100%;
  pointer-events: none;
}

.page-news .news-subscribe-copy {
  position: relative;
  z-index: 1;
}

.page-news .news-subscribe-copy p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 var(--space-2);
}

.page-news .news-subscribe-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.page-news .news-subscribe-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.page-news .news-subscribe-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  color: var(--accent2);
  font-size: 13px;
}

.page-news .news-subscribe-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ==========================================================
   Link & Button 焦点视觉
   ========================================================== */
.page-news a:focus-visible,
.page-news button:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.page-news .btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 0;
  padding: 11px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.page-news .btn:hover {
  transform: translateY(-1px);
}

.page-news .btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.page-news .btn-primary:hover,
.page-news .btn-primary:focus-visible {
  background: #ff7d4d;
  box-shadow: 0 4px 24px var(--news-glow-orange);
  color: var(--bg);
  outline: none;
}

.page-news .btn-ghost {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent2);
}

.page-news .btn-ghost:hover,
.page-news .btn-ghost:focus-visible {
  background: var(--accent2-soft);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
  color: var(--accent2);
  outline: none;
}

.page-news .btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ==========================================================
   桌面端增强
   ========================================================== */
@media (min-width: 768px) {
  .page-news .news-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--space-6);
  }

  .page-news .news-latest-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .page-news .news-latest-media {
    border-right: 1px solid var(--border);
  }

  .page-news .news-latest-media img {
    height: 100%;
    object-fit: cover;
  }

  .page-news .news-latest-body {
    padding: var(--space-5);
  }

  .page-news .news-filter-layout {
    grid-template-columns: 1fr;
  }

  .page-news .news-filter-fig {
    justify-self: stretch;
  }

  .page-news .news-timeline-grid {
    grid-template-columns: 1fr 320px;
    gap: var(--space-5);
  }

  .page-news .news-versions-grid {
    grid-template-columns: 1fr 360px;
    gap: var(--space-5);
  }

  .page-news .news-version-item {
    padding: var(--space-5);
  }

  .page-news .news-subscribe-box {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
  }

  .page-news .news-subscribe-list {
    grid-template-columns: 1fr 1fr;
  }

  .page-news .news-subscribe-actions {
    flex-direction: column;
  }
}

@media (min-width: 1080px) {
  .page-news .news-filter-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }

  .page-news .news-filter-fig {
    position: sticky;
    top: 96px;
  }

  .page-news .news-log-item {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
}

/* ==========================================================
   尊重减少动效偏好
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .page-news *,
  .page-news *::before,
  .page-news *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page-news .news-timeline-dot.is-warning {
    animation: none;
  }
}

/* ==========================================================
   窄屏保护
   ========================================================== */
@media (max-width: 374px) {
  .page-news .news-log-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .page-news .news-log-module {
    text-align: left;
  }

  .page-news .news-timeline-item {
    padding-left: 40px;
  }

  .page-news .news-timeline-dot {
    left: -33px;
  }

  .page-news .news-version-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
