@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   DESIGN TOKENS - LIGHT THEME (DEFAULT)
   Executive Fintech Editorial Cabinet (Stripe / Financial Times / Notion style)
   ========================================================================== */
:root {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-inset: #f1f5f9;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-emerald: #059669;
  --accent-emerald-hover: #047857;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-purple: #7c3aed;

  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);

  --navbar-bg: rgba(255, 255, 255, 0.88);
  --table-header-bg: #f8fafc;
  --modal-backdrop: rgba(15, 23, 42, 0.6);
  --input-bg: #ffffff;

  --role-reader-bg: #eff6ff;
  --role-reader-color: #1d4ed8;
  --role-reader-border: #bfdbfe;

  --role-editor-bg: #ecfdf5;
  --role-editor-color: #047857;
  --role-editor-border: #a7f3d0;

  --role-admin-bg: #f5f3ff;
  --role-admin-color: #6d28d9;
  --role-admin-border: #ddd6fe;

  --score-high-bg: #ecfdf5;
  --score-high-color: #047857;
  --score-high-border: #a7f3d0;

  --score-mid-bg: #fffbeb;
  --score-mid-color: #b45309;
  --score-mid-border: #fde68a;

  --score-low-bg: #f1f5f9;
  --score-low-color: #475569;
  --score-low-border: #cbd5e1;

  --fact-pill-bg: #eff6ff;
  --fact-pill-color: #1d4ed8;
  --fact-pill-border: #bfdbfe;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* ==========================================================================
   DESIGN TOKENS - DARK THEME OVERRIDE
   ========================================================================== */
[data-theme="dark"] {
  --bg-canvas: #080c14;
  --bg-surface: #0f172a;
  --bg-card: #162032;
  --bg-card-hover: #1d2a42;
  --bg-inset: #0b1120;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: #3b82f6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-medium);

  --navbar-bg: rgba(15, 23, 42, 0.85);
  --table-header-bg: rgba(0, 0, 0, 0.25);
  --modal-backdrop: rgba(8, 12, 20, 0.85);
  --input-bg: #162032;

  --role-reader-bg: rgba(59, 130, 246, 0.15);
  --role-reader-color: #60a5fa;
  --role-reader-border: rgba(59, 130, 246, 0.3);

  --role-editor-bg: rgba(16, 185, 129, 0.15);
  --role-editor-color: #34d399;
  --role-editor-border: rgba(16, 185, 129, 0.3);

  --role-admin-bg: rgba(139, 92, 246, 0.15);
  --role-admin-color: #c084fc;
  --role-admin-border: rgba(139, 92, 246, 0.3);

  --score-high-bg: rgba(16, 185, 129, 0.15);
  --score-high-color: #34d399;
  --score-high-border: rgba(16, 185, 129, 0.35);

  --score-mid-bg: rgba(245, 158, 11, 0.15);
  --score-mid-color: #fbbf24;
  --score-mid-border: rgba(245, 158, 11, 0.35);

  --score-low-bg: rgba(148, 163, 184, 0.15);
  --score-low-color: #cbd5e1;
  --score-low-border: rgba(148, 163, 184, 0.25);

  --fact-pill-bg: rgba(59, 130, 246, 0.12);
  --fact-pill-color: #93c5fd;
  --fact-pill-border: rgba(59, 130, 246, 0.25);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==========================================================================
   NAVBAR & HEADER
   ========================================================================== */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: var(--bg-inset);
}

