/* ============================================================
   TITAN TECH — news_item article styles
   Three layout variants share base tokens from style.css and
   are scoped under body classes:
     .v-editorial  (保守 · 編輯室)
     .v-briefing   (中間 · 任務簡報)
     .v-tactical   (大膽 · 戰術 HUD)
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   Shared article shell — applies to every variant
   ──────────────────────────────────────────────────────────── */

.article-page {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

/* ============================================================
   HERO — full-bleed cover with category eyebrow + title overlay
   ============================================================ */
.article-hero {
  position: relative;
  width: 100%;
  min-height: 56vh;
  height: clamp(420px, 62vh, 720px);
  overflow: hidden;
  background-color: #04101f;
}
.article-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.85) brightness(0.78) contrast(1.05);
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(5,12,24,0.45) 0%,
    rgba(5,12,24,0.25) 40%,
    rgba(5,12,24,0.55) 75%,
    rgba(5,12,24,0.92) 100%);
}
.article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: calc(var(--nav-h) + 48px) var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Hero variant — no cover image (text-only header) */
.article-hero.no-cover {
  min-height: 0;
  height: auto;
  background: transparent;
  border-bottom: 1px dashed var(--border);
}
.article-hero.no-cover .article-hero-bg,
.article-hero.no-cover .article-hero-overlay { display: none; }
.article-hero.no-cover .article-hero-inner {
  padding: calc(var(--nav-h) + 56px) var(--gutter) 48px;
}

/* Standalone breadcrumb — inside article-shell (no cover image).
   No horizontal padding: inherits shell's gutter, aligns naturally with article-meta. */
.article-breadcrumb-standalone {
  display: flex;
  flex-wrap: wrap;
  padding: 20px 0 16px;
}

/* Breadcrumb above title — small mono trail with separators */
.article-breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 28px;
}
.article-breadcrumb a {
  color: var(--fg-2);
  transition: color 200ms var(--ease);
}
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .sep { color: var(--fg-3); }
.article-breadcrumb .breadcrumb-current {
  color: var(--fg-2);
  text-transform: none;
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category chip — clickable, links to category page */
.article-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px dashed var(--accent);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(77,184,255,0.06);
  text-decoration: none;
  transition: background 200ms var(--ease), border-style 200ms var(--ease);
}
.article-category::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
}
.article-category:hover {
  border-style: solid;
  background: rgba(77,184,255,0.14);
  color: var(--accent);
}

/* Article title — display heading, scales w/ viewport */
.article-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.96;
  color: var(--fg-1);
  margin: 24px 0 0;
  font-size: clamp(20px, 3vw, 2.5rem);
  width: 100%;
  max-width: 100%;
}
.article-subtitle {
  font-family: var(--font-cjk);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 400;
  color: var(--fg-2);
  margin: 16px 0 0;
  max-width: 60ch;
  line-height: 1.6;
}

/* ============================================================
   META BAR — author · date · views · category, inline row
   ============================================================ */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.article-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
}
.article-meta .meta-item .bi {
  font-size: 13px;
  color: var(--fg-3);
}
.article-meta .meta-divider {
  width: 1px; height: 12px;
  background: var(--border);
  display: inline-block;
}
.article-meta a.meta-item:hover { color: var(--accent); }
.article-meta a.meta-item:hover .bi { color: var(--accent); }
.article-meta .meta-key { color: var(--fg-3); margin-right: 2px; }
.article-meta .meta-value { color: var(--fg-1); }

/* ============================================================
   LAYOUT — page-level grid with left sticky share rail
   Bootstrap row would also work; we use CSS grid for control.
   ============================================================ */
