/* Accessibility: Skip to Main Content Link (WCAG 2.1 Level A) */
.skip-to-content {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary, #002b49);
  color: #ffffff !important;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  transition: top 0.15s ease-in-out;
}
.skip-to-content:focus {
  top: 0;
  outline: 3px solid var(--primary-link, #005bac);
  outline-offset: 2px;
}
#main-content {
  display: block;
}
#main-content:focus {
  outline: none;
}

/* =======================================================
   Multi-Theme Design Proposals System
   ======================================================= */

/* Proposal 1 (Default): Nikkei Media Editorial (日本経済新聞スタイル) */
:root, [data-theme="editorial"] {
  --primary: #002b49;           /* 日経ディープネイビー / 濃紺 */
  --primary-hover: #004070;
  --primary-light: #f0f4f8;
  --primary-link: #005bac;      /* 日経リンクブルー */
  --primary-glow: rgba(0, 43, 73, 0.12);
  --accent: #b91c1c;            /* 日経速報レッド / クリムゾン */
  --accent-hover: #991b1b;
  --sister-accent: #059669;     /* INSIGHTSからMarketへの案内エメラルド */
  --text-main: #111111;         /* 日経リッチブラック */
  --text-muted: #666666;        /* 日経メタデータグレー */
  --text-light: #888888;
  --bg-main: #f7f7f7;           /* 日経クリーンオフホワイト */
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-header: #ffffff;
  --border: #e5e5e5;            /* 日経1pxヘアラインボーダー */
  --border-hover: #002b49;
  --badge-report-bg: #eef3f7;
  --badge-report-text: #002b49;
  --badge-news-bg: #fef2f2;
  --badge-news-text: #b91c1c;
  --ad-bg: #f9f9f9;
  --ad-border: #e5e5e5;
  --hero-bg: #002b49;           /* 日経マストヘッドネイビー */
  --hero-text: #ffffff;
  --hero-badge-bg: rgba(255, 255, 255, 0.14);
  --hero-badge-border: rgba(255, 255, 255, 0.28);
  --card-radius: 6px;           /* 日経の端正な角丸 */
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 4px 14px rgba(0, 43, 73, 0.08);
  --font-heading: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

/* FactPresso Market Dedicated Brand Tokens */
body[data-site-type="investor"] {
  --primary: #047857;           /* マーケット投資フォレストグリーン */
  --primary-hover: #065f46;
  --primary-light: #ecfdf5;
  --primary-link: #0284c7;      /* セクターリンクブルー */
  --primary-glow: rgba(4, 120, 87, 0.15);
  --accent: #0284c7;            /* カタリストアクセントブルー */
  --accent-hover: #0369a1;
  --sister-accent: #002b49;     /* MarketからINSIGHTSへの案内ネイビー */
  --badge-news-bg: #ecfdf5;
  --badge-news-text: #047857;
  --badge-report-bg: #eff6ff;
  --badge-report-text: #0369a1;
  --hero-bg: #064e3b;           /* マーケット深緑 */
}

/* Proposal 2: Executive Intelligence (Nikkei / Financial Times / Bloomberg) */
[data-theme="executive"] {
  --primary: #1a2e4c;
  --primary-hover: #0f1c30;
  --primary-light: #f0f4f8;
  --primary-link: #8b263e;
  --primary-glow: rgba(26, 46, 76, 0.1);
  --accent: #8b263e;
  --text-main: #1c1c1c;
  --text-muted: #595959;
  --text-light: #888888;
  --bg-main: #fbf9f4;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-header: rgba(251, 249, 244, 0.96);
  --border: #e2ded4;
  --border-hover: #c4beaf;
  --badge-report-bg: #f0f4f8;
  --badge-report-text: #1a2e4c;
  --badge-news-bg: #faebee;
  --badge-news-text: #8b263e;
  --ad-bg: #f5f1e8;
  --ad-border: #ded7c8;
  --hero-bg: #1a2e4c;
  --hero-text: #ffffff;
  --hero-badge-bg: rgba(180, 131, 62, 0.2);
  --hero-badge-border: rgba(180, 131, 62, 0.4);
  --card-radius: 4px;
  --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.06);
  --font-heading: "Newsreader", "Charter", "Georgia", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", serif;
}

