/* AllScience — Global Styles */
:root {
  --color-bg: #0a0e17;
  --color-bg-secondary: #111827;
  --color-bg-card: #1a2233;
  --color-bg-hover: #1f2d42;
  --color-border: #2a3a52;
  --color-text: #e2e8f0;
  --color-text-muted: #8896ab;
  --color-text-dim: #5a6a80;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-glow: rgba(59, 130, 246, 0.15);
  --color-accent: #06d6a0;
  --color-accent-hover: #05b888;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-success: #10b981;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --transition: 0.2s ease;

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-navbar: 500;
  --z-drawer: 900;
  --z-toast: 1000;
  --z-sidebar: 1100;
  --z-overlay: 9000;
  --z-modal: 9001;
  --z-popover: 9500;
  --z-tooltip: 10000;
  --z-max: 10001;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

code, pre { font-family: var(--font-mono); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.btn-accent {
  background: var(--color-accent);
  color: #000;
}
.btn-accent:hover {
  background: var(--color-accent-hover);
  color: #000;
}

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1.0625rem; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.navbar-brand:hover { color: var(--color-text); }

.navbar-brand svg { width: 32px; height: 32px; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.navbar-links a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.navbar-links a:hover { color: var(--color-text); }

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.75rem;
  list-style: none;
}

.footer-links a { color: var(--color-text-muted); }
.footer-links a:hover { color: var(--color-text); }

/* Report Bug Link */
.report-bug-link {
  color: var(--color-text-dim);
  font-size: 0.8125rem;
  transition: color var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.report-bug-link:hover { color: var(--color-warning); }
.report-bug-link .bug-icon { font-size: 0.9rem; }
.report-bug-fixed {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: var(--z-drawer);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

/* Scroll Animations — fade-in starts visible, JS adds .will-animate to enable animation */
.fade-in { opacity: 1; transform: translateY(0); }
.fade-in.will-animate { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* Toast Notifications */
.toast-container { position: fixed; top: 72px; right: 1.5rem; z-index: var(--z-sticky); display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: 0.875rem; pointer-events: auto; animation: toastIn 0.3s ease, toastOut 0.3s ease 4.7s forwards; max-width: 360px; }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
.toast.warning { border-left: 3px solid var(--color-warning, #f59e0b); }
.toast.info { border-left: 3px solid var(--color-primary, #3b82f6); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Global Loading Bar */
.global-loading-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: var(--z-popover); pointer-events: none; opacity: 0;
  transition: opacity 0.2s ease;
}
.global-loading-bar.loading-active { opacity: 1; }
.global-loading-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--color-primary, #3b82f6), var(--color-accent, #06d6a0));
  border-radius: 0 2px 2px 0;
  transition: width 0.1s ease;
}
.global-loading-bar.loading-active .global-loading-bar-fill {
  animation: loadingBarProgress 2s ease infinite;
}
@keyframes loadingBarProgress {
  0% { width: 0; }
  20% { width: 25%; }
  50% { width: 65%; }
  80% { width: 85%; }
  100% { width: 95%; }
}

/* Skeleton Loading */
.skeleton { background: linear-gradient(90deg, var(--color-bg-card) 25%, var(--color-bg-hover) 50%, var(--color-bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-btn { height: 36px; width: 100px; border-radius: var(--radius-sm); }
.skeleton-line { height: 12px; margin-bottom: 6px; }
.skeleton-line:last-child { width: 70%; }
.skeleton-activity-feed { padding: 1rem; }
.skeleton-projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding: 1rem 0; }

/* Mobile Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Keyboard Navigation ─────────────────────────────────────────────── */

/* Body class applied when Tab key is pressed — makes focus rings more prominent globally */
.keyboard-nav-active *:focus-visible {
  outline-width: 3px;
  outline-style: solid;
  outline-color: var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--color-primary-glow);
}

/* Navbar link focus */
.navbar-links a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  background: var(--color-primary-glow);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

/* Button focus-visible — stronger ring with per-type glow */
.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35), 0 0 12px rgba(59, 130, 246, 0.2);
}

.btn-accent:focus-visible {
  outline-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(6, 214, 160, 0.35), 0 0 12px rgba(6, 214, 160, 0.2);
}

.btn-secondary:focus-visible {
  box-shadow: 0 0 0 4px rgba(136, 150, 171, 0.25), 0 0 12px rgba(136, 150, 171, 0.1);
}

/* Card components — focus-within for keyboard navigation inside cards */
.pub-card:focus-within,
.collection-card:focus-within {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--color-primary-glow);
  transform: translateY(-1px);
}

/* Form inputs — colored border + ring */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* Hamburger focus */
.hamburger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Tab/tablist ARIA roles — roving tabindex support */
[role="tablist"] {
  position: relative;
}

[role="tab"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-primary-glow);
  border-radius: var(--radius-sm);
  z-index: 1;
}

[role="tab"][aria-selected="true"]:focus-visible {
  outline-offset: -2px;
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

/* Nav drawer links — left border highlight matching active style */
.nav-drawer-links a:focus-visible,
.nav-drawer-links button:focus-visible {
  outline: none;
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-primary);
  border-left: 3px solid var(--color-primary);
}

/* Focus ring inset utility — for elements where outset rings look bad */
.focus-ring-inset:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-primary), inset 0 0 0 4px var(--color-primary-glow);
}

/* Theme toggle focus */
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}

/* Nav drawer close button */
.nav-drawer-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Footer links */
.footer-links a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Focus & Disabled */
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Dark theme — brighter blue focus rings */
:root {
  --color-focus-ring: #60a5fa;
  --color-focus-glow: rgba(96, 165, 250, 0.25);
}

/* Light Theme */
[data-theme="light"] {
  --color-bg: #f8fafc;
  --color-bg-secondary: #f1f5f9;
  --color-bg-card: #ffffff;
  --color-bg-hover: #e2e8f0;
  --color-border: #cbd5e1;
  --color-text: #1e293b;
  --color-text-muted: #475569;
  --color-text-dim: #64748b;
  --color-heading: #0f172a;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-glow: rgba(37, 99, 235, 0.1);
  --color-accent: #059669;
  --color-accent-hover: #047857;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-success: #059669;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .toast {
  background: #fff;
  border-color: #e2e8f0;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1rem;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Smooth theme transition support — applied to key elements */
[data-theme] .navbar,
[data-theme] .btn,
[data-theme] .toast,
[data-theme] .pub-card,
[data-theme] .footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mobile Navigation Drawer */
.nav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-drawer-overlay.visible { opacity: 1; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--color-bg-secondary, #111827);
  border-left: 1px solid var(--color-border, #2a3a52);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border, #2a3a52);
}
.nav-drawer-header .navbar-brand { font-size: 1.125rem; }
.nav-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted, #8896ab); font-size: 1.25rem;
  padding: 0.25rem; line-height: 1; transition: color 0.15s;
}
.nav-drawer-close:hover { color: var(--color-text, #e2e8f0); }

.nav-drawer-links {
  list-style: none; padding: 0.75rem 0; flex: 1;
}
.nav-drawer-links li { margin: 0; }
.nav-drawer-links a,
.nav-drawer-links button {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem; width: 100%;
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted, #8896ab);
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
  font-family: var(--font-sans);
}
.nav-drawer-links a:hover,
.nav-drawer-links button:hover {
  background: rgba(59, 130, 246, 0.06);
  color: var(--color-text, #e2e8f0);
}
.nav-drawer-links a.active {
  color: var(--color-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
  border-right: 3px solid var(--color-primary, #3b82f6);
}

.nav-drawer-divider {
  height: 1px;
  background: var(--color-border, #2a3a52);
  margin: 0.5rem 1.25rem;
}

.nav-drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border, #2a3a52);
  display: flex; gap: 0.5rem; align-items: center;
}

/* ── Form Inputs (global) ────────────────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-text-dim); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}
.form-input-sm,
.form-select-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--color-text-muted); }
.form-label-sm { font-size: 0.75rem; }

/* ── Card hover & interactive polish ─────────────────────────────────── */
.tool-card,
.audience-card,
.pricing-card,
.pub-card,
.collection-card {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.tool-card:hover,
.audience-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

/* Button active state */
.btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* ── Responsive — Tablet ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  .navbar-links { gap: 0.75rem; }
  .navbar-links a { font-size: 0.85rem; }
  .hamburger { display: flex; }
  .navbar-links { display: none; }
  .navbar-links.open { display: none; }
  .topbar-nav a { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
  .topbar-right { gap: 0.4rem; font-size: 0.8rem; }
  .topbar-right .btn { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
}

/* ── Responsive — Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.125rem; }
  .container { padding: 0 1rem; }
  .topbar-nav { display: none; }
  .footer-links { flex-wrap: wrap; gap: 1rem; }

  /* Touch-friendly tap targets */
  .btn { min-height: 44px; min-width: 44px; }
  .form-input,
  .form-select,
  .form-textarea { min-height: 44px; font-size: 1rem; }

  /* Table scroll wrapper */
  .table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Responsive — Small Mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem; }
  .container { padding: 0 0.75rem; }
  .btn-lg { width: 100%; justify-content: center; }
}

[data-theme="light"] .nav-drawer {
  background: #ffffff;
  border-left-color: #e2e8f0;
}
[data-theme="light"] .nav-drawer-overlay { background: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .nav-drawer-header { border-bottom-color: #e2e8f0; }
[data-theme="light"] .nav-drawer-footer { border-top-color: #e2e8f0; }
[data-theme="light"] .nav-drawer-divider { background: #e2e8f0; }

/* Light theme focus ring overrides — standard blue */
[data-theme="light"] {
  --color-focus-ring: #2563eb;
  --color-focus-glow: rgba(37, 99, 235, 0.2);
}

[data-theme="light"] .keyboard-nav-active *:focus-visible {
  outline-color: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .btn-primary:focus-visible {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3), 0 0 12px rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .btn-accent:focus-visible {
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.3), 0 0 12px rgba(5, 150, 105, 0.15);
}

[data-theme="light"] .btn-secondary:focus-visible {
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.2), 0 0 12px rgba(100, 116, 139, 0.1);
}

/* ── Split Editor ─────────────────────────────────────────────────── */

.split-editor {
  display: flex;
  height: 100%;
  min-height: 0;
}

.split-pane {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  min-width: 0;
}

.split-pane-left {
  display: flex;
  flex-direction: column;
}

.split-pane-right {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-secondary);
  border-left: 1px solid var(--color-border);
}

.split-divider {
  width: 6px;
  flex-shrink: 0;
  background: var(--color-border);
  cursor: col-resize;
  transition: background 0.15s ease;
  position: relative;
}

.split-divider:hover {
  background: var(--color-primary);
}

.split-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 32px;
  border-radius: 1px;
  background: var(--color-text-dim);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.split-divider:hover::after {
  opacity: 0.5;
}

.split-selector {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
  flex-shrink: 0;
}

.split-pane-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Light theme split editor */
[data-theme="light"] .split-pane-right {
  background: var(--color-bg-secondary);
}

/* Responsive: collapse split on mobile */
@media (max-width: 768px) {
  .split-editor {
    flex-direction: column;
  }
  .split-divider {
    width: 100%;
    height: 6px;
    cursor: row-resize;
  }
  .split-pane-right {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
}

/* Breadcrumb Navigation */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 12px 0;
}

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

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  margin: 0 8px;
}

/* ── Print Stylesheet ────────────────────────────────────────────────── */
@media print {
  /* Hide non-content elements */
  .navbar, .footer, .sidebar, .fab, .cookie-consent,
  .report-bug-fixed, .writing-assistant-toggle,
  .smart-suggestions, .inline-editor-sidebar,
  .toast-container, .global-loading-bar, .hamburger,
  .nav-drawer, .nav-drawer-overlay, .theme-toggle,
  .notif-bell-wrap, .skip-to-content { display: none !important; }

  /* Reset colors for printing */
  body { background: white !important; color: black !important; }

  /* Optimize text */
  body { font-size: 12pt; line-height: 1.5; }
  h1 { font-size: 18pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 14pt; }

  /* Show URLs after links */
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }

  /* Page breaks */
  h1, h2, h3 { page-break-after: avoid; }
  table, figure, img { page-break-inside: avoid; }

  /* Remove backgrounds and shadows */
  .tool-card, .pricing-card, .pub-card, .collection-card, .audience-card {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  /* Ensure content is full width */
  .container { max-width: 100%; padding: 0; }
  main { padding-top: 0 !important; }
}