.article-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.article-layout {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 96px;
}
@media (max-width: 991px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ============================================================
   SHARE RAIL — sticky vertical, dashed-chip buttons
   ============================================================ */
.share-rail {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-top: 56px;
}
.share-rail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
  margin-bottom: 8px;
  white-space: nowrap;
}
.share-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 200ms var(--ease),
    border-style 200ms var(--ease),
    color 200ms var(--ease),
    background 200ms var(--ease),
    transform 200ms var(--ease);
}
.share-btn .bi { font-size: 17px; line-height: 1; }
.share-btn:hover,
.share-btn:focus-visible {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(77,184,255,0.06);
  outline: none;
}
.share-btn[data-share="line"]:hover    { border-color: #06c755; color: #06c755; background: rgba(6,199,85,0.08); }
.share-btn[data-share="fb"]:hover      { border-color: #4f86ee; color: #4f86ee; background: rgba(79,134,238,0.08); }
.share-btn[data-share="email"]:hover   { border-color: #ff9a4d; color: #ff9a4d; background: rgba(255,154,77,0.08); }
.share-btn[data-share="copy"]:hover    { border-color: var(--accent); color: var(--accent); }
.share-btn .share-toast {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-6px, -50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-2);
  border: 1px solid var(--accent);
  padding: 4px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.share-btn.is-copied .share-toast {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Mobile: share rail becomes horizontal bar above article body */
@media (max-width: 991px) {
  .share-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 8px;
    gap: 8px;
    overflow: hidden;
  }
  .share-rail-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 0;
    margin-right: 4px;
    align-self: center;
  }
  .share-btn { width: 40px; height: 40px; flex-shrink: 0; }
  .share-btn .share-toast { left: 50%; top: calc(100% + 8px); transform: translate(-50%, -4px); }
  .share-btn.is-copied .share-toast { transform: translate(-50%, 0); }
}

/* ============================================================
   ARTICLE BODY — reading column
   ============================================================ */
.article-body {
  max-width: 100%;
}
.article-body.is-wide { max-width: 920px; }

/* Lead paragraph (前言摘要) — distinct from body */
.article-lead {
  font-family: var(--font-cjk);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.7;
  color: var(--fg-1);
  padding: 24px 0 28px;
  margin: 0 0 32px;
  border-bottom: 1px dashed var(--border);
  position: relative;
}
.article-lead::before {
  content: 'BRIEF';
  position: absolute;
  top: -10px;
  left: 0;
  background: var(--bg);
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
}

/* Article main content (正文) — what XOOPS editor outputs */
.article-content {
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.85;
  color: var(--fg-1);
}
.article-content > * + * { margin-top: 1.2em; }
.article-content p {
  margin: 0 0 1.2em;
  color: var(--fg-1);
  text-wrap: pretty;
}
.article-content p:last-child { margin-bottom: 0; }
.article-content .h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--fg-1);
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.article-content .h3 {
  font-family: var(--font-cjk);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg-1);
  margin: 40px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-content .h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--accent);
  flex-shrink: 0;
}
.article-content .h4 {
  font-family: var(--font-cjk);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-1);
  margin: 32px 0 10px;
}
.article-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(77,184,255,0.4);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.article-content a:hover {
  color: var(--accent-press);
  border-bottom-color: var(--accent-press);
}
.article-content strong { color: var(--fg-1); font-weight: 700; }
.article-content em { color: var(--fg-1); font-style: italic; }
.article-content ul,
.article-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}
.article-content li {
  margin-bottom: 0.5em;
  color: var(--fg-1);
}
.article-content li::marker { color: var(--accent); }
.article-content blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-cjk);
  font-size: clamp(18px, 1.6vw, 22px);
  font-style: normal;
  line-height: 1.6;
  color: var(--fg-1);
  position: relative;
}
.article-content blockquote::before {
  content: '"';
  position: absolute;
  left: 8px;
  top: -8px;
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.6;
}
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(77,184,255,0.1);
  border: 1px solid var(--border);
  padding: 2px 6px;
  color: var(--accent);
}
.article-content hr {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 40px 0;
}

/* Inline figure (editor-inserted image) — base
   3 sizes selectable via classes:
     .figure-inline (default, fits column)
     .figure-wide   (breaks out a bit, ~1.15× column)
     .figure-fullbleed (full container width — only takes effect in some variants)
*/
.article-content figure,
.article-content .editor-figure {
  margin: 32px 0;
  position: relative;
}
.article-content figure img,
.article-content .editor-figure img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
}