/* Proposal 3: Cyber Dark Modern (Linear / Vercel / Raycast AI) */
[data-theme="cyber"] {
  --primary: #06b6d4;
  --primary-hover: #22d3ee;
  --primary-light: rgba(6, 182, 212, 0.12);
  --primary-link: #38bdf8;
  --primary-glow: rgba(6, 182, 212, 0.25);
  --accent: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --bg-main: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #162032;
  --bg-header: rgba(11, 15, 25, 0.94);
  --border: #1f293d;
  --border-hover: #38bdf8;
  --badge-report-bg: rgba(6, 182, 212, 0.12);
  --badge-report-text: #38bdf8;
  --badge-news-bg: rgba(244, 63, 94, 0.15);
  --badge-news-text: #fb7185;
  --ad-bg: #0e1524;
  --ad-border: #1e293b;
  --hero-bg: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b0f19 80%);
  --hero-text: #ffffff;
  --hero-badge-bg: rgba(6, 182, 212, 0.18);
  --hero-badge-border: rgba(6, 182, 212, 0.4);
  --card-radius: 10px;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 10px 25px -5px rgba(6, 182, 212, 0.2), 0 0 15px rgba(6, 182, 212, 0.15);
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

/* Proposal 4: Swiss Minimal Reader (Notion / Medium / Swiss Modern) */
[data-theme="minimal"] {
  --primary: #171717;
  --primary-hover: #404040;
  --primary-light: #f5f5f5;
  --primary-link: #171717;
  --primary-glow: rgba(0, 0, 0, 0.05);
  --accent: #ea580c;
  --text-main: #171717;
  --text-muted: #737373;
  --text-light: #a3a3a3;
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-header: #ffffff;
  --border: #e5e5e5;
  --border-hover: #171717;
  --badge-report-bg: #f5f5f5;
  --badge-report-text: #171717;
  --badge-news-bg: #fff7ed;
  --badge-news-text: #c2410c;
  --ad-bg: #fafafa;
  --ad-border: #e5e5e5;
  --hero-bg: #ffffff;
  --hero-text: #171717;
  --hero-badge-bg: #f5f5f5;
  --hero-badge-border: #e5e5e5;
  --card-radius: 6px;
  --card-shadow: none;
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.05);
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

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

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.7;
  font-size: 16px;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, .logo, .card-title, .hero-title, .article-title, .section-title {
  font-family: var(--font-heading);
}

/* =======================================================
   Unified SVG Icon System
   ======================================================= */
.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.icon-xs {
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.05em;
}

.icon-sm {
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.1em;
}

.icon-md {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
}

.icon-lg {
  width: 1.4em;
  height: 1.4em;
  vertical-align: -0.2em;
}

.icon-xl {
  width: 2em;
  height: 2em;
  vertical-align: -0.25em;
}

/* Icon Color Utilities */
.icon-primary { color: var(--primary); }
.icon-accent { color: var(--accent); }
.icon-sister { color: var(--sister-accent); }
.icon-muted { color: var(--text-muted); }
.icon-success { color: #10b981; }
.icon-warning { color: #f59e0b; }
.icon-danger { color: #ef4444; }

/* Semantic Components & Sister Site Integration */
.sister-site-callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--sister-accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.sister-site-callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sister-accent);
  margin-bottom: 0.35rem;
}

.sister-site-callout-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sister-site-callout-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.sister-site-callout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--sister-accent);
  color: #ffffff !important;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.sister-site-callout-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.toc-box-sister {
  border-left: 4px solid var(--sister-accent) !important;
}

.link-sister {
  color: var(--sister-accent) !important;
  font-weight: 600;
  text-decoration: none;
}

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

