/* ParaLibrary – Compiled Stylesheet
 * Dark paranormal theme
 * ========================================================================== */

/* ── Base / Layout ──────────────────────────────────────────────────────── */
.pl-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: #d4d0c8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: transparent;
}

.pl-doc-header {
  margin-bottom: 1.5rem; /* Harmonized layout */
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 1.5rem;
}

.pl-breadcrumbs {
  font-size: .8rem;
  color: #888880;
  margin-bottom: .75rem;
}
.pl-breadcrumb-current {
  font-weight: 700 !important;
  color: #b22222 !important; /* Explicitly red to match theme */
}
.pl-breadcrumbs a {
  color: #d4d0c8;
  text-decoration: none;
}
.pl-breadcrumbs a:hover {
  color: #e8e2d4;
  text-decoration: underline;
}

.pl-doc-title,
.pl-archive-title {
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #e8e2d4;
  margin: 0 0 .5rem;
  line-height: 1.2;
}

.pl-doc-meta {
  display: flex;
  gap: 1.25rem;
  font-size: .8rem;
  color: #888880;
}

.pl-doc-content h2,
.pl-doc-content h3,
.pl-doc-content h4 {
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  color: #e8e2d4;
  margin: 1.5rem 0 1rem 0 !important; /* Harmonized heading rhythm */
}