/* bare <img> tags inserted by editor — also center */
.article-content img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.article-content figure figcaption,
.article-content .editor-figure figcaption {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

/* Side-by-side image pair via .row.g-3 .col-md-6 inside article-content */
.article-content .row { margin: 32px 0; }

/* ============================================================
   ATTACHMENTS — simple list (filename + download)
   ============================================================ */
.attachments-section {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
}
.attachments-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.attachments-heading .label {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.attachments-heading .count {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.14em;
  color: var(--fg-3);
}
.attachments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px dashed var(--border);
}
.attachments-list li + li { border-top: 1px dashed var(--border); }
.attachment-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--fg-1);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.attachment-row:hover {
  background: rgba(77,184,255,0.04);
  color: var(--accent);
}
.attachment-row .ext-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 8px;
  min-width: 56px;
  text-align: center;
  flex-shrink: 0;
}
.attachment-row .filename {
  flex: 1;
  font-family: var(--font-cjk);
  font-size: 15px;
  font-weight: 400;
  color: inherit;
  word-break: break-word;
}
.attachment-row .filesize {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.1em;
  color: var(--fg-3);
  flex-shrink: 0;
}
.attachment-row .dl-icon {
  font-size: 16px;
  color: var(--fg-2);
  transition: color 200ms var(--ease), transform 200ms var(--ease);
  flex-shrink: 0;
}
.attachment-row:hover .dl-icon {
  color: var(--accent);
  transform: translateY(2px);
}

/* ============================================================
   PREV/NEXT — bottom large cards (thumbnail + title)
   ============================================================ */
.article-pager {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px dashed var(--border);
}
.article-pager-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: center;
  margin-bottom: 24px;
}
.pager-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 767px) {
  .pager-grid { grid-template-columns: 1fr; }
}
.pager-card {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  color: var(--fg-1);
  transition:
    border-color 240ms var(--ease),
    transform 320ms var(--ease),
    background 240ms var(--ease);
  overflow: hidden;
}
.pager-card::before,
.pager-card::after {
  content: '';
  position: absolute; inset: -2px;
  pointer-events: none;
  border: 2px solid var(--accent);
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(77,184,255,0.5));
}
.pager-card::before {
  border-bottom: 0; border-left: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 520ms linear 480ms;
}
.pager-card::after {
  border-top: 0; border-right: 0;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 520ms linear 0ms;
}
.pager-card:hover::before { clip-path: inset(0 0 0 0); transition: clip-path 520ms linear 0ms; }
.pager-card:hover::after  { clip-path: inset(0 0 0 0); transition: clip-path 520ms linear 480ms; }
.pager-card:hover {
  border-color: var(--accent);
  background: rgba(77,184,255,0.05);
}
.pager-card.is-next { flex-direction: row-reverse; text-align: right; }
.pager-thumb {
  width: 112px;
  height: 88px;
  flex-shrink: 0;
  background: #0a1322;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pager-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 300ms var(--ease), transform 600ms var(--ease);
}
.pager-card:hover .pager-thumb img { opacity: 1; transform: scale(1.06); }
.pager-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.pager-direction {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pager-card.is-next .pager-direction { justify-content: flex-end; }
.pager-title {
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: var(--fg-1);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 200ms var(--ease);
}
.pager-card:hover .pager-title { color: var(--accent); }
.pager-date {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.pager-card.is-empty {
  opacity: 0.4;
  pointer-events: none;
}
.pager-card.is-empty .pager-thumb { background: var(--bg-2); }

/* Back-to-list link, centered between pager cards on desktop */
.pager-backlink {
  text-align: center;
  margin-top: 24px;
}
.pager-backlink a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-1);
  text-decoration: none;
  transition: border-style 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.pager-backlink a:hover {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(77,184,255,0.06);
}

/* ============================================================
   VARIANT 1 — EDITORIAL (保守)
   Clean magazine style, restrained accents, smaller display type
   ============================================================ */
.v-editorial .article-hero { height: clamp(440px, 60vh, 640px); }
.v-editorial .article-hero-overlay {
  background: linear-gradient(180deg,
    rgba(5,12,24,0.55) 0%,
    rgba(5,12,24,0.35) 35%,
    rgba(5,12,24,0.85) 100%);
}
.v-editorial .article-title {
  font-family: var(--font-cjk);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-transform: none;
  max-width: 22ch;
}
.v-editorial .article-meta {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 0; border-right: 0;
}
.v-editorial .article-lead {
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 500;
  color: var(--fg-1);
  border-bottom: 0;
  padding: 12px 0 28px;
}
.v-editorial .article-lead::before {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  position: static;
  padding: 0;
  margin-bottom: 18px;
}
.v-editorial .article-content .h2 {
  font-family: var(--font-cjk);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 0;
  padding-bottom: 0;
  margin: 48px 0 16px;
}

/* ============================================================
   VARIANT 2 — BRIEFING (中間 · 任務簡報)
   Dashed borders everywhere, mono labels on every section,
   "MISSION REPORT" hero frame
   ============================================================ */
.v-briefing .article-hero {
  height: clamp(460px, 64vh, 680px);
}
.v-briefing .article-hero-inner {
  padding-bottom: 72px;
}
/* Tactical frame around hero content — dashed corners */
.v-briefing .hero-frame {
  position: relative;
  padding: 32px;
  margin-top: auto;
}
.v-briefing .hero-frame::before,
.v-briefing .hero-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
}
.v-briefing .hero-frame::before {
  top: 0; left: 0;
  border-right: 0; border-bottom: 0;
}
.v-briefing .hero-frame::after {
  bottom: 0; right: 0;
  border-left: 0; border-top: 0;
}
.v-briefing .hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.v-briefing .hero-status .live-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(77,184,255,0.8);
  animation: live_pulse 2s ease-in-out infinite;
}
@keyframes live_pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77,184,255,0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(77,184,255,0); }
}