/* Header & Navigation */
header.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-badge {
  font-size: 0.72rem;
  background: var(--primary);
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

nav.main-nav {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
  transition: color 0.2s, background-color 0.2s;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
}

nav.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
  background: var(--bg-main);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.lang-switch a {
  text-decoration: none;
  color: var(--text-muted);
}

.lang-switch a.active {
  color: var(--primary);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  color: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 740px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.hero-quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent accidental text selection on clickable controls & buttons (Issue #70) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
[role="button"],
.filter-pill,
.btn-subscribe-nav,
.btn-subscribe-action,
.btn-modal-close,
.btn-sub-small,
.btn-sub-danger,
.btn-feed-copy,
.btn-reader-link,
.btn-theme-toggle,
.card-badge,
.sidebar-widget-badge,
.sidebar-card-badge,
.eyecatch-source-badge,
.open-subscribe-modal-btn {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.filter-pill:hover, .filter-pill.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.layout-grid.no-sidebar,
.layout-grid:has(aside:empty) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
  margin: 0 auto;
}

aside:empty {
  display: none;
}

main,
article {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* Section Title */
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  border-left: 4px solid var(--primary);
  padding-left: 0.65rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  position: relative;
}

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

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  align-self: flex-start;
  letter-spacing: 0.04em;
}

.badge-report {
  background: var(--badge-report-bg);
  color: var(--badge-report-text);
  border: 1px solid rgba(0, 43, 73, 0.18);
}

.badge-news {
  background: var(--badge-news-bg);
  color: var(--badge-news-text);
  border: 1px solid rgba(185, 28, 28, 0.15);
}

.badge-market {
  background: var(--badge-news-bg);
  color: var(--badge-news-text);
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  transition: color 0.2s;
}

.article-card:hover .card-title {
  color: var(--primary-link, #005bac);
  text-decoration: underline;
}

.card-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

/* Article Detail View */
.article-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius, 6px);
  padding: 2rem;
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 1rem 0;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-eyecatch {
  margin: 1.25rem 0 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #07162c;
  max-width: 100%;
}

.article-eyecatch-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.article-eyecatch-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}

.eyecatch-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.76rem;
  white-space: nowrap;
}

.eyecatch-title-text {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--text-main);
  font-weight: 600;
}

.takeaways-box {
  background: var(--primary-light);
  border: 1px solid #dce5ec;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.takeaways-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.takeaways-list {
  padding-left: 1.25rem;
  color: #1e293b;
  line-height: 1.7;
}

.article-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius, 6px);
  padding: 2.5rem;
  margin-bottom: 2rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.article-body img,
.article-body svg,
.article-body video {
  max-width: 100%;
  height: auto;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.article-body code {
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-body a {
  color: var(--primary-link, #005bac);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.article-body a:hover {
  color: var(--primary-hover, #004070);
}

.article-body h1, .article-body h2 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  font-weight: 700;
  border-left: 4px solid var(--primary);
  padding-left: 0.65rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  color: var(--text-main);
}

.article-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 0.5rem;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.25rem;
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  box-sizing: border-box;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-sizing: border-box;
}

.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
  min-width: 110px;
  white-space: normal;
  word-break: normal;
  line-break: strict;
}

.article-body th {
  background: var(--bg-main);
  font-weight: 700;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: #f1f5f9;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.toc-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.toc-header .toc-title {
  margin-bottom: 0;
}

.toc-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.toc-toggle-btn:hover,
.toc-toggle-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  outline: none;
}

.toc-item.toc-item-active > .toc-link,
.toc-item.toc-item-active > a {
  font-weight: 700;
  color: var(--primary);
  border-left: 2px solid var(--primary);
  padding-left: 0.35rem;
}

.sidebar-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1023px) {
  .sidebar-toc {
    display: none;
  }
}

.reading-progress-widget {
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.reading-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.reading-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.1s ease;
}

.toc-list {
  list-style-type: none;
  padding-left: 0;
}

.toc-item {
  margin-bottom: 0.4rem;
}

.toc-item a {
  text-decoration: none;
  color: var(--primary);
  font-size: 0.9rem;
}

.toc-level-2 {
  padding-left: 1rem;
}

.toc-level-3 {
  padding-left: 2rem;
}

/* Advertising Slots (AdSense / Monetization) */
.ad-slot {
  text-align: center;
  padding: 0;
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
}

.ad-slot-in-article-mid {
  margin: 1.5rem 0;
}

.ad-slot:empty {
  display: none;
}

.ad-preview-banner {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 1rem 0;
}

.ad-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--text-muted, #4b5563);
  background: var(--bg-main, #f1f5f9);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.4rem;
}

