/* ============================================================
   ContentGuard — AI Content Decay Detector
   Design System & Global Styles
   ============================================================ */

/* ── Variables ── */
:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --accent: #F59E0B;
  --accent-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Utilities ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.text-primary { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success  { color: var(--success); }
.text-muted    { color: var(--text-muted); }
.font-mono     { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); font-weight: 500; font-size: 0.9375rem;
  transition: all 0.15s ease; white-space: nowrap; cursor: pointer;
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--border-light); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-sm { padding: 6px 14px; font-size: 0.875rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.125rem; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { color: var(--text-muted); font-size: 0.9375rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.2s; }
.nav-mobile { display: none; flex-direction: column; padding: 16px 24px; border-top: 1px solid var(--border); gap: 12px; background: var(--surface); }
.nav-mobile.open { display: flex; }
.nav-mobile a:not(.btn) { color: var(--text-muted); font-weight: 500; }

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, #EFF6FF 0%, var(--bg) 100%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); color: var(--primary);
  padding: 6px 14px; border-radius: 100px; font-size: 0.8125rem; font-weight: 600;
  margin-bottom: 24px; border: 1px solid #BFDBFE;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
  animation: pulse2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.03em; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto;
}
.hero-sub {
  font-size: 1.125rem; color: var(--text-muted); max-width: 580px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-trust { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.8125rem; color: var(--text-muted); }
.hero-trust .sep { color: var(--border); }

/* ── Dashboard Preview ── */
.preview { padding: 0 0 80px; }
.preview-card {
  background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  overflow: hidden; border: 1px solid var(--border);
}
.preview-header {
  background: #F9FAFB; padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; }
.preview-dots span:nth-child(1) { background: #FC6058; }
.preview-dots span:nth-child(2) { background: #FEC02F; }
.preview-dots span:nth-child(3) { background: #2ACA44; }
.preview-url { font-size: 0.8125rem; color: var(--text-muted); font-family: var(--font-mono); }
.preview-body { display: flex; min-height: 320px; }
.preview-sidebar {
  width: 160px; background: #F9FAFB; border-right: 1px solid var(--border);
  padding: 16px 0; flex-shrink: 0;
}
.preview-nav-item {
  padding: 10px 16px; font-size: 0.8125rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.preview-nav-item.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.preview-main { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.preview-score-row { display: flex; gap: 12px; }
.preview-score-card {
  flex: 1; background: var(--border-light); border-radius: var(--radius); padding: 12px;
  text-align: center;
}
.preview-score-num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.preview-score-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.preview-article-list { display: flex; flex-direction: column; gap: 8px; }
.preview-article-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius); background: var(--border-light);
  font-size: 0.8125rem;
}
.preview-art-title { font-weight: 500; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-art-score {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.875rem;
  padding: 2px 8px; border-radius: 4px;
}
.score-danger { background: var(--danger-light); color: var(--danger); }
.score-warning { background: var(--warning-light); color: var(--warning); }
.score-success { background: var(--success-light); color: var(--success); }

/* ── Section commons ── */
.section-label {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 16px; line-height: 1.2;
}
.section-sub { font-size: 1.0625rem; color: var(--text-muted); max-width: 520px; }

/* ── How It Works ── */
.how-it-works { padding: 80px 0; background: var(--surface); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 48px; }
.step-card {
  padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-icon {
  width: 48px; height: 48px; border-radius: var(--radius); background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--primary);
}
.step-icon i { font-size: 1.375rem; }
.step-card h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.65; }

/* ── Features ── */
.features { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 48px; }
.feature-item {
  padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); transition: box-shadow 0.2s;
}
.feature-item:hover { box-shadow: var(--shadow); }
.feature-icon {
  width: 40px; height: 40px; border-radius: var(--radius); background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--primary);
}
.feature-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feature-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ── Pricing ── */
.pricing { padding: 80px 0; background: var(--surface); text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 48px; text-align: left; }
.pricing-card {
  padding: 32px; border-radius: var(--radius-xl); border: 1.5px solid var(--border);
  background: var(--bg); position: relative; transition: box-shadow 0.2s, transform 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pricing-card.popular { border-color: var(--primary); background: var(--surface); box-shadow: var(--shadow-md); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.pricing-tier { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.price-amount { font-size: 2.5rem; font-weight: 800; font-family: var(--font-mono); letter-spacing: -0.03em; }
.price-period { font-size: 0.9375rem; color: var(--text-muted); }
.pricing-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 20px; }
.pricing-features { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.pricing-features li i { color: var(--success); font-size: 1rem; flex-shrink: 0; }

/* ── FAQ ── */
.faq { padding: 80px 0; }
.faq-list { margin-top: 40px; display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item {
  padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--surface);
  transition: background 0.15s;
}
.faq-item:last-child { border-bottom: none; }
.faq-item:hover { background: var(--border-light); }
.faq-item h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.faq-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ── CTA ── */
.cta-section { padding: 80px 0; text-align: center; background: var(--primary); color: #fff; }
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; margin-bottom: 12px; }
.cta-section p { font-size: 1.0625rem; opacity: 0.85; margin-bottom: 28px; }
.cta-section .btn-primary { background: #fff; color: var(--primary); }
.cta-section .btn-primary:hover { background: #F3F4F6; }

/* ── Footer ── */
.footer { padding: 48px 0 24px; background: var(--text); color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-brand p { font-size: 0.875rem; color: #9CA3AF; margin-top: 8px; max-width: 260px; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #9CA3AF; margin-bottom: 4px; }
.footer-col a { font-size: 0.9rem; color: #D1D5DB; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; }
.footer-bottom p { font-size: 0.8125rem; color: #6B7280; }

/* ── Dashboard Layout ── */
.dashboard-layout { display: flex; min-height: calc(100vh - var(--nav-h)); }
.dashboard-sidebar {
  width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 0; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); transition: all 0.15s;
}
.sidebar-nav a:hover { background: var(--border-light); color: var(--text); }
.sidebar-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-nav a i { font-size: 1rem; }
.dashboard-main { flex: 1; padding: 32px; min-width: 0; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.dashboard-title { font-size: 1.5rem; font-weight: 800; }
.dashboard-actions { display: flex; gap: 8px; }

/* ── Score Cards ── */
.score-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.score-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.score-card-label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
.score-card-value { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; line-height: 1; }
.score-card-sub { font-size: 0.75rem; color: var(--text-light); margin-top: 4px; }

/* ── Filter Bar ── */
.filter-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 14px; border-radius: 100px; font-size: 0.8125rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.search-box {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: 100px; background: var(--surface);
  margin-left: auto; min-width: 200px;
}
.search-box input { border: none; outline: none; font-size: 0.875rem; background: transparent; width: 100%; color: var(--text); }
.search-box i { color: var(--text-muted); font-size: 0.875rem; }

/* ── Article List ── */
.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 16px 20px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
  transition: box-shadow 0.15s, transform 0.15s; cursor: pointer;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateX(2px); }
.article-card.critical { border-left: 3px solid var(--danger); }
.article-card.watch { border-left: 3px solid var(--warning); }
.article-card.healthy { border-left: 3px solid var(--success); }
.article-info { flex: 1; min-width: 0; }
.article-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-url { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-meta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.article-score-badge {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.125rem;
  padding: 6px 12px; border-radius: var(--radius); min-width: 52px; text-align: center;
}
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-success { background: var(--success-light); color: var(--success); }
.article-scanned { font-size: 0.75rem; color: var(--text-light); white-space: nowrap; }
.article-detail-link { font-size: 0.8125rem; color: var(--primary); font-weight: 500; white-space: nowrap; }

/* ── Score Breakdown Bars ── */
.score-breakdown { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.breakdown-bar { display: flex; align-items: center; gap: 8px; }
.breakdown-label { font-size: 0.6875rem; color: var(--text-muted); width: 52px; flex-shrink: 0; }
.breakdown-track { width: 60px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: 2px; transition: width 0.4s ease-out; }
.fill-link { background: var(--danger); }
.fill-image { background: var(--warning); }
.fill-fresh { background: var(--primary); }
.fill-engage { background: var(--success); }

/* ── Gauge ── */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gauge-svg { width: 120px; height: 120px; }
.gauge-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.gauge-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease-out, stroke 0.3s; }
.gauge-text { font-family: var(--font-mono); font-size: 28px; font-weight: 700; fill: var(--text); }
.gauge-label { font-size: 0.75rem; color: var(--text-muted); }

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--border);
}
.settings-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.settings-card-title i { color: var(--primary); }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.9375rem; background: var(--bg); color: var(--text); outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); background: var(--surface); }
.form-select { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 0.9375rem; background: var(--bg); color: var(--text); outline: none; cursor: pointer; }
.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }
.cms-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.cms-card {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center;
  cursor: pointer; transition: all 0.15s; background: var(--bg);
}
.cms-card:hover { border-color: var(--primary); }
.cms-card.selected { border-color: var(--primary); background: var(--primary-light); }
.cms-card i { font-size: 1.5rem; color: var(--primary); margin-bottom: 8px; display: block; }
.cms-card-name { font-size: 0.875rem; font-weight: 600; }
.connected-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--success-light); color: var(--success);
  padding: 4px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 600;
}
.connected-badge i { font-size: 0.75rem; }

/* ── Onboarding ── */
.onboarding-wrap { max-width: 560px; margin: 0 auto; padding: 48px 24px; }
.onboarding-steps { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 40px; }
.ob-step {
  display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-muted); font-weight: 500;
}
.ob-step-num {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 700;
  transition: all 0.2s;
}
.ob-step.active .ob-step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.ob-step.done .ob-step-num { border-color: var(--success); background: var(--success); color: #fff; }
.ob-step.active { color: var(--primary); }
.ob-connector { width: 40px; height: 2px; background: var(--border); }
.ob-connector.done { background: var(--success); }
.ob-panel { background: var(--surface); border-radius: var(--radius-xl); padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.ob-panel-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.ob-panel-sub { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 28px; }
.ob-panel-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }
.scan-preview { margin-top: 20px; }
.scan-preview-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius); background: var(--border-light);
  margin-bottom: 6px; font-size: 0.875rem;
}
.scan-preview-item-title { font-weight: 500; }
.scan-preview-item-score { font-family: var(--font-mono); font-weight: 700; }

/* ── Article Detail ── */
.article-detail-header { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.article-detail-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.article-detail-url { font-size: 0.875rem; color: var(--primary); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid var(--border);
}
.detail-card-title { font-size: 0.9375rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.issue-list { display: flex; flex-direction: column; gap: 8px; }
.issue-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius); background: var(--border-light);
  font-size: 0.875rem;
}
.issue-item i { margin-top: 2px; flex-shrink: 0; }
.issue-type-link i { color: var(--danger); }
.issue-type-image i { color: var(--warning); }
.issue-type-fresh i { color: var(--primary); }
.issue-url { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-muted); word-break: break-all; }
.history-chart { height: 120px; display: flex; align-items: flex-end; gap: 4px; padding: 8px 0; }
.history-bar {
  flex: 1; border-radius: 4px 4px 0 0; background: var(--primary); transition: height 0.4s ease-out;
  min-height: 4px; position: relative;
}
.history-bar:hover::after {
  content: attr(data-score); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 0.6875rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; color: var(--border); }
.empty-state h3 { font-size: 1.125rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 0.9375rem; margin-bottom: 20px; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: slideIn0.2s ease-out;
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--primary); color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 48px 0 40px; }
  .preview-body { flex-direction: column; }
  .preview-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .preview-nav-item { display: inline-flex; padding: 8px 16px; }
  .dashboard-layout { flex-direction: column; }
  .dashboard-sidebar { width: 100%; position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding: 0; }
  .dashboard-main { padding: 20px; }
  .settings-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .cms-cards { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .search-box { min-width: 140px; margin-left: 0; }
  .article-card { flex-wrap: wrap; }
  .article-meta { flex-wrap: wrap; }
}