.v-briefing .article-meta {
  border: 1px dashed var(--border);
  border-left: 0; border-right: 0;
  padding: 16px 0;
  gap: 0;
}
/* v4 only — drop the top dashed line on meta */
.v-briefing.v-no-frame .article-meta {
  border-top: 0;
  padding-top: 24px;
}
.v-briefing .article-meta .meta-item {
  padding: 0 18px;
  border-right: 1px dashed var(--border);
}
.v-briefing .article-meta .meta-item:first-child { padding-left: 0; }
.v-briefing .article-meta .meta-item:last-child { border-right: 0; padding-right: 0; }
.v-briefing .article-meta .meta-divider { display: none; }

.v-briefing .article-lead {
  border: 1px dashed var(--border);
  padding: 28px;
  margin: 8px 0 40px;
}
.v-briefing .article-lead::before {
  content: 'EXECUTIVE BRIEF';
  background: var(--bg);
  top: -8px;
  left: 18px;
  padding: 0 10px;
}
/* v4 only — friendlier "INTRO" label */
.v-briefing.v-no-frame .article-lead::before {
  content: 'INTRO';
}

.v-briefing .article-content figure,
.v-briefing .article-content .editor-figure {
  border: 1px dashed var(--border);
  padding: 8px;
}
.v-briefing .article-content figure img,
.v-briefing .article-content .editor-figure img {
  border: 0;
}
.v-briefing .article-content figure::before,
.v-briefing .article-content .editor-figure::before {
  content: attr(data-fig);
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 8px 8px;
}

/* ============================================================
   VARIANT 3 — TACTICAL HUD (大膽)
   Asymmetric layout, huge display type, telemetry bar,
   numbered sections, full-bleed figures
   ============================================================ */
.v-tactical .article-hero {
  height: clamp(560px, 78vh, 820px);
}
.v-tactical .article-hero-inner {
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 0;
}
.v-tactical .article-title {
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  background-image: linear-gradient(180deg, #ffffff 0%, #cfe0ff 38%, #6aa3ff 78%, #2a6fdb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(42,111,219,0.25));
  max-width: 14ch;
  margin-top: 18px;
}
.v-tactical .article-subtitle {
  margin-top: 28px;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--fg-1);
  max-width: 56ch;
}