/* Site-Native Self-Recommendation House Ad Fallback */
.native-house-ad-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  box-sizing: border-box;
}

.native-house-ad-card:hover {
  border-color: var(--primary, #002b49);
  box-shadow: 0 4px 12px rgba(0, 43, 73, 0.08);
}

.house-ad-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.house-ad-pr-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

.house-ad-source-badge {
  display: none;
}

.house-ad-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary, #002b49);
  margin: 0.25rem 0 0.5rem 0;
  line-height: 1.45;
}

.house-ad-desc {
  font-size: 0.85rem;
  color: var(--text-muted, #475569);
  line-height: 1.55;
  margin: 0 0 1rem 0;
}

.house-ad-footer {
  display: flex;
  justify-content: flex-end;
}

.house-ad-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--primary, #002b49);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.house-ad-cta-btn:hover {
  background: #00406c;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.sticky-sidebar {
  position: sticky;
  top: 5rem;
}

/* Sidebar Recommendations Fallback Widget */
.sidebar-recommendations {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius, 6px);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.sidebar-widget-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.sidebar-widget-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.sidebar-recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-recommendation-card {
  display: block;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 4px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.sidebar-recommendation-card:hover {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.sidebar-card-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.sidebar-card-badge.badge-report {
  background: var(--badge-report-bg);
  color: var(--badge-report-text);
}

.sidebar-card-badge.badge-news {
  background: var(--badge-news-bg);
  color: var(--badge-news-text);
}

.sidebar-card-badge.badge-market {
  background: var(--badge-news-bg);
  color: var(--badge-news-text);
}

.sidebar-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  margin: 0 0 0.3rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-recommendation-card:hover .sidebar-card-title {
  color: var(--primary-link);
}

.sidebar-card-org {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Interactive AI Widget Box */
.ai-widget-box {
  background: #f8fafc;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.ai-widget-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #1e40af;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-widget-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Static FAQ Accordion (No AI required) */
.faq-accordion {
  margin-bottom: 1.5rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  padding: 0.85rem 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: #f8fafc;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #f1f5f9;
}

.faq-answer {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
  border-top: 1px solid var(--border);
  line-height: 1.6;
  background: #ffffff;
}

/* A/B Test Toolbar & Engine Variant Switcher */
.ai-ab-toolbar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
}

.ai-ab-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.ai-ab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.ai-ab-hint {
  font-size: 0.78rem;
  color: #64748b;
}

.ai-ab-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.ai-ab-tab {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
}

.ai-ab-tab:hover {
  border-color: #3b82f6;
  color: #1e3a8a;
  background: #f1f5f9;
}

.ai-ab-tab.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 0 0 1px #2563eb;
}

/* Sample Question Chips */
.ai-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.ai-chip-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* User-Selectable Model Size Radio Cards (Measured Byte Sizes) */
.model-selector-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.model-select-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  max-width: 100%;
  box-sizing: border-box;
}

.model-select-card:hover {
  border-color: #60a5fa;
  background: #f8fafc;
}

.model-select-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.model-select-card input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.model-select-card-body {
  flex: 1;
  min-width: 0;
}

.model-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.model-select-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}