/* Standardize block and paragraph spacing to prevent "funky" uneven gaps */
.pl-doc-content > *,
.pl-doc-content p {
  line-height: 1.75;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

.pl-doc-content > *:last-child {
  margin-bottom: 0 !important;
}
.pl-doc-content a { color: #d4d0c8; }
.pl-doc-content a:hover { color: #e8e2d4; }
.pl-doc-content code {
  background: #222222;
  padding: .15em .35em;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: .9em;
}
.pl-doc-content pre {
  background: #222222;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.pl-doc-content blockquote {
  border-left: 3px solid #8b1a1a;
  margin: 1.5rem 0;
  padding: .5rem 1.25rem;
  color: #888880;
  font-style: italic;
}
.pl-doc-content img { max-width: 100%; height: auto; }

/* ── Search Bar Redesign ── */
.pl-search-card {
  background: #151515 !important;
  border-radius: 12px;
  padding: 0.8rem 1.5rem 1.5rem 1.5rem !important; /* Calibrated for visual alignment */
  margin: 0.5rem 0 1.5rem 0 !important;
  text-align: center;
  border: 1px solid #222222 !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
}

.pl-search-card.pl-no-title {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.pl-kb-title {
  font-family: inherit;
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  margin: 0 0 2rem 0 !important;
  color: #ffffff !important;
  letter-spacing: -1px;
}

.pl-search-title {
  font-family: inherit;
  font-size: 1.8rem !important;
  color: #ffffff !important;
  margin: 0 0 1.25rem 0 !important; /* Forced zero top margin */
  font-weight: 700 !important;
  letter-spacing: -0.5px;
}

.pl-kb-latest-wrap {
  margin-top: 1.5rem !important;
  margin-bottom: 2rem !important;
}

.pl-search-bar {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.pl-search-inner {
  position: relative !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 0.15rem 0.5rem 0.15rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid #dddddd !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important;
}

.pl-search-btn {
  background: #b22222 !important;
  color: #ffffff !important;
  border: 1px solid #8b1a1a !important;
  border-radius: 6px !important;
  padding: 0.6rem 1.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-left: 0.75rem !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.pl-search-btn:hover {
  background: #d32f2f !important;
  border-color: #b22222 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
}

.pl-search-btn:active {
  transform: translateY(1px) !important;
}

.pl-search-icon {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #999999 !important;
  flex-shrink: 0 !important;
}

.pl-search-icon svg {
  width: 20px !important;
  height: 20px !important;
}

.pl-search-input {
  flex-grow: 1;
  border: none !important;
  background: transparent !important;
  font-size: 1.1rem !important;
  color: #333333 !important;
  padding: 0.35rem 1rem !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100% !important;
}

.pl-search-input::placeholder {
  color: #888888 !important;
}

.pl-search-input:focus {
  background: transparent !important;
  border: none !important;
}

.pl-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid #444444;
  border-radius: 10px;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 15px 40px rgba(0,0,0,.7);
  text-align: left !important; /* Fix centering from card */
  animation: plFadeInDown 0.2s ease-out;
}

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

.pl-search-result-item {
  border-bottom: 1px solid #2a2a2a;
}
.pl-search-result-item:last-child { border-bottom: none; }

.pl-search-result-link {
  position: relative;
  display: block;
  padding: 1rem 4.5rem 1rem 1.25rem;
  text-decoration: none;
  color: #d4d0c8;
  transition: all 0.2s ease;
}
.pl-search-result-link:hover,
.pl-search-result-link:focus {
  background: rgba(178, 34, 34, 0.15);
  color: #ffffff;
}
.pl-search-result-link:hover .pl-result-type-badge {
  opacity: 1;
}

.pl-result-type-badge {
  position: absolute;
  top: 1.6rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #eeeeee;
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.8;
  transition: all 0.2s ease;
  line-height: 1;
}

.pl-type-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
  color: #f44336;
  stroke: currentColor;
  fill: none;
}
.pl-result-type-badge span {
  display: block;
}

.pl-result-title {
  display: block;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: .25rem;
  font-size: 1.05rem;
}

.pl-result-excerpt {
  display: block;
  font-size: .85rem;
  color: #aaaaaa;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pl-search-no-results {
  padding: 1.25rem;
  color: #888880;
  font-size: .95rem;
  font-style: italic;
  text-align: center;
}

/* ── Sidebar Menu Redesign ── */
/* Harmonize all sidebar widgets (core and custom) to use the same visually dense spacing and professional border */
.pl-sidebar .widget,
.pl-sidebar-widget {
  background: #111111 !important;
  border: 1px solid #666666 !important; /* Level 2 Brightness: visible but not harsh */
  border-radius: 12px !important;
  padding: 1.5rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
  color: #d4d0c8 !important;
  display: block !important;
  margin: 0 0 1.5rem 0 !important; /* Increased to 1.5rem for better separation */
  width: auto !important;
  max-width: 100% !important;
}

/* Reset any theme/core top margins that might shrink the gap */
.pl-sidebar .widget,
.pl-sidebar-widget,
.pl-sidebar .widget > :first-child,
.pl-sidebar-widget > :first-child {
  margin-top: 0 !important;
}

/* Ensure vertical symmetry by removing extra margin from the last internal item */
.pl-sidebar .widget > :last-child,
.pl-sidebar-widget > :last-child,
.pl-sidebar-widget > *:last-child {
  margin-bottom: 0 !important;
}

.pl-sidebar-widget .pl-sidebar-tree {
  width: 100% !important;
}

.pl-sidebar-item {
  width: 100% !important;
}

.pl-sidebar-link {
  width: 100% !important;
}


/* Completely hide empty sidebar widgets (e.g. empty library card) */
.pl-sidebar-widget:empty,
.pl-sidebar-widget:not(:has(*)) {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* Eliminate double outlines when components are used inside widgets */
.pl-sidebar-widget .pl-sidebar-tree,
.pl-sidebar-widget .pl-search-card,
.pl-sidebar-widget .pl-key-facts-card,
.pl-sidebar-widget .pl-library-card,
.pl-sidebar-widget .pl-library-card-container,
.pl-sidebar-widget .pl-social-share-card,
.pl-sidebar-widget .pl-feedback {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pl-sidebar-widget .pl-social-share {
  flex-wrap: wrap !important;
  justify-content: center !important;
  margin: 0 !important; /* Resetting internal margin now that outer gaps are balanced */
}

.pl-sidebar-widget .pl-share-btn {
  margin-right: 0.35rem !important;
  min-width: 40px !important;
}


.pl-sidebar-widget a {
  color: #d4d0c8 !important;
  text-decoration: none !important;
}

.pl-sidebar-widget a:hover {
  color: #ffffff !important;
}

.pl-sidebar-widget .widget-title {
  color: #ffffff !important;
}

.pl-sidebar-heading {
  font-family: inherit;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #cc3333; /* Brighter red underline */
  display: inline-block;
}

.pl-sidebar-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pl-sidebar-item {
  margin-bottom: 0.5rem;
}

.pl-sidebar-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pl-sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  color: #d4d0c8 !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  padding: 0.4rem 0 !important;
  transition: color 0.2s ease !important;
  flex-grow: 1;
}

.pl-sidebar-link svg {
  color: #888888;
  transition: color 0.2s ease;
}

.pl-sidebar-link:hover,
.pl-sidebar-link[aria-current="page"] {
  color: #ffffff !important;
}

.pl-sidebar-link:hover svg,
.pl-sidebar-link[aria-current="page"] svg {
  color: #b22222;
}

.pl-sidebar-badge {
  background: #222222;
  color: #888888;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.pl-sidebar-children {
  list-style: none !important;
  margin: 0 0 0.5rem 1.75rem !important;
  padding: 0 !important;
  border-left: 1px solid #222222;
  display: none;
}

.is-expanded > .pl-sidebar-children {
  display: block;
}

.pl-sidebar-docs {
  list-style: none !important;
  margin: 0.25rem 0 1rem 1.75rem !important;
  padding: 0 !important;
  border-left: 1px solid #b22222;
  display: none;
}

.is-expanded > .pl-sidebar-docs {
  display: block;
}

.pl-sidebar-docs li {
  padding: 0.35rem 0 0.35rem 1rem;
}

.pl-sidebar-docs a {
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  color: #888888 !important;
  text-decoration: none !important;
  font-size: 0.85rem !important;
  transition: color 0.2s ease !important;
}

.pl-sidebar-docs li.is-active a,
.pl-sidebar-docs a:hover {
  color: #ffffff !important;
}

.pl-sidebar-docs a svg {
  opacity: 0.5;
  width: 14px;
  height: 14px;
}

.pl-sidebar-docs li.is-active a svg,
.pl-sidebar-docs a:hover svg {
  opacity: 1;
  color: #b22222;
}

/* ── Archive ────────────────────────────────────────────────────────────── */
.pl-archive-header { 
  margin-bottom: 1.5rem; /* Harmonized header rhythm */
  text-align: left; 
}
.pl-template-wrap.pl-page-with-sidebar .pl-container {
  display: flex !important;
  gap: 1.5rem !important; /* Harmonized horizontal gutter */
  margin: 1.5rem auto !important;
}
.pl-template-wrap.pl-hijacked-wrap {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}
.pl-template-wrap.pl-hijacked-wrap .pl-main-content {
  flex: none !important;
  width: 100% !important;
}
.pl-main-content {
  flex: 1 !important;
  min-width: 0 !important;
}
.pl-sidebar {
  width: 300px !important;
  flex-shrink: 0 !important;
}
@media (max-width: 768px) {
  .pl-template-wrap.pl-page-with-sidebar .pl-container {
    flex-direction: column !important;
  }
  .pl-sidebar {
    width: 100% !important;
  }
}
.pl-archive-desc { 
  color: #888880; 
  font-size: .95rem; 
  margin-bottom: 1.5rem;
}

.pl-category-grid {
  display: grid;
  gap: 1.5rem; /* Harmonized category grid gap */
  margin: 1.5rem 0;
}
.pl-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.pl-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.pl-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 768px) {
  .pl-cols-3,
  .pl-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pl-category-grid { grid-template-columns: 1fr; }
}

.pl-category-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.25rem 1.5rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  text-decoration: none;
  color: #d4d0c8;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.pl-category-card:hover {
  background: #222222;
  border-color: #555555;
  transform: translateY(-2px);
}

.pl-category-name {
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  font-size: 1.1rem;
  color: #e8e2d4;
  font-weight: 600;
}
.pl-category-count { font-size: .8rem; color: #888880; }

.pl-archive-controls {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.pl-view-btn {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 4px;
  color: #888880;
  cursor: pointer;
  font-size: 1.1rem;
  padding: .3rem .65rem;
  transition: all 150ms ease;
}
.pl-view-btn:hover         { color: #d4d0c8; border-color: #555555; }
.pl-view-btn.is-active     { color: #e8e2d4; border-color: #b22222; }

.pl-docs-grid {
  display: grid;
  gap: 1.5rem;
}
.pl-docs-grid.pl-view-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.pl-docs-grid.pl-view-list {
  grid-template-columns: 1fr;
}
.pl-docs-grid.pl-view-list .pl-doc-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.pl-docs-grid.pl-view-list .pl-card-thumb { flex: 0 0 120px; }
.pl-docs-grid.pl-view-list .pl-card-thumb img {
  width: 120px; height: 80px; object-fit: cover;
}

.pl-doc-card {
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 12px !important;
  padding: 1.25rem 1.5rem !important;
  transition: all 0.2s ease !important;
}
.pl-doc-card:hover {
  background: #222222 !important;
  border-color: #444444 !important;
  transform: translateY(-2px);
}
.pl-doc-card .pl-card-title {
  margin: 0 !important;
}
.pl-doc-card .pl-card-title a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
.pl-doc-card .pl-card-icon {
  color: #b22222 !important;
  display: flex !important;
  flex-shrink: 0 !important;
}
.pl-doc-card .pl-card-excerpt {
  margin-top: 1rem !important;
  color: #888880 !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}
.pl-doc-card .pl-card-link {
  display: inline-block !important;
  margin-top: 1rem !important;
  color: #b22222 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-decoration: none !important;
}
.pl-doc-card .pl-card-link:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.pl-no-posts { color: #888880; }

.pl-pagination { margin-top: 1.5rem; }
.pl-pagination .page-numbers {
  display: inline-block;
  padding: .35rem .65rem;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 4px;
  color: #d4d0c8;
  text-decoration: none;
  margin: 0 .2rem;
}
.pl-pagination .page-numbers.current {
  background: #8b1a1a;
  border-color: #b22222;
  color: #fff;
}
.pl-pagination .page-numbers:hover:not(.current) {
  border-color: #555555;
  color: #e8e2d4;
}

/* ── Single doc – attachments / related ──────────────────────────────────── */
.pl-reading-time::before { content: "⏱ "; font-size: .85em; }

.pl-attachments,
.pl-related-docs {
  margin-top: 1.5rem; /* Harmonized sidebar-bottom rhythm */
  padding: 1.25rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.pl-attachments-title,
.pl-related-title {
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  font-size: 1.1rem;
  color: #e8e2d4;
  margin: 0 0 .75rem;
}

/* ── Content area – ensure white text on the dark theme ────────────────── */
.pl-doc-content {
  line-height: 1.8 !important;
  color: #e8e2d4 !important;
  font-size: 1.05rem !important;
  margin-top: 1.5rem !important;
}

.pl-doc-content *,
.pl-doc-content p,
.pl-doc-content span,
.pl-doc-content div,
.pl-doc-content li {
  color: #e8e2d4 !important;
}

.pl-doc-content a {
  color: #b22222 !important;
  text-decoration: underline !important;
}

.pl-doc-content a:hover {
  color: #ffffff !important;
}

.pl-doc-content h2, 
.pl-doc-content h3 {
  color: #ffffff !important;
  margin: 2rem 0 1rem !important;
}


.pl-attachments-list,
.pl-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.pl-attachment-link,
.pl-related-link {
  color: #d4d0c8;
  text-decoration: none;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.pl-attachment-link:hover,
.pl-related-link:hover { color: #e8e2d4; text-decoration: underline; }

/* ── Glossary A-Z ────────────────────────────────────────────────────────── */
.pl-az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: 1rem;
  padding: .6rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.pl-az-link {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  padding: .2rem .5rem;
  background: #222222;
  border: 1px solid #333333;
  border-radius: 4px;
  color: #d4d0c8;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: all 150ms ease;
}
.pl-az-link:hover {
  background: #2a2a2a;
  border-color: #555555;
  color: #fff;
}

.pl-az-section { margin-bottom: 1.5rem; }
.pl-az-heading {
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  font-size: 1.45rem;
  color: #b22222;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: .35rem;
  margin-bottom: .6rem;
}

.pl-az-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}

.pl-az-term { font-weight: 600; color: #e8e2d4; text-decoration: none; }
.pl-az-term:hover { color: #e8e2d4; text-decoration: underline; }

.pl-az-excerpt { margin: .25rem 0 0; font-size: .82rem; color: #888880; }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
.pl-tooltip {
  position: relative;
  border-bottom: 1px dotted #888880;
  cursor: help;
}
.pl-tooltip-link { color: inherit; text-decoration: none; }

.pl-tooltip-bubble {
  position: absolute;
  z-index: 9999;
  max-width: 280px;
  padding: .6rem .9rem;
  background: #222222;
  border: 1px solid #555555;
  border-radius: 8px;
  font-size: .82rem;
  color: #d4d0c8;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}

/* ── Feedback ─────────────────────────────────────────────────────────────── */
.pl-feedback {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  text-align: center;
}

.pl-feedback-prompt {
  font-size: 1rem;
  color: #e8e2d4;
  margin: 0 0 1rem;
}

.pl-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #222222;
  color: #d4d0c8;
  font-size: .9rem;
  cursor: pointer;
  margin: 0 .4rem;
  transition: all 150ms ease;
}
.pl-feedback-btn:hover          { border-color: #555555; color: #e8e2d4; }
.pl-feedback-btn.pl-vote-up:hover  { background: #1a3a1a; border-color: #3a7a3a; }
.pl-feedback-btn.pl-vote-down:hover { background: #5a1010; border-color: #b22222; }
.pl-feedback-btn[disabled]     { opacity: .5; cursor: not-allowed; }

.pl-feedback-thanks { font-size: .9rem; color: #888880; margin-top: 1rem; }

/* Hide compact reactions on glossary single pages to avoid duplicate widgets */
.post-type-pl_glossary .pl-doc-reactions,
.post-type-pl_glossary .pl-reactions {
  display: none !important;
}

/* ── FAQ Accordion ───────────────────────────────────────────────────────── */
.pl-faq-accordion { margin: 1.5rem 0; }

.pl-faq-item {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  margin-bottom: .75rem;
  overflow: hidden;
  background: #1a1a1a;
}

.pl-faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #e8e2d4;
  font-family: "Georgia", "Palatino Linotype", Palatino, serif;
  font-size: 1rem;
  text-align: left;
  transition: background 150ms ease;
}
.pl-faq-question:hover { background: #2a2a2a; }
.pl-faq-question[aria-expanded="true"] {
  background: #222222;
  border-bottom: 1px solid #2a2a2a;
}

.pl-faq-icon { font-size: 1.25rem; color: #b22222; line-height: 1; }

.pl-faq-answer {
  padding: 1rem 1.25rem 1.25rem;
  color: #d4d0c8;
  font-size: .95rem;
  line-height: 1.7;
}

/* ── Block editor ────────────────────────────────────────────────────────── */
.pl-search-bar-editor,
.pl-category-grid-editor,
.pl-faq-accordion-editor {
  padding: 1rem;
  border: 1px dashed #333333;
  border-radius: 8px;
  background: #1a1a1a;
}
.pl-block-note {
  margin: 0;
  font-size: .85rem;
  color: #888880;
  font-style: italic;
}

/* ── Knowledge Base tab widget ──────────────────────────────────────────── */
.pl-kb-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #2a2a2a;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pl-kb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px;
  cursor: pointer;
  padding: 1rem 1.5rem !important;
  font-family: inherit;
  font-size: 0.95rem !important;
  color: #888880 !important;
  transition: all 0.2s ease;
}

.pl-kb-tab:hover {
  color: #ffffff !important;
  outline: none; /* Removed outline from original hover */
}

.pl-kb-tab:focus-visible {
  color: #e8e2d4;
  outline: 2px solid #b22222;
  outline-offset: -2px;
}

.pl-kb-tab.is-active {
  color: #ffffff !important;
  border-bottom-color: #444444 !important;
  font-weight: 600 !important; /* Added !important */
}

/* ── Slate Layout ────────────────────────────────────────────────────────── */
/* ── Slate Layout Redesign ── */
.pl-slate-layout {
  display: grid !important;
  gap: 1.5rem !important; /* Harmonized slate grid gap */
  grid-template-columns: repeat(3, 1fr) !important;
  margin: 1.5rem 0 !important;
}

@media (max-width: 1024px) {
  .pl-slate-layout { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 600px) {
  .pl-slate-layout { grid-template-columns: 1fr !important; }
}

.pl-slate-card {
  background: #1a1a1a !important;
  border: 1.5px solid var(--pl-slate-card-border, #333333) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  transition: all 0.25s ease !important;
  overflow: visible !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.pl-slate-card:hover {
  border-color: #444444 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4) !important;
  transform: translateY(-2px);
}

.pl-slate-card-header {
  padding: 1.5rem 1.5rem 0.75rem 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  position: relative !important;
}

.pl-slate-card-icon {
  color: #b22222 !important;
  display: flex !important;
  flex-shrink: 0 !important;
}

.pl-slate-card-icon svg {
  width: 20px !important;
  height: 20px !important;
}

.pl-slate-card-title {
  flex-grow: 1 !important;
  margin: 0 !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
}

.pl-slate-card-title a {
  color: #ffffff !important;
  text-decoration: none !important;
}

.pl-slate-badge {
  background: var(--pl-slate-badge-bg, #b22222) !important;
  color: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
}

.pl-slate-card-body {
  padding: 0 1.5rem 0.5rem 1.5rem !important;
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Horizontal line separator */
.pl-slate-card-body::before {
  content: "";
  display: block;
  height: 1px;
  background: #333333 !important;
  margin-bottom: 1rem !important;
  width: 100% !important;
}

.pl-slate-doc-list {
  list-style: none !important;
  margin: 0 0 0.75rem 0 !important;
  padding: 0 !important;
}

.pl-slate-doc-item {
  margin-bottom: 0.75rem !important;
}

.pl-slate-doc-item:last-child {
  margin-bottom: 0 !important;
}

.pl-slate-doc-item a {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  color: #eeeeee !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  transition: color 0.2s ease !important;
  line-height: 1.4 !important;
}

.pl-slate-doc-item a:hover {
  color: #ffffff !important;
}

.pl-slate-doc-icon {
  color: #888888 !important;
  display: flex !important;
  flex-shrink: 0 !important;
}

.pl-slate-doc-icon svg {
  width: 18px !important;
  height: 18px !important;
  margin-top: 4px !important;
}

.pl-slate-footer-divider {
  height: 1px !important;
  background: var(--pl-slate-divider-color, #333333) !important;
  margin: auto 1.5rem 0 1.5rem !important;
  opacity: 0.8 !important;
}

.pl-slate-view-all {
  text-align: center !important;
  color: var(--pl-slate-view-all-color, #b22222) !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  text-decoration: none !important;
  padding: 0.6rem 0 !important;
  display: block !important;
  transition: all 0.25s ease !important;
}

.pl-slate-view-all:hover {
  color: #ff3333 !important;
}

.pl-slate-empty {
  color: #555555 !important;
  font-style: italic !important;
  font-size: 0.9rem !important;
}

/* ── Single Doc Layout Redesign ────────────────────────────────────────── */
.pl-single-doc-container {
  display: grid !important;
  grid-template-columns: 1fr 340px !important;
  gap: 1.5rem !important; /* Harmonized main gutter */
  align-items: flex-start !important;
}

.pl-single-doc-container.pl-no-sidebar {
  grid-template-columns: 1fr !important;
}

.pl-single-doc-container.pl-no-sidebar .pl-doc-main-col {
  max-width: 1200px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* Definitively hide inline reactions on single document pages to prevent double voting */
.pl-single-doc .pl-reactions,
.pl-single-doc .pl-doc-reactions,
.single-pl_doc .pl-reactions,
.single-pl_doc .pl-doc-reactions {
    display: none !important;
}

@media (max-width: 950px) {
  .pl-single-doc-container {
    grid-template-columns: 1fr !important;
  }
}

.pl-doc-sidebar {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important; /* Harmonized vertical sidebar rhythm */
}

/* ── Library Card (formerly Key Facts) ── */
.pl-library-card {
  background: transparent !important; /* Managed by container to fill the entire widget area */
  border: none !important;
  border-radius: 0;
  overflow: visible;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  display: block;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: none !important;
  position: relative;
}

.pl-library-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(204, 51, 51, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure the library card fills the area by stripping default padding from its container but keeping border/shadow for consistency */
.pl-sidebar .widget:has(.pl-library-card),
.pl-sidebar .widget:has(.pl-library-card-container),
.widget:has(.pl-library-card),
.pl-sidebar-widget:has(.pl-library-card),
.widget:has(.pl-library-card-container),
.pl-sidebar-widget:has(.pl-library-card-container),
.entry-content > [class*="wp-block-paralibrary"]:has(.pl-library-card),
[class*="wp-block-paralibrary"]:has(.pl-library-card) {
  padding: 0 !important;
  margin: 0 0 1.5rem 0 !important; 
  /* Textured Background moved here to fill the entire widget area to the border */
  background: 
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0),
    radial-gradient(circle at 80% 20%, rgba(204, 51, 51, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(204, 51, 51, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 15% 25%, rgba(204, 51, 51, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 85% 45%, rgba(204, 51, 51, 0.08) 1.5px, transparent 1.5px),
    radial-gradient(circle at 45% 75%, rgba(204, 51, 51, 0.1) 1.2px, transparent 1.2px),
    radial-gradient(circle at 70% 85%, rgba(204, 51, 51, 0.06) 0.8px, transparent 0.8px),
    linear-gradient(135deg, #0f1115 0%, #16191d 100%) !important;
  background-size: 40px 40px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100% !important;
  border-radius: 12px !important;
  border: 1px solid #cc3333 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
  overflow: hidden !important;
}

.pl-library-card-container {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  display: block;
}

.pl-library-card-header {
  background: transparent !important;
  padding: 0.75rem 0.6rem 0.35rem 0.6rem !important; /* Ultra-tight top/sides per user request */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.pl-library-card-title {
  margin: 0 !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  position: relative;
  display: block !important; /* Changed to block for the gradient divider logic */
}

/* Red gradient underline (fading out) */
.pl-library-card-title::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #cc3333 0%, #cc3333 40%, transparent 100%);
  width: 60%; /* About 2 characters wider than dynamic title logic simplified */
  margin-top: 6px;
}

.pl-library-card-info-icon {
  color: #cc3333 !important;
  opacity: 0.9 !important;
  transition: all 0.3s ease;
}

.pl-library-card-info-icon:hover {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  color: #ffffff !important;
  transform: scale(1.1);
}

.pl-library-card .pl-library-card-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important; /* Changed to auto to prevent text overlapping */
}

.pl-library-card .pl-library-card-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.pl-library-card .pl-library-card-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.pl-library-card-row:last-child {
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

/* Specificity boost to ensure theme overrides */
.pl-library-card .pl-library-card-table .pl-library-card-label {
  padding: 0.6rem 0.4rem 0.6rem 0.6rem !important; /* Half-margin strategy */
  font-weight: 800 !important; 
  color: var(--pl-color-heading, #ffffff) !important; 
  width: 120px !important; 
  min-width: 120px !important;
  vertical-align: top !important;
  font-size: 0.85rem !important; 
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent !important;
}

.pl-library-card .pl-library-card-table,
.pl-library-card .pl-library-card-table tr,
.pl-library-card .pl-library-card-table td {
  background: transparent !important; /* Force transparency to show card splatter everywhere */
}

.pl-library-card .pl-library-card-table .pl-library-card-value {
  padding: 0.6rem 0.6rem 0.6rem 0.4rem !important; /* Minimal horizontal waste */
  color: var(--pl-color-text, #e8e2d4) !important; 
  vertical-align: top !important;
  line-height: 1.5 !important;
  font-size: 0.95rem !important; 
  text-align: left !important;
}

/* Allow inner tags (strong, span, etc) to override parent cell styles */
.pl-library-card-label *,
.pl-library-card-value * {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: inherit;
}

/* Paragraph reset for editor output - preserves newlines without extra spacing */
.pl-library-card-label p,
.pl-library-card-value p {
  margin: 0 0 0.4rem 0 !important;
  padding: 0 !important;
  display: block !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

.pl-library-card-label p:last-child,
.pl-library-card-value p:last-child {
  margin-bottom: 0 !important;
}

.pl-library-card-value ul,
.pl-library-card-value ol {
  margin: 0.4rem 0 0.4rem 0 !important;
  padding: 0 !important;
  list-style: none !important; /* Handled via pseudo-elements for precision */
}

.pl-library-card-value li {
  margin-bottom: 0.75rem !important;
  padding-left: 1.25rem !important;
  position: relative;
}

.pl-library-card-value ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: #cc3333;
  font-size: 10px;
}

.pl-library-card-value ol {
  list-style-type: decimal !important;
  list-style-position: inside !important;
}

/* Explicitly allow these tags to do their job */
.pl-library-card-label strong, .pl-library-card-value strong,
.pl-library-card-label b, .pl-library-card-value b {
  font-weight: 800 !important;
}

.pl-library-card-label span[style], .pl-library-card-value span[style],
.pl-library-card-label font[color], .pl-library-card-value font[color] {
  color: revert !important; /* Tells the browser to use the inline style instead of the inherited gray/white */
}

.pl-library-card-footer {
  padding: 0.75rem 0.6rem 0.6rem 0.6rem !important; /* Ultra-tight footer space */
  background: transparent !important; 
  display: flex !important;
  justify-content: flex-end !important;
  border-top: none !important; 
}

/* ── Gutenberg Block Alignment Fixes ── */

/* Ensure the 'Media & Text' block content aligns perfectly with standard paragraphs in all ParaLibrary templates */
.pl-wrap .wp-block-media-text .wp-block-media-text__content {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Ensure reversed media & text also aligns correctly */
.pl-wrap .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
  padding-right: 2rem !important; /* Keep a small gap from the image, but align left side to margin */
  padding-left: 0 !important;
}

.pl-wrap .wp-block-media-text:not(.has-media-on-the-right) .wp-block-media-text__content {
  padding-left: 2rem !important; /* Keep gap if media is on left, but align right side if needed */
  padding-right: 0 !important;
}

/* Base alignment for the whole block area */
.pl-wrap .wp-block-media-text {
  margin-bottom: 2rem !important;
}

/* ── Library Card Styles Continue ── */

.pl-suggest-edit-btn {
  background: transparent !important; /* Removed 'black box' background gradient */
  color: #ffffff !important;
  border: 1px solid rgba(204, 51, 51, 0.8) !important; /* Increased visibility of red border */
  box-shadow: 0 0 10px rgba(204, 51, 51, 0.2) !important; /* Subtle glow only */
  padding: 0.55rem 1.1rem !important;
  font-size: 0.75rem !important;
  font-weight: 750 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 6px !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.pl-suggest-edit-btn:hover {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2), inset 0 0 2px rgba(255, 255, 255, 0.1) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.pl-suggest-edit-btn svg {
  width: 14px !important;
  height: 14px !important;
}

/* ── Suggest Edit Modal ── */
.pl-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.8) !important;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 10000 !important;
  backdrop-filter: blur(4px) !important;
}

.pl-modal-content {
  background: #151515 !important;
  border: 1px solid #333333 !important;
  border-radius: 12px !important;
  width: 100% !important;
  max-width: 500px !important;
  padding: 2rem !important;
  position: relative !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
}

.pl-modal-close {
  position: absolute !important;
  top: 1rem !important;
  right: 1.25rem !important;
  background: none !important;
  border: none !important;
  color: #888888 !important;
  font-size: 1.5rem !important;
  cursor: pointer !important;
}

.pl-modal-title {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  color: #ffffff !important;
}

.pl-suggest-form textarea {
  width: 100% !important;
  background: #222222 !important;
  border: 1px solid #333333 !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  padding: 1rem !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  margin-bottom: 1.5rem !important;
  min-height: 150px !important;
  resize: vertical !important;
}

.pl-suggest-form textarea:focus {
  border-color: #b22222 !important;
  outline: none !important;
}

.pl-suggest-submit {
  background: #b22222 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0.85rem 2rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.pl-suggest-submit:hover {
  background: #d32f2f !important;
}

/* ── Social Share ────────────────────────────────────────────────────────── */
.pl-social-share {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.6rem !important;
  margin: 0.65rem 0 !important; /* Reduced sidebar margin */
}

.pl-social-share-label {
  display: block !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #b22222 !important;
  margin: 0 0 0.8rem 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  text-align: center !important;
  width: 100% !important;
}

.pl-social-share-buttons {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 0.55rem !important;
}

.pl-share-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: #d4d0c8 !important;
  background: transparent !important;
  border: 1px solid rgba(212, 208, 200, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: visible !important;
}

.pl-share-btn svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  margin: auto !important;
  transform-origin: center center !important;
  transform: translateY(0) scale(1) !important;
  transition: transform 0.2s ease !important;
}

.pl-share-btn {
  line-height: 0 !important;
  justify-content: center !important;
}



.pl-share-btn-text {
  margin-left: 2px !important;
}

/* ── Logo-only Variant ── */
.pl-no-labels .pl-social-share-buttons {
  gap: 0.8rem !important;
}

.pl-no-labels .pl-share-btn svg {
  width: 20px !important;
}

.pl-share-btn:hover {
  /* Keep the button from shifting vertically so icon stays visually centered */
  color: #ffffff !important;
  border-color: #555555 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.pl-share-btn:hover svg {
  transform: translateY(0) scale(1.08) !important;
}


.pl-share-x,
.pl-share-facebook,
.pl-share-bluesky,
.pl-share-mastodon,
.pl-share-email {
  background: transparent !important;
  border-color: rgba(212, 208, 200, 0.3) !important;
  color: #d4d0c8 !important;
}

.pl-share-x:hover        { background: #000000 !important; border-color: #333 !important; }
.pl-share-facebook:hover { background: #1877f2 !important; border-color: #1877f2 !important; }
.pl-share-bluesky:hover  { background: #0285ff !important; border-color: #0285ff !important; }
.pl-share-mastodon:hover { background: #6364ff !important; border-color: #6364ff !important; }

.pl-share-x:hover        { background: #000000 !important; border-color: #333 !important; }
.pl-share-facebook:hover { background: #1877f2 !important; border-color: #1877f2 !important; }
.pl-share-bluesky:hover  { background: #0285ff !important; border-color: #0285ff !important; }
.pl-share-mastodon:hover { background: #6364ff !important; border-color: #6364ff !important; }

/* Precise visual nudge: center Bluesky butterfly inside its circular button.
   Small fractional offsets are used to compensate for the SVG path's internal bounds. */
.pl-share-bluesky svg {
  /* Nudge the whole svg a bit so the internal path visually centers */
  transform: translate(0.5px, -1.2px) scale(1) !important;
  transform-origin: center center !important;
}
.pl-share-bluesky:hover svg {
  /* Preserve the nudge when hovered while allowing the hover scale */
  transform: translate(0.5px, -1.2px) scale(1.08) !important;
  transform-origin: center center !important;
}
.pl-share-bluesky svg path {
  transform-box: fill-box !important;
  transform-origin: center center !important;
}

/* ── Docs Tags ───────────────────────────────────────────────────────────── */
.pl-docs-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  margin: 0.65rem 0 !important; /* Reduced sidebar margin */
  align-items: center !important;
}

.pl-docs-tags-label {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #888880 !important;
  margin-right: 0.5rem !important;
}

.pl-docs-tag {
  display: inline-block !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border-radius: 20px !important;
  background: #222222 !important;
  border: 1px solid #333333 !important;
  color: #d4d0c8 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.pl-docs-tag:hover {
  border-color: #b22222 !important;
  color: #ffffff !important;
  background: #1a1a1a !important;
}

/* ── Animation and Misc ──────────────────────────────────────────────────── */
@keyframes pl-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Print Button ── */
.pl-print-wrapper {
  margin: 1.5rem 0 !important;
}

.pl-print-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  padding: 0.6rem 1.25rem !important;
  background: #222222 !important;
  border: 1px solid #333333 !important;
  border-radius: 6px !important;
  color: #d4d0c8 !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.pl-print-btn:hover {
  background: #2a2a2a !important;
  border-color: #b22222 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.pl-print-icon {
  font-size: 1.1rem !important;
}

@media print {
  .pl-print-wrapper,
  .pl-search-card,
  .pl-sidebar-widget,
  .pl-kb-tabs,
  .pl-feedback,
  .pl-reactions,
  .pl-doc-navigation,
  .pl-social-share,
  .pl-suggest-edit-btn,
  .pl-modal-overlay {
    display: none !important;
  }
  
  .pl-wrap {
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* ── Sidebar Widget Padding Normalization ── */
.pl-doc-sidebar .widget {
  padding: 1.5rem !important; /* Synchronized with forensic standard */
}

.pl-doc-sidebar .pl-social-share,
.pl-doc-sidebar .pl-docs-tags {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ── Recent Updates (Scroller & Static) ──────────────────────────────────── */

.pl-latest-section-header {
  text-align: center !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: rgba(255, 255, 255, 0.35) !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase !important;
  margin: 1.5rem 0 0.75rem 0 !important;
  display: block !important;
}

.pl-latest-scroller-container,
.pl-latest-static-container {
  margin: 0 0 2rem 0 !important;
  background: rgba(20, 20, 20, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-left: 3px solid #cc3333 !important;
  border-right: 3px solid #cc3333 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.pl-latest-scroller-label,
.pl-latest-static-header {
  background: rgba(204, 51, 51, 0.15) !important;
  color: #ff4444 !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  padding: 5px 14px !important;
  letter-spacing: 0.18em !important;
  display: inline-block !important;
  border-bottom-right-radius: 8px !important;
  text-transform: uppercase !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.pl-latest-scroller-wrap {
  width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 16px 0 !important;
  display: flex !important;
  align-items: center !important;
}

.pl-latest-scroller-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  height: 100% !important;
  width: max-content !important;
  animation: pl-marquee 60s linear infinite !important;
}

.pl-latest-scroller-inner:hover {
  animation-play-state: paused !important;
}

.pl-latest-scroller-item {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  padding: 0 2.5rem !important;
  color: #e8e2d4 !important;
  text-decoration: none !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: normal !important;
  height: 100% !important;
  transition: all 0.2s ease !important;
}

.pl-latest-scroller-item:hover {
  color: #ffffff !important;
  transform: scale(1.02);
}

.pl-latest-scroller-item .pl-bullet {
  color: #cc3333 !important;
  font-size: 1.2rem !important;
  margin-right: 12px !important;
  line-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.pl-latest-type {
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  margin-right: 8px !important;
  letter-spacing: 0.08em !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Static List Styling */
.pl-latest-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0.5rem 1.25rem 1rem !important;
}

.pl-latest-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 0.85rem 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.pl-latest-item:last-child {
  border-bottom: none !important;
}

.pl-latest-item .pl-bullet {
  color: #cc3333 !important;
  font-size: 1.3rem !important;
  line-height: 1.1 !important;
  flex-shrink: 0 !important;
  margin-top: 1px;
}

.pl-latest-title {
  display: inline-block !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  margin-bottom: 4px !important;
  transition: all 0.2s ease !important;
}

.pl-latest-title:hover {
  color: #ff4444 !important;
  text-shadow: 0 0 10px rgba(204, 51, 51, 0.4);
}

.pl-latest-badge {
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  margin-right: 10px !important;
  vertical-align: middle !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em;
}

.pl-latest-summary {
  margin: 0 !important;
  font-size: 0.86rem !important;
  color: #aba492 !important;
  line-height: 1.6 !important;
  opacity: 0.85;
}

@keyframes pl-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