/* Giant mission code in hero corner */
.v-tactical .hero-mission-code {
  position: absolute;
  top: calc(var(--nav-h) + 32px);
  right: var(--gutter);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-align: right;
}
.v-tactical .hero-mission-code .code-num {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: rgba(77,184,255,0.85);
  filter: drop-shadow(0 0 24px rgba(77,184,255,0.4));
}
.v-tactical .hero-mission-code .code-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-2);
}
@media (max-width: 767px) {
  .v-tactical .hero-mission-code .code-num { font-size: 56px; }
}

/* Telemetry bar — meta as a HUD strip */
.v-tactical .article-meta {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 18px 24px;
  margin: 0;
  position: relative;
  gap: 0;
}
.v-tactical .article-meta .meta-item {
  position: relative;
  padding: 0 24px;
}
.v-tactical .article-meta .meta-item:first-child { padding-left: 0; }
.v-tactical .article-meta .meta-item + .meta-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 16px;
  background: var(--border);
  transform: translateY(-50%);
}
.v-tactical .article-meta .meta-divider { display: none; }
.v-tactical .article-meta .meta-value {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0;
  color: var(--fg-1);
}

/* Article body sits in 9-col, share rail in 1-col, plus a margin-numbers col */
.v-tactical .article-layout {
  grid-template-columns: 64px 1fr;
  gap: 40px;
  padding-top: 48px;
}
.v-tactical .article-body { max-width: 100%; }

.v-tactical .article-lead {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 500;
  color: var(--fg-1);
  border: 0;
  padding: 0 0 32px 28px;
  margin: 0 0 40px;
  position: relative;
  border-bottom: 1px dashed var(--border);
}
.v-tactical .article-lead::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 4px;
  height: calc(100% - 32px);
  background: var(--accent);
  padding: 0;
}

.v-tactical .article-content .h2 {
  position: relative;
  border-bottom: 0;
  padding-left: 0;
  padding-bottom: 16px;
  margin: 64px 0 24px;
}
.v-tactical .article-content .h2::after {
  content: '';
  display: block;
  width: 64px; height: 2px;
  background: var(--accent);
  margin-top: 16px;
}
.v-tactical .article-content .section-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Full-bleed figures break out of the column */
.v-tactical .article-content .figure-fullbleed {
  margin-left: calc((100vw - 100% - var(--gutter) * 2 - 64px - 40px) / -2);
  margin-right: calc((100vw - 100% - var(--gutter) * 2 - 64px - 40px) / -2);
  max-width: none;
}
.v-tactical .article-content .figure-fullbleed img {
  border: 0;
}
.v-tactical .article-content .figure-wide {
  margin-left: -40px;
  margin-right: -40px;
}
@media (max-width: 991px) {
  .v-tactical .article-content .figure-fullbleed,
  .v-tactical .article-content .figure-wide {
    margin-left: 0; margin-right: 0;
  }
}

.v-tactical .attachments-list {
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.v-tactical .attachment-row {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.v-tactical .attachment-row .filename { font-family: var(--font-cjk); }

.v-tactical .pager-grid { gap: 0; }
.v-tactical .pager-card {
  flex-direction: column;
  padding: 0;
  align-items: stretch;
  min-height: 260px;
}
.v-tactical .pager-card.is-next { flex-direction: column; text-align: left; }
.v-tactical .pager-thumb {
  width: 100%; height: 200px;
  border: 0;
}
.v-tactical .pager-thumb img { opacity: 0.55; }
.v-tactical .pager-body {
  padding: 18px 20px 22px;
}
.v-tactical .pager-card.is-next .pager-direction { justify-content: flex-start; }
.v-tactical .pager-title { font-size: 18px; }

/* ============================================================
   PROGRESS BAR — fixed top, reads scroll position
   Tactical variant only
   ============================================================ */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.04);
  z-index: 60;
  pointer-events: none;
}
.read-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #9bdcff);
  box-shadow: 0 0 10px rgba(77,184,255,0.6);
  transition: width 60ms linear;
}