.model-select-size-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.badge-light {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-heavy {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.model-select-id {
  font-size: 0.78rem;
  color: #334155;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.model-select-id code,
.model-select-breakdown code {
  background: #e2e8f0;
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.model-select-breakdown {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 0.25rem;
  word-break: normal;
  overflow-wrap: break-word;
}

.model-select-target {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e40af;
}

/* AI Model Specification Box */
.model-spec-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  text-align: left;
}

.model-spec-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.model-spec-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.75rem;
  color: #334155;
  line-height: 1.5;
}

.model-spec-grid code {
  background: #e2e8f0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
  word-break: break-all;
}

.model-spec-note {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
  border-top: 1px dashed #cbd5e1;
  padding-top: 0.5rem;
}

/* AI Activation Area */
.ai-activation-panel {
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.ai-widget-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.ai-widget-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.ai-widget-button:hover {
  background: var(--primary-hover);
}

.ai-widget-button-secondary {
  background: #64748b;
  color: #fff;
  border: none;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

.ai-widget-button-secondary:hover {
  background: #475569;
}

.ai-widget-response {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.9rem;
  display: none;
  line-height: 1.6;
}

/* Modal Dialog (Wi-Fi Warning) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-align: left;
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Progress Bar */
.progress-container {
  display: none;
  margin-top: 1rem;
  text-align: left;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  transition: width 0.3s ease;
}

/* Footer */
footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  margin-right: 1.5rem;
  font-size: 0.9rem;
}

/* =======================================================
   Subscription & Notification Features (Web Push & RSS)
   ======================================================= */
.btn-subscribe-nav {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-subscribe-nav:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.subscribe-sidebar-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.subscribe-sidebar-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.btn-subscribe-action {
  display: inline-block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-subscribe-action:hover {
  background: var(--primary-hover);
}

.subscribe-article-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.subscribe-article-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.subscribe-article-icon {
  font-size: 2rem;
  line-height: 1;
}

.subscribe-article-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 0.25rem;
}

.subscribe-article-content p {
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 0;
  line-height: 1.5;
}

.subscribe-modal-dialog {
  max-width: 580px;
  text-align: left;
}

.subscribe-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.subscribe-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e3a8a;
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.btn-modal-close:hover {
  color: var(--text-main);
}

.subscribe-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.subscribe-methods-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.subscribe-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.subscribe-card-icon {
  font-size: 1.75rem;
  line-height: 1;
  padding-top: 0.1rem;
}

.subscribe-card-content {
  flex: 1;
  min-width: 0;
}

.subscribe-card-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.subscribe-card-content p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.status-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  line-height: 1.4;
}

.status-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-warn {
  background: #fef9c3;
  color: #a16207;
  border: 1px solid #fef08a;
}

.status-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-sub-small {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sub-small:hover {
  background: #f1f5f9;
}

.btn-sub-danger {
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-sub-danger:hover {
  background: #fef2f2;
}

.feed-url-box {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.feed-url-input {
  flex: 1;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: monospace;
  color: var(--text-main);
  min-width: 0;
}

.btn-feed-copy {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-feed-copy:hover {
  background: var(--primary-hover);
}

.feed-reader-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-reader-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.2s;
}

.btn-reader-link:hover {
  opacity: 0.9;
}

.btn-feedly {
  background: #2bb24c;
}

.btn-inoreader {
  background: #0077b6;
}

.btn-email-subscribe {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  margin-top: 0.25rem;
}

.subscribe-modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* =======================================================
   Mobile & Tablet Responsive Optimizations (Prevents Text Collapse)
   ======================================================= */

/* Tablet & Medium Desktop Header Optimization (Keeps 1-line layout clean) */
@media (max-width: 1120px) and (min-width: 769px) {
  .header-container {
    padding: 0.7rem 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav.main-nav {
    gap: 0.4rem;
  }

  nav.main-nav a {
    font-size: 0.82rem;
    padding: 0.2rem 0.35rem;
  }

  .btn-subscribe-nav {
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
  }
}

@media (max-width: 960px) {
  .nav-sister-badge {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Layout & Containers */
  .container {
    padding: 0 1rem;
    margin: 1.25rem auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
  }

  .sticky-sidebar {
    position: static;
  }

  /* Header Navigation (Fits completely within screen width without horizontal scroll) */
  .header-container {
    padding: 0.6rem 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav.main-nav {
    width: 100%;
    overflow-x: visible;
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem 0.6rem;
    padding-bottom: 0;
  }

  nav.main-nav a {
    font-size: 0.82rem;
    padding: 0.2rem 0.45rem;
    line-height: 1.2;
    border-radius: 4px;
    background: #f1f5f9;
    white-space: nowrap;
    word-break: keep-all;
  }

  .btn-subscribe-nav {
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0;
  }

  /* Hero Section */
  .hero-section {
    padding: 2.25rem 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.35;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Cards Grid */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .article-card {
    padding: 1.25rem 1rem;
  }

  .card-title {
    font-size: 1.1rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .card-meta {
    flex-direction: column;
    gap: 0.4rem;
  }

  /* Article Detail View */
  .article-header {
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
  }

  .article-title {
    font-size: 1.4rem;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .article-meta-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .article-body {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .article-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    font-size: 0.85rem;
  }

  .article-body th, .article-body td {
    min-width: 80px;
    padding: 0.45rem 0.6rem;
  }

  .factsheet-figures-box {
    padding: 0.85rem !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .eyecatch-source-badge {
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
  }

  .article-meta-bar span {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .ai-disclosure-footer code {
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.76rem;
  }

  .related-articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important;
    width: 100%;
    max-width: 100%;
  }

  .article-body h1 {
    font-size: 1.35rem;
  }

  .article-body h2 {
    font-size: 1.2rem;
  }

  .article-body h3 {
    font-size: 1.05rem;
  }

  .takeaways-box {
    padding: 1rem;
  }

  .toc-box {
    padding: 1rem;
  }

  .subscribe-article-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1rem;
  }

  .subscribe-article-box .btn-subscribe-action {
    width: 100%;
  }

  .subscribe-card {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Footer */
  footer.site-footer {
    padding: 2rem 1rem;
    margin-top: 2.5rem;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-links a {
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  /* Smaller Phones (iPhone SE, etc.) */
  .container {
    padding: 0 0.75rem;
    margin: 1rem auto;
  }

  .article-body {
    padding: 1rem 0.75rem;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .article-title {
    font-size: 1.25rem;
  }

  .modal-dialog {
    padding: 1.25rem 1rem;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .modal-body {
    font-size: 0.85rem;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .ai-widget-button,
  .ai-widget-button-secondary {
    width: 100%;
    margin-left: 0;
    padding: 0.75rem 1rem;
  }

  .model-spec-grid {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .ai-ab-tabs {
    grid-template-columns: 1fr;
  }

  .ai-ab-toolbar {
    padding: 0.7rem 0.75rem;
  }

  .model-select-card {
    padding: 0.65rem 0.7rem;
  }

  nav.main-nav {
    gap: 0.3rem 0.45rem;
  }

  nav.main-nav a {
    font-size: 0.78rem;
    padding: 0.2rem 0.35rem;
  }
}

/* =======================================================
   Theme Overrides & Component Theming
   ======================================================= */

/* Proposal 2: Executive Intelligence Custom Overrides */
[data-theme="executive"] .hero-section {
  background: var(--hero-bg);
  border-bottom: 3px double #b4833e;
}
[data-theme="executive"] .hero-quick-filters .filter-pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(180, 131, 62, 0.4);
}
[data-theme="executive"] .hero-quick-filters .filter-pill:hover,
[data-theme="executive"] .hero-quick-filters .filter-pill.active {
  background: #b4833e;
  color: #ffffff;
  border-color: #b4833e;
}
[data-theme="executive"] .article-card {
  border-top: 3px solid var(--primary);
  border-radius: 4px;
}
[data-theme="executive"] .takeaways-box {
  background: #fdfbf7;
  border: 1px solid #e7dfcf;
  border-left: 4px solid #b4833e;
}
[data-theme="executive"] .takeaways-title {
  color: #8b263e;
}
[data-theme="executive"] .takeaways-list {
  color: #1a1a1a;
}

/* Proposal 3: Cyber Dark Modern Custom Overrides */
[data-theme="cyber"] input,
[data-theme="cyber"] textarea,
[data-theme="cyber"] select {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}
[data-theme="cyber"] .modal-dialog {
  background: #111827;
  color: #f8fafc;
  border: 1px solid #1f293d;
}
[data-theme="cyber"] .modal-title {
  color: #f8fafc;
}
[data-theme="cyber"] .modal-body {
  background: #0f172a;
  color: #cbd5e1;
}
[data-theme="cyber"] .ai-ab-toolbar,
[data-theme="cyber"] .model-select-card {
  background: #111827;
  border-color: #1f293d;
  color: #f8fafc;
}
[data-theme="cyber"] .ai-ab-tab,
[data-theme="cyber"] .ai-chip-btn {
  background: #162032;
  border-color: #1f293d;
  color: #cbd5e1;
}
[data-theme="cyber"] .ai-ab-tab.active,
[data-theme="cyber"] .model-select-card.selected {
  background: rgba(6, 182, 212, 0.14);
  border-color: #06b6d4;
  color: #38bdf8;
}
[data-theme="cyber"] .model-select-name {
  color: #f8fafc;
}
[data-theme="cyber"] .model-select-id,
[data-theme="cyber"] .model-select-breakdown {
  color: #94a3b8;
}
[data-theme="cyber"] .model-select-id code,
[data-theme="cyber"] .model-select-breakdown code {
  background: #1e293b;
  color: #38bdf8;
}
[data-theme="cyber"] .model-select-target {
  color: #38bdf8;
}
[data-theme="cyber"] .model-spec-box {
  background: #162032;
  border-color: #1f293d;
  color: #e2e8f0;
}
[data-theme="cyber"] .model-spec-title {
  color: #38bdf8;
}
[data-theme="cyber"] .model-spec-grid {
  color: #cbd5e1;
}
[data-theme="cyber"] .model-spec-grid code {
  background: #1e293b;
  color: #38bdf8;
}
[data-theme="cyber"] .model-spec-note {
  border-color: #1f293d;
  color: #94a3b8;
}
[data-theme="cyber"] .article-header,
[data-theme="cyber"] .takeaways-box,
[data-theme="cyber"] .toc-box,
[data-theme="cyber"] .faq-item,
[data-theme="cyber"] .faq-question,
[data-theme="cyber"] .faq-answer {
  background: #111827;
  border-color: #1f293d;
  color: #f8fafc;
}
[data-theme="cyber"] .faq-question:hover {
  background: #162032;
}
[data-theme="cyber"] .takeaways-box {
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}
[data-theme="cyber"] .takeaways-title {
  color: #38bdf8;
}
[data-theme="cyber"] .takeaways-list {
  color: #f1f5f9;
}
[data-theme="cyber"] .ai-activation-panel {
  background: #162032;
  border-color: #06b6d4;
}
[data-theme="cyber"] .sidebar-box,
[data-theme="cyber"] .footer-container {
  background: #111827;
  border-color: #1f293d;
}
[data-theme="cyber"] .site-footer {
  background: #080c14;
  border-color: #1f293d;
}
[data-theme="cyber"] .ai-widget-response {
  background: #162032;
  border-color: #1f293d;
  color: #f8fafc;
}
[data-theme="cyber"] nav.main-nav a {
  background: #162032;
  color: #e2e8f0;
}
[data-theme="cyber"] nav.main-nav a:hover {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
}

/* Proposal 4: Swiss Minimal Reader Custom Overrides */
[data-theme="minimal"] .hero-section {
  background: #ffffff;
  color: #171717;
  border-bottom: 1px solid #e5e5e5;
  padding: 4rem 1.5rem 3.5rem;
}
[data-theme="minimal"] .hero-badge {
  background: #f5f5f5;
  color: #525252;
  border-color: #e5e5e5;
}
[data-theme="minimal"] .hero-quick-filters .filter-pill {
  background: #f5f5f5;
  color: #171717;
  border-color: #e5e5e5;
}
[data-theme="minimal"] .hero-quick-filters .filter-pill:hover,
[data-theme="minimal"] .hero-quick-filters .filter-pill.active {
  background: #171717;
  color: #ffffff;
  border-color: #171717;
}
[data-theme="minimal"] .article-card {
  box-shadow: none;
  border: 1px solid #e5e5e5;
}
[data-theme="minimal"] .article-card:hover {
  transform: none;
  border-color: #171717;
}
[data-theme="minimal"] .takeaways-box {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-left: 4px solid #ea580c;
}
[data-theme="minimal"] .takeaways-title {
  color: #ea580c;
}
[data-theme="minimal"] .takeaways-list {
  color: #171717;
}

/* =======================================================
   Interactive Theme Switcher Bar
   ======================================================= */
.theme-switcher-bar {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  max-width: 480px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.theme-switcher-bar.collapsed {
  padding: 0.45rem 0.85rem;
}

.theme-switcher-bar.collapsed .theme-btn-group {
  display: none;
}

.theme-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.theme-switcher-bar.collapsed .theme-switcher-header {
  margin-bottom: 0;
}

.theme-switcher-label {
  font-size: 0.82rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-theme-toggle:hover {
  background: var(--border);
  color: var(--text-main);
}

.theme-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  user-select: none;
}

.theme-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.theme-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dot-editorial { background: #002b49; }
.dot-executive { background: #1a2e4c; }
.dot-cyber { background: #06b6d4; }
.dot-minimal { background: #171717; }

.theme-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.theme-text strong {
  font-size: 0.78rem;
  color: var(--text-main);
}

.theme-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .theme-switcher-bar {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    max-width: none;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
  }
  .theme-btn-group {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .theme-btn {
    padding: 0.4rem 0.5rem;
  }
  .theme-text strong {
    font-size: 0.72rem;
  }
  .theme-text small {
    display: none;
  }
}

/* ==========================================================================
   FactPresso Consent Management Banner
   ========================================================================== */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid var(--primary, #002b49);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  z-index: 99999;
  padding: 1rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #1e293b;
  box-sizing: border-box;
}

.consent-banner-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-sizing: border-box;
}

.consent-banner-text {
  flex: 1 1 480px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}

.consent-banner-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.consent-banner-text p {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

.consent-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.consent-btn {
  padding: 0.45rem 1.15rem;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.consent-btn-primary {
  background: var(--primary, #002b49);
  color: #ffffff;
  border-color: var(--primary, #002b49);
}

.consent-btn-primary:hover {
  opacity: 0.9;
}

.consent-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.consent-btn-secondary:hover {
  background: #e2e8f0;
}

@media (max-width: 480px) {
  .consent-banner {
    padding: 0.75rem 1rem;
  }
  .consent-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .consent-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Content Lock (Consent Gate / Paywall pattern) for denied users and undecided EU/UK */
.article-body.article-content-locked {
  max-height: 280px;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.article-body.article-content-locked::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 50%, #ffffff 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.consent-gate-overlay {
  position: relative;
  margin-top: -60px;
  margin-bottom: 2.5rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.consent-gate-card {
  background: #ffffff;
  border: 2px solid var(--primary, #002b49);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 12px 30px rgba(0, 43, 73, 0.15);
  text-align: center;
  animation: fadeInGate 0.3s ease-out;
}

@keyframes fadeInGate {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.consent-gate-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.consent-gate-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary, #002b49);
  margin-bottom: 0.6rem;
}

.consent-gate-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.consent-gate-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.consent-btn-large {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 43, 73, 0.2);
  cursor: pointer;
}

.consent-gate-footer {
  font-size: 0.85rem;
}

/* EU/GB Modal style banner */
.consent-banner.consent-banner-modal {
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 580px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--primary, #002b49);
}

/* Search Box enhancements (Issue #109) */
.search-box-wrapper {
  position: relative;
  max-width: 500px;
  display: flex;
  align-items: center;
}

.search-box-wrapper .ai-widget-input {
  width: 100%;
  padding-right: 2.25rem;
  margin-bottom: 0;
}

.search-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 4px;
}

.search-clear-btn:hover,
.search-clear-btn:focus-visible {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.05);
  outline: 2px solid var(--primary);
}

.search-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.search-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.search-empty-state .empty-state-icon {
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.search-empty-state .empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.search-empty-state .empty-state-desc {
  font-size: 0.875rem;
}

/* FactPresso Provenance Passport (Issue #112) */
.provenance-passport-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.passport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}

.passport-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

.passport-status-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.passport-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.passport-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.passport-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.passport-value {
  color: var(--text-main);
  word-break: break-word;
}

.passport-ext-link {
  font-size: 0.8rem;
  color: var(--primary);
  margin-left: 0.5rem;
  text-decoration: underline;
}

.passport-hash-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.passport-hash {
  background: var(--bg-main, #f1f5f9);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  word-break: break-all;
  font-family: monospace;
}

.btn-copy-hash {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.btn-copy-hash:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.passport-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.citation-pill {
  font-size: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  color: #334155;
}

.passport-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.passport-correction-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 300px;
}

.btn-passport-correction {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: rgba(2, 132, 199, 0.06);
  border-radius: 6px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.btn-passport-correction:hover {
  background: rgba(2, 132, 199, 0.12);
}