.nav-item.active {
  color: var(--accent-blue);
  background-color: var(--role-reader-bg);
  border: 1px solid var(--role-reader-border);
  font-weight: 600;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

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

/* Role Pills */
/* Status Pill Variants */
.pill-neutral { 
  background: var(--bg-inset); 
  color: var(--text-muted); 
  border: 1px solid var(--border-subtle); 
}
.pill-success { 
  background: var(--role-editor-bg); 
  color: var(--role-editor-color); 
  border: 1px solid var(--role-editor-border); 
}
.pill-danger { 
  background: rgba(225, 29, 72, 0.08); 
  color: var(--accent-rose); 
  border: 1px solid rgba(225, 29, 72, 0.22); 
}
[data-theme="dark"] .pill-danger {
  background: rgba(244, 63, 94, 0.15); 
  color: #fda4af; 
  border: 1px solid rgba(244, 63, 94, 0.3); 
}
.pill-warning { 
  background: var(--score-mid-bg); 
  color: var(--score-mid-color); 
  border: 1px solid var(--score-mid-border); 
}
.pill-info { 
  background: var(--role-reader-bg); 
  color: var(--role-reader-color); 
  border: 1px solid var(--role-reader-border); 
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.role-reader { 
  background: var(--role-reader-bg); 
  color: var(--role-reader-color); 
  border: 1px solid var(--role-reader-border); 
}
.role-editor { 
  background: var(--role-editor-bg); 
  color: var(--role-editor-color); 
  border: 1px solid var(--role-editor-border); 
}
.role-admin { 
  background: var(--role-admin-bg); 
  color: var(--role-admin-color); 
  border: 1px solid var(--role-admin-border); 
}

/* ==========================================================================
   CONTAINER & LAYOUT
   ========================================================================== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  width: 100%;
  flex: 1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-surface);
  padding: 1.15rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
select, input[type="text"], input[type="password"], textarea {
  background: var(--input-bg);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

select {
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary { 
  background: var(--accent-blue); 
  color: #fff; 
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover { 
  background: var(--accent-blue-hover); 
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-success { 
  background: var(--accent-emerald); 
  color: #fff; 
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}
.btn-success:hover { 
  background: var(--accent-emerald-hover); 
}

.btn-danger { 
  background: rgba(225, 29, 72, 0.08); 
  color: #be123c; 
  border: 1px solid rgba(225, 29, 72, 0.22);
}
.btn-danger:hover { 
  background: var(--accent-rose); 
  color: #fff; 
}

.btn-secondary { 
  background: var(--bg-surface); 
  color: var(--text-main); 
  border: 1px solid var(--border-medium); 
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { 
  background: var(--bg-inset); 
  border-color: var(--text-dim);
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  will-change: transform;
  animation: antigravityFloatIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--card-index, 0) * 40ms);
}

.event-card:hover {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  transform: translateY(-4px);
}

[data-theme="dark"] .event-card:hover {
  border-color: rgba(59, 130, 246, 0.55);
  background: #141f35;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.score-badge {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  min-width: 44px;
  text-align: center;
}

.score-high { 
  background: var(--score-high-bg); 
  color: var(--score-high-color); 
  border: 1px solid var(--score-high-border); 
}
.score-mid { 
  background: var(--score-mid-bg); 
  color: var(--score-mid-color); 
  border: 1px solid var(--score-mid-border); 
}
.score-low { 
  background: var(--score-low-bg); 
  color: var(--score-low-color); 
  border: 1px solid var(--score-low-border); 
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.45;
  display: block;
}

.card-title:hover {
  color: var(--accent-blue);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* The whole first paragraph (300–450 chars) is shown, so the editor can read the story in the feed */
.card-snippet {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.85rem 0 1rem 0;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   SPLIT-SCREEN STUDIO & PANELS
   ========================================================================== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 5.5rem;
}

@media (max-width: 1080px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

.column-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-warning {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.22);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.4;
}

[data-theme="dark"] .badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-inset);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

.tab-btn.active {
  color: var(--text-main);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

/* Extracted Fact Pills */
.fact-pill {
  background: var(--fact-pill-bg);
  border: 1px solid var(--fact-pill-border);
  color: var(--fact-pill-color);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: all 0.15s ease;
}

.fact-pill:hover {
  border-color: var(--accent-blue);
  filter: brightness(0.96);
}

/* WebLetter Reading Container */
.webletter-container {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  line-height: 1.7;
}

.webletter-container h1, .webletter-container h2, .webletter-container h3 {
  color: var(--text-main);
}

.webletter-container a {
  color: var(--accent-blue);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--table-header-bg);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.875rem;
}

/* Modal Backdrops & Overlays */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Selectable Articles in Split-Screen Studio */
.selectable-article-card {
  transition: all 0.2s ease;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  position: relative;
}

.selectable-article-card:hover {
  border-color: var(--accent-blue);
  background-color: var(--bg-inset) !important;
}

.selectable-article-card.selected-source-card {
  border-color: var(--accent-emerald) !important;
  background-color: var(--score-high-bg) !important;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

/* Metadata Intelligence Pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  background: var(--role-reader-bg);
  border: 1px solid var(--role-reader-border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.tag-pill:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.entity-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.entity-pill:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-1px);
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--score-high-color);
  background: var(--score-high-bg);
  border: 1px solid var(--score-high-border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.metric-pill:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
}


/* Toast Notification */
.dfi-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 999;
  animation: toastIn 0.25s ease-out, toastOut 0.3s ease-in 2.7s forwards;
}

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

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

/* Antigravity Motion: Staggered Entrance */
@keyframes antigravityFloatIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Glassmorphic Sticky Action Dock */
.sticky-action-dock {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 0.55rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 90;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 95vw;
}

[data-theme="dark"] .sticky-action-dock {
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: var(--border-subtle);
}

@media (max-width: 768px) {
  .sticky-action-dock {
    width: calc(100% - 1.5rem);
    bottom: 0.65rem;
    padding: 0.4rem 0.65rem;
    gap: 0.4rem;
    justify-content: space-around;
  }
  .sticky-action-dock .dock-divider { display: none; }
  .sticky-action-dock kbd { display: none; }
}

/* Live Editorial Quality Checklist */
.live-editorial-checklist {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.85rem;
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-dim);
}

.checklist-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  color: var(--text-muted);
}

.checklist-badge.is-ok {
  color: var(--accent-emerald);
  font-weight: 600;
}

.checklist-badge.is-warn {
  color: var(--accent-amber);
}

/* Print Media Styles */
@media print {
  .navbar, .toolbar, .btn, footer, .sticky-action-dock, .theme-toggle-btn {
    display: none !important;
  }
  body, .container, .webletter-container {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* A story taken into the edition from the feed («В выпуск» without leaving the feed) */
.event-card.event-card-verified {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px var(--accent-emerald) inset;
}