/* ============================================================
   COVER-ONLY HERO (v4) — shorter image-only header, breadcrumb
   pinned bottom-left. Title block sits below meta.
   ============================================================ */
.article-hero.article-hero-cover-only {
  height: clamp(280px, 42vh, 460px);
  min-height: 0;
}
.article-hero.article-hero-cover-only .article-hero-inner {
  padding-top: calc(var(--nav-h) + 24px);
  padding-bottom: 28px;
}
.article-hero.article-hero-cover-only .article-breadcrumb {
  margin-bottom: 0;
}
.article-hero.article-hero-cover-only .article-hero-overlay {
  background: linear-gradient(180deg,
    rgba(5,12,24,0.30) 0%,
    rgba(5,12,24,0.10) 35%,
    rgba(5,12,24,0.55) 80%,
    rgba(5,12,24,0.95) 100%);
}

/* ============================================================
   TITLE BLOCK — sits between article-meta and article-layout
   Used by v4. Anton display title + CJK subtitle + LIVE pill.
   ============================================================ */
.article-titleblock {
  max-width: var(--max-w);
  padding: 40px 0 36px;
  margin: 0;
  border-bottom: 1px dashed var(--border);
}
.titleblock-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.titleblock-status .live-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(77,184,255,0.8);
  animation: live_pulse 2s ease-in-out infinite;
}
.article-titleblock .article-title {
  margin: 0;
  max-width: 100%;
}
.article-titleblock .article-subtitle {
  margin-top: 18px;
  color: var(--fg-2);
  max-width: 60ch;
}

/* Briefing variant tweak: title block already inherits Anton via .article-title;
   no extra rule needed. */

@media (max-width: 767px) {
  .article-titleblock { padding: 28px 0 24px; }
  .titleblock-status { font-size: 9px; margin-bottom: 14px; }
}

/* ============================================================
   LIGHTBOX — fullscreen overlay for inline figure images
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 12, 24, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px var(--gutter) 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border: 1px solid var(--border);
}
.lightbox-caption {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 20px 0 0;
  text-align: center;
  max-width: 720px;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-1);
  cursor: pointer;
  font-size: 18px;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 767px) {
  .article-hero-inner { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 32px; }
  .article-title { font-size: clamp(18px, 6vw, 2.5rem); }
  .article-meta { gap: 6px 12px; font-size: 10px; padding: 16px 0; }
  .v-briefing .article-meta .meta-item { padding: 4px 10px; }
  .v-briefing .article-meta .meta-item:first-child { padding-left: 10px; }
  .v-tactical .article-title { font-size: clamp(48px, 13vw, 80px); }
  .v-tactical .article-meta { padding: 14px 16px; }
  .v-tactical .article-meta .meta-item { padding: 4px 12px; }
  .article-content { font-size: 15px; line-height: 1.8; }
  .attachments-section { margin-top: 40px; }
  .article-pager { margin-top: 56px; }
  .pager-card { padding: 14px; gap: 12px; }
  .pager-thumb { width: 84px; height: 64px; }
  .pager-title { font-size: 14px; }
}

/* ============================================================
   XOOPS layout integration
   Adapts article templates to btp_rwd_5_c_a_v11 theme structure.
   ============================================================ */

/* Break article hero out of Bootstrap col-md-11 to achieve full-bleed */
body.v-briefing .article-page .article-hero {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}

/* Override XOOPS maincontainer top-margin so hero sits below fixed navbar */
body.v-briefing div.maincontainer {
  margin-top: var(--nav-h, 72px);
}

/* article-shell horizontal padding compensates for col gutter removed by hero */
body.v-briefing .article-shell {
  padding-left: var(--gutter, 24px);
  padding-right: var(--gutter, 24px);
}

/* ──────────────────────────────────────────────────────────────
   COLOR OVERRIDES — specificity 1,1,x beats custom.css rule
   "#maincontent a { color: var(--accent) }" (specificity 1,0,1)
   that forces every <a> in #maincontent to blue.
   Using #maincontent as prefix raises to 1,1,x which wins.
   ────────────────────────────────────────────────────────────── */

/* 1. Breadcrumb — gray default (#7E8FA8), blue on hover */
#maincontent .article-breadcrumb a {
  color: var(--fg-2, #7E8FA8);
}
#maincontent .article-breadcrumb a:hover {
  color: var(--accent, #4DB8FF);
}

/* 2. Meta bar — author / date / views / category */
#maincontent .article-meta .meta-item {
  color: var(--fg-2, #7E8FA8);
}
#maincontent .article-meta .meta-value {
  color: var(--fg-1, #E8EEF7);
}
#maincontent .article-meta .meta-value a {
  color: inherit;
}
#maincontent .article-meta a.meta-item {
  color: var(--fg-2, #7E8FA8);
}
#maincontent .article-meta a.meta-item .bi {
  color: var(--fg-2, #7E8FA8);
}
#maincontent .article-meta a.meta-item:hover,
#maincontent .article-meta a.meta-item:hover .bi {
  color: var(--accent, #4DB8FF);
}

/* 3. Pager cards — light text default, blue title on hover */
#maincontent .pager-card {
  color: var(--fg-1, #E8EEF7);
}
#maincontent .pager-card .pager-title {
  color: var(--fg-1, #E8EEF7);
}
#maincontent .pager-card:hover .pager-title {
  color: var(--accent, #4DB8FF);
}

/* 4. Back-to-list button — light default, blue on hover */
#maincontent .pager-backlink a {
  color: var(--fg-1, #E8EEF7);
  border: 1px dashed var(--border, #2A3A55);
}
#maincontent .pager-backlink a:hover {
  color: var(--accent, #4DB8FF);
  border-color: var(--accent, #4DB8FF);
  border-style: solid;
  background: rgba(77, 184, 255, 0.06);
}

/* 5. Attachments — light default, blue on hover */
#maincontent .attachment-row {
  color: var(--fg-1, #E8EEF7);
}
#maincontent .attachment-row:hover {
  color: var(--accent, #4DB8FF);
  background: rgba(77, 184, 255, 0.04);
}

/* 6. Share rail — override #maincontent a { color: accent } (1,0,1)
      and #maincontent a:hover { color: accent-press } (1,0,2)
      to restore example default (fg-1 / dashed border) and
      per-social hover colours (email=orange, fb=blue, line=green) */
#maincontent .share-btn {
  color: var(--fg-1, #E8EEF7);
  border: 1px dashed var(--border, #2A3A55);
  background: transparent;
}
#maincontent .share-btn:hover,
#maincontent .share-btn:focus-visible {
  border-style: solid;
  border-color: var(--accent, #4DB8FF);
  color: var(--accent, #4DB8FF);
  background: rgba(77, 184, 255, 0.06);
}
#maincontent .share-btn[data-share="email"]:hover {
  border-color: #ff9a4d; color: #ff9a4d; background: rgba(255, 154, 77, 0.08);
}
#maincontent .share-btn[data-share="fb"]:hover {
  border-color: #4f86ee; color: #4f86ee; background: rgba(79, 134, 238, 0.08);
}
#maincontent .share-btn[data-share="line"]:hover {
  border-color: #06c755; color: #06c755; background: rgba(6, 199, 85, 0.08);
}
#maincontent .share-btn[data-share="copy"]:hover {
  border-color: var(--accent, #4DB8FF); color: var(--accent, #4DB8FF);
}

/* 7. Article-lead INTRO box — ensure border+label visible with #maincontent specificity */
#maincontent .article-lead {
  border: 1px dashed var(--border, #2A3A55);
  padding: 28px;
  margin: 8px 0 40px;
  position: relative;
}
#maincontent .article-lead::before {
  content: 'INTRO';
  position: absolute;
  top: -8px;
  left: 18px;
  background: var(--bg, #0A1628);
  padding: 0 10px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent, #4DB8FF);
}
