/* ========================================
   Nova România - Common Styles
   Shared across all pages for consistent layout
======================================== */

:root {
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --header-height: 70px;

  --primary: #1e293b;
  --secondary: #3b82f6;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;

  --bg-main: #f0f2f5;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Dark mode variables */
html.dark {
  --bg-main: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-card: #1e293b;
  --bg-hover: #334155;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-light: #334155;
  --border-medium: #475569;

  --primary: #f1f5f9;

  scrollbar-color: #52627a var(--bg-main);
}

html.dark::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html.dark::-webkit-scrollbar-track {
  background: var(--bg-main);
}

html.dark::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-main);
  border-radius: 999px;
  background: #52627a;
}

html.dark::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

html.dark::-webkit-scrollbar-corner {
  background: var(--bg-main);
}

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

/* Always show scrollbar to prevent layout shift */
html {
  overflow-y: scroll;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   LAYOUT STRUCTURE
======================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body {
  display: flex;
  flex: 1;
  padding-top: var(--header-height);
}

/* ========================================
   TOP HEADER - Full Width
======================================== */
.top-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-center {
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Header Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.otv-brand-mark {
  width: 32px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  padding-right: 5px;
  background: linear-gradient(
    to right,
    #5483e0 0%,
    #5483e0 33.33%,
    #fcd116 33.33%,
    #fcd116 66.66%,
    #ef5f6f 66.66%,
    #ef5f6f 100%
  );
  clip-path: path("M 3 2 Q 1 1 1 4 L 1 30 Q 1 33 4 31.5 L 29.5 18 Q 32 17 29.5 15.5 L 4 2.2 Q 3.5 2 3 2 Z");
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}

.otv-brand-word {
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.5rem;
}

/* Search */
.search-container {
  position: relative;
  width: 480px;
  max-width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.625rem 3.5rem 0.625rem 2.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-shortcut {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.125rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.search-clear {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: var(--bg-hover);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.search-clear:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

/* Show clear button and hide shortcut when focused */
.search-container:focus-within .search-shortcut {
  opacity: 0;
  pointer-events: none;
}

.search-container:focus-within .search-clear {
  display: flex;
}

/* Header Buttons */
.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--bg-card) 94%, black);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

html.dark #dark-mode-toggle .fa-sun {
  color: var(--accent);
}

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* ========================================
   SIDEBAR
======================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

/* Keep the navigation scrollbar visually inside the sidebar in dark mode. */
html.dark .sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: #52627a var(--bg-sidebar);
}

html.dark .sidebar-nav::-webkit-scrollbar {
  width: 10px;
}

html.dark .sidebar-nav::-webkit-scrollbar-track {
  background: var(--bg-sidebar);
}

html.dark .sidebar-nav::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid var(--bg-sidebar);
  border-radius: 999px;
  background: #52627a;
}

html.dark .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

html.dark .sidebar-nav::-webkit-scrollbar-corner {
  background: var(--bg-sidebar);
}

.nav-section {
  padding: 0 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

/* Divider only when a *visible* section follows. The admin section is always in
   the DOM but carries [hidden] until the member is an admin, so :last-child alone
   would leave a dangling line under the last visible section for everyone else. */
.nav-section:has(~ .nav-section:not([hidden])) {
  border-bottom: 1px solid var(--border-light);
}

.nav-section-title {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

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

.nav-item.active {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(59, 130, 246, 0.05)
  );
  color: var(--secondary);
}

/* Removed vertical line indicator */

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.nav-item.active .badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--secondary);
}

/* In dark mode the muted count sat at about 2:1 against its own pill, and the
   pill used the exact colour a row takes on hover, so it disappeared on the way
   past. A translucent fill keeps the pill visible over both backgrounds. */
html.dark .nav-item .badge {
  background: rgba(226, 232, 240, 0.12);
  color: #cbd5e1;
}

html.dark .nav-item:hover .badge {
  background: rgba(226, 232, 240, 0.2);
  color: var(--text-primary);
}

html.dark .nav-item.active .badge {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

/* Category colors */
.nav-item[data-route="reforme"] i {
  color: #6366f1;
}
.nav-item[data-route="economic"] i {
  color: #10b981;
}
.nav-item[data-route="juridic"] i {
  color: #8b5cf6;
}
.nav-item[data-route="legislativ"] i {
  color: #f59e0b;
}
.nav-item[data-route="social"] i {
  color: #f97316;
}
.nav-item[data-route="sanatate"] i {
  color: #ef4444;
}
.nav-item[data-route="energie-resurse"] i {
  color: #06b6d4;
}
.nav-item[data-route="tehnologie"] i {
  color: #3b82f6;
}
.nav-item[data-route="educatie"] i {
  color: #ec4899;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Sidebar Chat Button */
.sidebar-chat-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: var(--radius-lg);
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-chat-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-chat-btn.disabled {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.sidebar-chat-btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

.sidebar-chat-btn i {
  font-size: 1rem;
}

.sidebar-chat-btn span:not(.chat-status) {
  flex: 1;
}

.chat-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
}

.chat-status.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
  }
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.user-card:hover {
  background: var(--border-light);
}

.user-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--secondary), #6366f1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.user-menu-btn {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ========================================
   MAIN CONTENT
======================================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  padding: 0;
  /* Prevent horizontal overflow */
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: hidden;
  /* Smooth SPA transitions */
  transition: opacity 0.1s ease-out;
}

.content-area {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  /* Ensure content doesn't exceed available space */
  min-width: 0;
}

body:has(.measure-page-layout) .main-content,
body:has(.measure-page-layout) .content-area {
  overflow-x: clip;
}

body:has(.measure-page-layout) {
  overflow-x: clip;
}

/* At the end of a measure, the fixed rail continues behind the page footer.
   Keep the footer opaque and above it so rail content never crosses its bar. */
body:has(.measure-page-layout) .site-footer-simple {
  position: relative;
  z-index: 20;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 89;
  opacity: 0;
  /* Invisible still sat above the page and ate every tap on mobile. */
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
  .search-container {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    top: var(--header-height);
  }

  .main-content {
    margin-left: 0;
    max-width: 100vw;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .top-header {
    grid-template-columns: auto 1fr auto;
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .top-header .logo {
    display: none;
  }

  .header-center {
    flex: 1;
  }

  .search-container {
    width: 100%;
  }

  .search-shortcut {
    display: none;
  }

  /* Same 40px hit target; the glyph was reading as a speck in the circle. */
  .header-btn i {
    font-size: 1.2rem;
  }

  .content-area {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .content-area {
    padding: 0.75rem;
  }
}

/* ========================================
   SITE FOOTER
======================================== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 1.5rem 2rem;
  margin-top: auto;
}

.site-footer .footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer .footer-logo h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.site-footer .footer-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
}

.site-footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.site-footer .footer-links a:hover {
  color: var(--secondary);
}

@media (max-width: 768px) {
  .site-footer {
    padding: 1.25rem 1rem;
  }

  .site-footer .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   PAGE HEADER
======================================== */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.page-title-row .page-title {
  margin-bottom: 0;
}

.page-title-row .meta-badge {
  flex-shrink: 0;
}

.page-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  min-height: 1.5em;
}

/* Home Title Row with Live Badge */
.home-title-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.home-title-row .page-title {
  margin-bottom: 0;
  font-size: 2.25rem;
}

.home-header .page-description {
  padding-top: 8px;
  padding-bottom: 30px;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* Announcement Banner */
.announcement-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.announcement-badge {
  padding: 0.3rem 0.6rem;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

.announcement-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

html.dark .announcement-banner {
  background: var(--bg-card);
  border-color: var(--border-light);
}

/* Live Activity Bar */
.live-activity-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 50px;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

html.dark .live-activity-bar {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: #dc2626;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-live 1.5s infinite;
}

.activity-feed {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  overflow: hidden;
  flex: 1;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.activity-item strong {
  color: #3b82f6;
  font-weight: 600;
}

.flag-icon,
.bulb-icon {
  font-size: 1rem;
}

html.dark .live-indicator {
  background: #dc2626;
  color: #fff;
}

html.dark .live-dot-pulse {
  background: #fff;
}

@media (max-width: 900px) {
  .live-activity-bar {
    flex-direction: column;
    border-radius: var(--radius-xl);
    gap: 1rem;
    padding: 1rem;
  }

  .activity-feed {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .activity-item {
    white-space: normal;
  }
}

.live-users-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(42, 157, 143, 0.08);
  border: 1px solid rgba(42, 157, 143, 0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a9d8f;
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.25);
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.25);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.15);
  }
}

.live-count {
  font-weight: 700;
  color: #2a9d8f;
}

.live-label {
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.3px;
}

html.dark .live-users-badge {
  background: rgba(42, 157, 143, 0.15);
  border-color: rgba(42, 157, 143, 0.3);
}

html.dark .live-label {
  color: #94a3b8;
}

@media (max-width: 600px) {
  .home-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .home-title-row .page-title {
    font-size: 1.75rem;
  }

  .live-users-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
}

.page-description.fade-out {
  opacity: 0;
  transform: translateY(-5px);
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========================================
   FILTER BAR
======================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.filter-tags-wrapper {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ensure "Toate" button is always visible */
.filter-tabs > .filter-tab[data-filter="all"] {
  flex-shrink: 0;
}

.filter-tab:hover {
  background: color-mix(in srgb, var(--secondary) 30%, transparent);
  color: var(--text-primary);
  border-color: transparent;
}

.filter-tab.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Filter More Dropdown */
.filter-more-container {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.filter-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-more-btn i {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}

.filter-more-container.open .filter-more-btn i {
  transform: rotate(180deg);
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
  flex-direction: column;
  padding: 0.5rem;
}

.filter-more-container.open .filter-dropdown {
  display: flex;
}

.filter-dropdown-item {
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.filter-dropdown-item:hover {
  background: color-mix(
    in srgb,
    var(--category-color, var(--secondary)) 30%,
    transparent
  );
  color: var(--text-primary);
}

.filter-dropdown-item.active {
  background: var(--secondary);
  color: white;
}

.view-toggle {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-btn {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-btn:hover {
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--secondary);
  color: white;
}

/* ========================================
   MEASURES GRID & CARDS
======================================== */
.measures-grid {
  display: grid;
  /* Default: 3 columns on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

/* 
 * Responsive breakpoints accounting for sidebar (260px)
 * Content area = viewport - sidebar - padding (64px)
 * 
 * 3 cols need ~900px content → 1224px viewport (with sidebar)
 * 2 cols need ~600px content → 924px viewport (with sidebar)
 */

/* 2 columns when viewport < 1224px (with sidebar visible) */
@media (max-width: 1223px) {
  .measures-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column when viewport < 924px (with sidebar visible) */
@media (max-width: 923px) {
  .measures-grid {
    grid-template-columns: 1fr;
  }
}

/* On mobile (<768px) sidebar is hidden, so we can use 2 columns again */
@media (max-width: 768px) {
  .measures-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Very narrow mobile: single column */
@media (max-width: 580px) {
  .measures-grid {
    grid-template-columns: 1fr;
  }
}

.measure-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.measure-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--category-color, var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.measure-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.measure-card:hover::before {
  transform: scaleX(1);
}

/* Priority Cards - Dark UI for emphasis */
.measure-card.priority {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: none;
  color: white;
}

.measure-card.priority::before {
  height: 4px;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    var(--category-color, var(--secondary)),
    rgba(255, 255, 255, 0.3)
  );
}

.measure-card.priority:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-6px);
}

.measure-card.priority:hover::before {
  transform: scaleX(1);
}

.measure-card.priority .measure-title {
  color: white;
}

.measure-card.priority .measure-description {
  color: rgba(255, 255, 255, 0.8);
}

.measure-card.priority .card-header i {
  color: var(--category-color, #60a5fa) !important;
}

.measure-card.priority .tag {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.measure-card.priority .measure-footer {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.measure-card.priority .impact-badge-card {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.measure-card.priority .measure-arrow {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.measure-card.priority:hover .measure-arrow {
  background: white;
  color: #1e293b;
}

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

.measure-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--category-color, var(--secondary));
}

/* Category-specific colors */
.measure-category.economic {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.measure-category.juridic {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}
.measure-category.legislativ {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.measure-category.social {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}
.measure-category.sanatate {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.measure-category.energie-resurse {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}
.measure-category.tehnologie {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.measure-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.measure-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.measure-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.measure-meta {
  display: flex;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-item i {
  font-size: 0.8rem;
}

.measure-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.measure-card:hover .measure-arrow {
  background: var(--category-color, var(--secondary));
  color: white;
  transform: translateX(4px);
}

/* Card Header (icon + title) */
.measure-card .card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.measure-card .card-header i {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.measure-card .card-header .measure-title {
  margin: 0;
  position: relative;
  top: -2px;
}

/* Card Tags */
.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg-hover);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Card badges */
.card-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Impact Badge for Cards */
.impact-badge-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 28px;
  padding: 0 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.7rem;
  transition: all 0.3s ease;
}

.impact-badge-card i {
  font-size: 0.65rem;
}

.impact-badge-card.impact-moderat {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.impact-badge-card.impact-mediu {
  background: rgba(243, 156, 18, 0.15);
  color: #d68910;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.impact-badge-card.impact-major {
  background: rgba(46, 204, 113, 0.15);
  color: #1e8449;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Dark mode card styles */
html.dark .tag {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

html.dark .impact-badge-card.impact-moderat {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.4);
}

html.dark .impact-badge-card.impact-mediu {
  background: rgba(243, 156, 18, 0.2);
  color: #f5b041;
  border-color: rgba(243, 156, 18, 0.4);
}

html.dark .impact-badge-card.impact-major {
  background: rgba(46, 204, 113, 0.2);
  color: #58d68d;
  border-color: rgba(46, 204, 113, 0.4);
}

/* Dark mode for filter dropdown */
html.dark .filter-dropdown {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .filter-dropdown-item:hover {
  background: var(--bg-hover);
}

/* ========================================
   CATEGORY CARDS GRID (Homepage)
======================================== */
.category-cards-grid {
  display: grid;
  /* Default: 3 columns on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.category-cards-grid.community-areas-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.category-card.community-area-card {
  min-height: 0;
  padding: 1.15rem 1.25rem;
}

.community-area-card .category-card-header {
  margin-bottom: 0.35rem;
}

.community-area-card .category-card-description {
  margin-bottom: 0.8rem;
  flex-grow: 0;
}

.community-area-card .category-card-footer {
  padding-top: 0.7rem;
}

/* 2 columns when viewport < 1224px (with sidebar visible) */
@media (max-width: 1223px) {
  .category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column when viewport < 924px (with sidebar visible) */
@media (max-width: 923px) {
  .category-cards-grid {
    grid-template-columns: 1fr;
  }

  .category-cards-grid.community-areas-grid {
    grid-template-columns: 1fr;
  }
}

/* On mobile (<768px) sidebar is hidden, so we can use 2 columns again */
@media (max-width: 768px) {
  .category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-cards-grid.community-areas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Very narrow mobile: single column */
@media (max-width: 580px) {
  .category-cards-grid {
    grid-template-columns: 1fr;
  }

  .category-cards-grid.community-areas-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 214px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.category-card-header i {
  font-size: 1.5rem;
  width: 28px;
  text-align: center;
}

.category-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
  flex-grow: 1;
}

.category-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.category-count {
  background: var(--surface-muted, rgba(0, 0, 0, 0.06));
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
}

.category-card-footer i {
  color: var(--text-muted);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.category-card:hover .category-card-footer i {
  transform: translateX(4px);
  color: var(--secondary);
}

/* Category icon colors */
.category-card[data-category="economic"] .category-card-header i {
  color: #10b981;
}
.category-card[data-category="juridic"] .category-card-header i {
  color: #8b5cf6;
}
.category-card[data-category="legislativ"] .category-card-header i {
  color: #f59e0b;
}
.category-card[data-category="social"] .category-card-header i {
  color: #f97316;
}
.category-card[data-category="sanatate"] .category-card-header i {
  color: #ef4444;
}
.category-card[data-category="energie-resurse"] .category-card-header i {
  color: #06b6d4;
}
.category-card[data-category="tehnologie"] .category-card-header i {
  color: #3b82f6;
}

.community-area-card .category-card-header i {
  color: var(--area-color);
}

.community-area-card:hover {
  border-color: color-mix(in srgb, var(--area-color) 55%, var(--border-light));
}

.nova-live-section { margin: calc(3rem - 20px) 0 3rem; }
.nova-live-badge { color: #64748b; background: #e2e8f0; }
.nova-live-badge i { font-size: .55rem; }
.nova-live-badge.is-live { color: #dc2626; background: rgba(239,68,68,.1); }
.nova-live-badge.is-upcoming { color: #2563eb; background: rgba(59,130,246,.1); }
.nova-live-badge.is-archive { color: #7c3aed; background: rgba(139,92,246,.1); }
.nova-live-badge.is-offline { color: #b45309; background: rgba(245,158,11,.12); }
.nova-live-panel { height: auto; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); align-items: stretch; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.nova-live-player { position: relative; width: 100%; aspect-ratio: 16 / 9; height: auto; min-height: 0; display: grid; place-items: center; overflow: hidden; background: #111827; }
.nova-live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nova-live-api-play { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; display: grid; place-items: center; transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 50%; background: #ef233c; color: #fff; font-size: 1.15rem; box-shadow: 0 8px 24px rgba(15,23,42,.35); cursor: pointer; z-index: 2; transition: transform .18s ease, background .18s ease; }
.nova-live-api-play:hover { transform: translate(-50%, -50%) scale(1.06); background: #dc2626; }
.nova-live-api-play:disabled { cursor: wait; opacity: .75; }
.nova-live-api-play:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.nova-live-player.is-floating { position: fixed; right: 24px; bottom: 24px; width: min(360px, calc(100vw - 48px)); height: 239px; min-height: 0; aspect-ratio: auto; display: block; padding-top: 36px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: #0f172a; box-shadow: 0 18px 48px rgba(15,23,42,.38); z-index: 180; }
.nova-live-player.is-floating iframe { inset: 36px 0 auto; height: calc(100% - 36px); }
.nova-floating-player-bar { position: absolute; inset: 0 0 auto; height: 36px; display: flex; align-items: center; gap: .5rem; padding: 0 .35rem 0 .75rem; background: #0f172a; color: #fff; z-index: 2; }
.nova-floating-player-title { min-width: 0; flex: 1; overflow: hidden; font-size: .76rem; font-weight: 600; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.nova-floating-player-actions { display: flex; align-items: center; gap: .15rem; }
.nova-floating-player-actions button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #cbd5e1; cursor: pointer; }
.nova-floating-player-actions button:hover { background: #1e293b; color: #fff; }
.nova-floating-player-actions button:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.nova-live-placeholder { display: grid; justify-items: center; gap: .75rem; padding: 2rem; color: #cbd5e1; text-align: center; }
.nova-live-placeholder i { color: #ef4444; font-size: 2.5rem; }
.nova-live-content { height: 100%; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; padding: 1rem 1.25rem; }
.nova-live-content h3 { display: -webkit-box; margin: .45rem 0; overflow: hidden; color: var(--text-primary); font-size: 1.2rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.nova-live-content p { display: -webkit-box; margin: 0 0 .55rem; overflow: hidden; color: var(--text-secondary); font-size: .84rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.nova-live-controls { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: .5rem; margin-bottom: .65rem; }
.nova-live-source-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; padding: .3rem; border: 1px solid var(--border-light); border-radius: 999px; background: var(--bg-secondary); }
.nova-live-source-tabs button { min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .45rem .65rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.nova-live-source-tabs button:hover { color: var(--text-primary); }
.nova-live-source-tabs button.active { border-color: #2563eb; background: #2563eb; color: #fff; box-shadow: 0 2px 5px rgba(37,99,235,.24); }
.source-status-dot { width: 7px; height: 7px; flex: 0 0 7px; border: 1px solid currentColor; border-radius: 50%; opacity: .55; }
.nova-live-source-tabs button.active .source-status-dot { border-color: #fff; background: #fff; opacity: 1; }
.nova-live-refresh { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-light); border-radius: 50%; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.nova-live-refresh:hover { border-color: #2563eb; color: #2563eb; }
.nova-live-refresh:disabled { cursor: wait; opacity: .7; }
.nova-live-refresh i { display: inline-block; transform-origin: center; }
.nova-live-refresh.loading i { animation: nova-live-spin .8s linear infinite; }
.nova-live-meta { flex-wrap: wrap; }
/* The badge carries the link out to YouTube, so it has to read as something
   you can press. Specificity clears .news-category, which sets display. */
.nova-live-content .nova-live-kicker { display: flex; align-items: center; gap: .4rem; text-decoration: none; transition: background var(--transition-fast); }
.nova-live-content .nova-live-kicker:hover { background: rgba(59, 130, 246, .2); }
.nova-live-content .nova-live-kicker:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.nova-live-content .nova-live-kicker i { font-size: .7rem; opacity: .8; }
/* The tabs stay at the top; the rest sits in the middle of what the player
   leaves, rather than trailing off against an empty lower half. */
.nova-live-content .nova-live-kicker { margin-top: auto; }
.nova-live-content .nova-live-meta { margin-bottom: auto; }

@keyframes nova-live-spin { to { transform: rotate(360deg); } }

html.dark .nova-live-panel { background: var(--bg-card); }

@media (max-width: 760px) {
  .nova-live-panel { grid-template-columns: 1fr; }
  .nova-live-player.is-floating { right: 12px; bottom: 12px; width: calc(100vw - 24px); height: min(230px, calc(56.25vw + 22px)); aspect-ratio: auto; padding-top: 36px; }
  .nova-live-content { height: auto; padding: 1.25rem; }
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination button:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.pagination button.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination button:disabled:hover {
  border-color: var(--border-light);
  color: var(--text-secondary);
}

/* Priority & Regular Sections */
.priority-section {
  margin-bottom: 2rem;
}

.regular-section {
  margin-top: 3rem;
}

.priority-section .section-subtitle,
.regular-section .section-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.priority-section .section-subtitle i,
.regular-section .section-subtitle i {
  font-size: 1rem;
}

/* ========================================
   EMPTY & LOADING STATES
======================================== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   SEARCH RESULTS DROPDOWN
======================================== */
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
  text-decoration: none;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item i {
  font-size: 1rem;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.search-result-item > div {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 500;
  text-transform: capitalize;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========================================
   INFO SECTION (Homepage)
======================================== */
.info-section {
  margin: 4rem 0 3rem;
}

.info-grid {
  display: grid;
  /* Default: 3 columns on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

/* 2 columns when viewport < 1224px (with sidebar visible) */
@media (max-width: 1223px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column when viewport < 924px (with sidebar visible) */
@media (max-width: 923px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* On mobile (<768px) sidebar is hidden, can use 2 columns */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Very narrow mobile: single column */
@media (max-width: 580px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
  border: 3px dashed var(--text-muted);
}

.info-card i {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   HOME PAGE SECTIONS
======================================== */
.home-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

/* Manifesto Container */
.manifesto-container {
  margin: 2rem auto 2.5rem;
  max-width: 850px;
  padding: 0 1rem;
}

.manifesto-accent-line {
  height: 4px;
  background: #3498db;
  background-image: linear-gradient(to right, #3498db, #e74c3c, #3498db);
}

.manifesto-text {
  margin: 0;
  padding: 2rem 3rem;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #2c3e50;
  text-align: center;
  font-weight: 500;
  font-style: italic;
  background-color: #fff;
  border: none;
  border-left: 4px solid #3498db;
  border-right: 4px solid #3498db;
  position: relative;
}

.manifesto-quote-mark {
  position: absolute;
  font-family: Georgia, serif;
  font-size: 4rem;
  font-weight: bold;
  color: #3498db;
  opacity: 0.25;
  line-height: 1;
}

.manifesto-quote-mark:first-of-type {
  top: 0.5rem;
  left: 1rem;
}

.manifesto-quote-mark.closing {
  bottom: 0.5rem;
  right: 1rem;
}

.manifesto-text .text-highlight {
  color: #fff !important;
  font-weight: 600 !important;
  font-style: normal !important;
  background: #3498db !important;
  padding: 2px 10px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Dark mode manifesto */
html.dark .manifesto-accent-line {
  background-image: linear-gradient(to right, #5dade2, #e74c3c, #5dade2);
}

html.dark .manifesto-text {
  color: #f1f5f9;
  background-color: #1e293b;
  border-left-color: #5dade2;
  border-right-color: #5dade2;
}

html.dark .manifesto-quote-mark {
  color: #5dade2;
}

html.dark .manifesto-text .text-highlight {
  background: #5dade2 !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  .manifesto-container {
    margin: 1.5rem 0.5rem 2rem;
  }

  .manifesto-text {
    font-size: 1rem;
    padding: 1.5rem 2rem;
  }

  .manifesto-quote-mark {
    font-size: 3rem;
  }

  .manifesto-quote-mark:first-of-type {
    top: 0.25rem;
    left: 0.5rem;
  }

  .manifesto-quote-mark.closing {
    bottom: 0.25rem;
    right: 0.5rem;
  }
}

/* ========================================
   ABOUT SECTION (Homepage)
======================================== */
.about-section {
  margin: 3rem 0;
  padding: 1rem 0;
  text-align: center;
}

.about-section .section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.about-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.about-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-light);
  max-width: 760px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

.text-highlight {
  color: var(--secondary);
  font-weight: 600;
}

/* ========================================
   PARTICIPATION SECTION (Homepage)
======================================== */
.participation-section {
  margin-top: 3rem;
  padding-top: 1rem;
}

.participation-section .section-header {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.participation-section .section-title {
  margin: 0;
  width: 100%;
  text-align: center;
}

.participation-section .section-subtitle {
  margin: 0;
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

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

.section-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-link {
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--secondary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--secondary) 18%, transparent);
  transition: all var(--transition-fast);
}

.section-link:hover {
  background: color-mix(in srgb, var(--secondary) 14%, transparent);
  border-color: color-mix(in srgb, var(--secondary) 28%, transparent);
  color: var(--secondary);
}

.section-link i {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}

.section-link:hover i {
  transform: translateX(3px);
}

.participation-grid {
  display: grid;
  /* Default: 3 columns on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

/* 2 columns when viewport < 1224px (with sidebar visible) */
@media (max-width: 1223px) {
  .participation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column when viewport < 924px (with sidebar visible) */
@media (max-width: 923px) {
  .participation-grid {
    grid-template-columns: 1fr;
  }
}

/* On mobile (<768px) sidebar is hidden, can use 2 columns */
@media (max-width: 768px) {
  .participation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Very narrow mobile: single column */
@media (max-width: 580px) {
  .participation-grid {
    grid-template-columns: 1fr;
  }
}

.participation-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  text-align: center;
  cursor: default;
  transition: none;
  text-decoration: none;
}

.participation-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.participation-icon.vote {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}
.participation-icon.discuss {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.participation-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.participation-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.participation-icon.propose {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}
.participation-icon.share {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.participation-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.participation-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   NEWSLETTER SECTION (Homepage)
======================================== */
.newsletter-section {
  margin: 3rem 0 2rem;
  background: linear-gradient(135deg, #dc4a4a 0%, #c73e3e 100%);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
}

.newsletter-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem 0;
}

.newsletter-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.newsletter-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto 1rem;
}

.newsletter-input-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.newsletter-input {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  padding: 0.875rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.newsletter-input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.newsletter-input::placeholder {
  color: #94a3b8;
}

.newsletter-btn {
  padding: 0.875rem 1.75rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: translateY(-2px);
}

.newsletter-note {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin: 0;
}

/* ========================================
   NEW NEWSLETTER SECTION (Teal Gradient)
======================================== */
.newsletter-section-new {
  margin: 2rem 2rem 0;
  padding: 0;
}

.newsletter-container {
  background: linear-gradient(135deg, #e8f5f3 0%, #d4ede8 50%, #c5e8e2 100%);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.newsletter-title-new {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.newsletter-content-new {
  flex: 1;
  text-align: left;
}

.newsletter-description-new {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.newsletter-form-new {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.newsletter-input-wrapper {
  position: relative;
  min-width: 240px;
}

.newsletter-input-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
}

.newsletter-input-new {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.newsletter-input-new:focus {
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsletter-input-new::placeholder {
  color: #94a3b8;
}

.newsletter-btn-new {
  padding: 0.75rem 1.5rem;
  background: #2a9d8f;
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.newsletter-btn-new:hover {
  background: #238b7e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
}

/* Dark mode for new newsletter */
html.dark .newsletter-container {
  background: linear-gradient(135deg, #1a3a36 0%, #1e4440 50%, #224a45 100%);
}

html.dark .newsletter-title-new {
  color: #f1f5f9;
}

html.dark .newsletter-description-new {
  color: #94a3b8;
}

html.dark .newsletter-input-new {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.dark .newsletter-input-new::placeholder {
  color: #64748b;
}

html.dark .newsletter-input-wrapper i {
  color: #64748b;
}

/* ========================================
   NEW SITE FOOTER
======================================== */
.site-footer-new {
  background: #f8fafc;
  margin-top: 0;
  padding: 0;
  border-top: none;
}

.site-footer-simple {
  background: #f8fafc;
  margin-top: auto;
  padding: 0;
  border-top: 1px solid var(--border-light);
}

html.dark .site-footer-simple {
  background: #0f172a;
  border-top-color: #334155;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 3rem;
}

.footer-brand {
  max-width: 380px;
}

.footer-logo-new {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(
    to right,
    #5483e0 0%,
    #5483e0 33.33%,
    #fcd116 33.33%,
    #fcd116 66.66%,
    #ef5f6f 66.66%,
    #ef5f6f 100%
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-logo-text {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.footer-description {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 1.25rem 0;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icon:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-2px);
}

.footer-links-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-column h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.footer-links-column a {
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links-column a:hover {
  color: #3b82f6;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
}

/* Only the homepage footer stacks the newsletter above the fine print; the
   simple footer starts with .footer-bottom and needs no gap above its rule. */
.newsletter-section-new + .footer-bottom {
  margin-top: 2rem;
}

.footer-bottom p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.footer-contact-link {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--secondary, #2563eb);
  text-decoration: underline;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-text {
  color: #10b981;
  font-weight: 600;
}

/* Dark mode for new footer */
html.dark .site-footer-new {
  background: #0f172a;
}

html.dark .footer-logo-text {
  color: #f1f5f9;
}

html.dark .footer-description {
  color: #94a3b8;
}

html.dark .social-icon {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

html.dark .social-icon:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

html.dark .footer-links-column h4 {
  color: #64748b;
}

html.dark .footer-links-column a {
  color: #94a3b8;
}

html.dark .footer-links-column a:hover {
  color: #3b82f6;
}

html.dark .footer-bottom {
  border-top-color: #334155;
}

html.dark .footer-bottom p {
  color: #64748b;
}

html.dark .footer-contact-link {
  color: #94a3b8;
}

html.dark .server-status {
  color: #64748b;
}

/* Responsive for new newsletter & footer */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .newsletter-container {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1.5rem;
    gap: 0.75rem;
  }

  .newsletter-content-new {
    text-align: center;
  }

  .newsletter-title-new {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
  }

  .newsletter-description-new {
    font-size: 0.8rem;
  }

  .newsletter-form-new {
    width: 100%;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .newsletter-section-new {
    margin: 1.5rem 0.75rem 0;
  }

  .newsletter-container {
    border-radius: 12px;
    padding: 1rem;
  }

  .newsletter-form-new {
    flex-direction: column;
    max-width: 100%;
  }

  .newsletter-input-wrapper {
    min-width: 100%;
    width: 100%;
  }

  .newsletter-btn-new {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.25rem 1.5rem;
  }

  .footer-bottom-links {
    justify-content: center;
  }
}

/* ========================================
   QUICK PULSE VOTING SECTION
======================================== */
.quick-pulse-section {
  margin: 3rem 0;
}

.quick-pulse-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.quick-pulse-section .section-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.pulse-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pulse-cards-grid.voteaza-grid {
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Multi-option consultations need room for their answer buttons and legend. */
.pulse-card-wide {
  grid-column: span 2;
}

.pulse-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-normal);
}

.pulse-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pulse-ended-badge {
  position: absolute;
  top: 1.5rem;
  right: 1rem;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.7;
}

.pulse-card.ended {
  opacity: 0.7;
}

.pulse-card.ended .pulse-btn {
  pointer-events: none;
  opacity: 0.5;
}

.ended-polls {
  opacity: 0.85;
}

.pulse-category {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pulse-category.healthcare {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pulse-category.education {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.pulse-category.tech {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-category.economic {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.pulse-category.juridic {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.pulse-category.energy {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.pulse-category.transport {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.pulse-category.agriculture {
  background: rgba(132, 204, 22, 0.1);
  color: #65a30d;
  border: 1px solid rgba(132, 204, 22, 0.2);
}

.pulse-category.social {
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.pulse-category.otv {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.pulse-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.pulse-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
}

.pulse-btn {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.pulse-btn.pulse-yes {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-btn.pulse-yes:hover {
  background: #10b981;
  color: white;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pulse-btn.pulse-no {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pulse-btn.pulse-no:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.pulse-btn.voted {
  opacity: 0.6;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}

.pulse-btn.voted.selected {
  opacity: 1;
}

.pulse-btn.pulse-yes.voted.selected {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.pulse-btn.pulse-no.voted.selected {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.otv-pulse-buttons {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.pulse-btn.otv-pulse-option {
  background: color-mix(in srgb, var(--option-color) 10%, transparent);
  color: var(--option-color);
  border: 1px solid color-mix(in srgb, var(--option-color) 24%, transparent);
}

.pulse-btn.otv-pulse-option:not(:disabled):hover,
.pulse-btn.otv-pulse-option.is-selected {
  background: var(--option-color);
  color: #fff;
  border-color: var(--option-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--option-color) 28%, transparent);
}

.otv-pulse-option.option-0,
.otv-pulse-result-label.option-0,
.otv-pulse-bar-segment.option-0 { --option-color: #16a34a; }
.otv-pulse-option.option-1,
.otv-pulse-result-label.option-1,
.otv-pulse-bar-segment.option-1 { --option-color: #ef4444; }
.otv-pulse-option.option-2,
.otv-pulse-result-label.option-2,
.otv-pulse-bar-segment.option-2 { --option-color: #2563eb; }
.otv-pulse-option.option-3,
.otv-pulse-result-label.option-3,
.otv-pulse-bar-segment.option-3 { --option-color: #9333ea; }
.otv-pulse-option.option-4,
.otv-pulse-result-label.option-4,
.otv-pulse-bar-segment.option-4 { --option-color: #d97706; }
.otv-pulse-option.option-5,
.otv-pulse-result-label.option-5,
.otv-pulse-bar-segment.option-5 { --option-color: #0891b2; }

.otv-pulse-description {
  margin: -0.4rem 0 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.otv-pulse-results-header,
.otv-pulse-results-footer {
  flex-wrap: wrap;
  gap: 0.65rem;
}

.otv-pulse-result-label {
  color: var(--option-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.otv-pulse-bar-segment {
  height: 100%;
  background: var(--option-color);
  transition: width 0.5s ease;
}

.otv-pulse-results-footer span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.otv-pulse-results-header > span,
.otv-pulse-results-footer > span {
  flex: 1;
}

.otv-pulse-results-header > span:not(:first-child):not(:last-child),
.otv-pulse-results-footer > span:not(:first-child):not(:last-child) {
  text-align: center;
}

.otv-pulse-results-header > span:last-child,
.otv-pulse-results-footer > span:last-child {
  text-align: right;
}

/* Pulse Results Bar */
.pulse-results {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.pulse-results-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.pulse-support {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 0.3px;
}

.pulse-oppose {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.3px;
}

.pulse-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-hover);
}

.pulse-bar-support {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  height: 100%;
  transition: width 0.5s ease;
}

.pulse-bar-oppose {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  height: 100%;
  transition: width 0.5s ease;
}

.pulse-results-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.pulse-votes-support,
.pulse-votes-oppose {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dark mode pulse results */
html.dark .pulse-results {
  border-top-color: var(--border-light);
}

html.dark .pulse-bar {
  background: rgba(255, 255, 255, 0.1);
}

/* Dark mode pulse cards */
html.dark .pulse-card {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .pulse-category.healthcare {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

html.dark .pulse-category.education {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

html.dark .pulse-category.tech {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark .pulse-category.economic {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

html.dark .pulse-category.juridic {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

html.dark .pulse-category.energy {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
}

html.dark .pulse-category.transport {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.3);
}

html.dark .pulse-category.agriculture {
  background: rgba(132, 204, 22, 0.15);
  border-color: rgba(132, 204, 22, 0.3);
}

html.dark .pulse-category.social {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.3);
}

/* Responsive pulse grid */
@media (max-width: 1100px) {
  .pulse-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .pulse-cards-grid {
    grid-template-columns: 1fr;
  }

  .pulse-card-wide {
    grid-column: auto;
  }

  .quick-pulse-section .section-header {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ========================================
   REFORM BACKLOG (Următoarele reforme)
======================================== */
.backlog-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.backlog-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  transition: all var(--transition-fast);
}

.backlog-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.backlog-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.backlog-body {
  min-width: 0;
}

.backlog-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--category-color, var(--text-muted));
  margin-bottom: 0.35rem;
}

.backlog-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

.backlog-note {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0.4rem 0 0;
}

.backlog-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.backlog-votes {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.backlog-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.backlog-vote-btn:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.backlog-vote-btn.voted {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.backlog-vote-btn.is-saving {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 700px) {
  .backlog-item {
    grid-template-columns: 2rem 1fr;
    row-gap: 0.85rem;
  }

  .backlog-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ========================================
   Unified OTV Community Feed
======================================== */
.otv-logo-icon {
  background: #facc15 !important;
  color: #111 !important;
  text-shadow: none !important;
}

.otv-logo-icon i { font-size: 0.85rem; }
.otv-create-post { border: 0; opacity: 1 !important; pointer-events: auto !important; cursor: pointer !important; background: #facc15 !important; color: #111 !important; }

.unified-community-shell {
  width: min(100%, 860px);
  margin: 0 auto;
}

.unified-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.unified-feed-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
}

.unified-topic-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  scrollbar-width: thin;
}

.unified-topic-tabs a {
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-secondary);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.unified-topic-tabs a.active {
  border-color: #d4a800;
  background: #facc15;
  color: #111;
}

.unified-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
}

.unified-composer > button {
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg-main);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}

.unified-composer > div { display: flex; gap: 0.2rem; }
.unified-composer > div button { width: 34px; height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.unified-composer > div button:hover { background: var(--bg-hover); color: #b68f00; }

.unified-feed { display: grid; gap: 0.85rem; }
.unified-post { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.unified-post-author { display: flex; align-items: center; gap: 0.65rem; padding: 1rem 1.1rem 0; }
.unified-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #facc15; color: #111; font-size: 0.7rem; font-weight: 800; }
.unified-post-author > div { display: grid; min-width: 0; }
.unified-post-author strong { color: var(--text-primary); font-size: 0.85rem; }
.unified-post-author div span { color: var(--text-muted); font-size: 0.7rem; }
.unified-category { margin-left: auto; padding: 0.28rem 0.45rem; border-radius: 3px; background: var(--bg-hover); color: var(--text-secondary); font-size: 0.66rem; font-weight: 700; }
.unified-more { width: 30px; height: 30px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.unified-post-body { padding: 0.9rem 1.1rem 1rem 3.85rem; }
.unified-post-body > p { margin: 0 0 0.75rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.unified-post-body h2 { margin: 0 0 0.6rem; color: var(--text-primary); font-size: 1.15rem; line-height: 1.4; }
.unified-post-body h1 { margin: 0 0 0.65rem; color: var(--text-primary); font-size: 1.7rem; line-height: 1.3; }
.unified-post-kicker { color: #927100 !important; font-size: 0.65rem !important; font-weight: 800; letter-spacing: 0.5px; }

.unified-reference {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-primary);
  background: var(--bg-main);
  text-decoration: none;
}

.unified-reference-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; background: color-mix(in srgb, var(--topic-color) 14%, transparent); color: var(--topic-color); }
.unified-reference > span:nth-child(2) { display: grid; gap: 0.2rem; }
.unified-reference small { color: var(--text-muted); font-size: 0.58rem; font-weight: 800; }
.unified-reference strong { font-size: 0.78rem; }
.unified-reference > i { color: var(--text-muted); }

.unified-post-actions { display: flex; align-items: center; gap: 0.15rem; padding: 0.55rem 0.8rem; border-top: 1px solid var(--border-light); }
.unified-post-actions button { min-height: 34px; display: inline-flex; align-items: center; gap: 0.38rem; padding: 0.4rem 0.65rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; }
.unified-post-actions button:hover { background: var(--bg-hover); }
.unified-post-actions button.active { color: #b68f00; }
.unified-post-actions .save-action { margin-left: auto; }

.unified-video {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0.9rem 0;
  border-radius: 5px;
  background: linear-gradient(rgba(0,0,0,.24), rgba(0,0,0,.58)), url('assets/otv/community-cover.jpeg') center/cover;
  color: #fff;
}
.unified-video > button { width: 58px; height: 58px; border: 0; border-radius: 50%; background: #facc15; color: #111; font-size: 1rem; cursor: pointer; z-index: 2; }
.unified-video > button.playing { background: #fff; }
.unified-video > span { position: absolute; left: 0.8rem; top: 0.8rem; padding: 0.3rem 0.45rem; border-radius: 3px; background: rgba(0,0,0,.75); color: #facc15; font-size: 0.65rem; font-weight: 800; }
.unified-video > small { position: absolute; left: 0.8rem; bottom: 0.8rem; color: #fff; }
.unified-live-video > span { background: #e11d48; color: #fff; }
.unified-live-video > span b { display: inline-block; width: 6px; height: 6px; margin-right: 0.3rem; border-radius: 50%; background: #fff; }

.unified-poll { display: grid; gap: 0.45rem; margin-top: 1rem; }
.unified-poll button { position: relative; min-height: 44px; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0.8rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-main); color: var(--text-primary); cursor: pointer; }
.unified-poll button > * { position: relative; z-index: 2; }
.unified-poll button i { position: absolute; inset: 0 auto 0 0; z-index: 1; background: rgba(250,204,21,.18); }
.unified-poll button.selected { border-color: #d4a800; box-shadow: inset 4px 0 #facc15; }
.unified-poll-meta { display: block; margin-top: 0.7rem; color: var(--text-muted); }

.unified-proposal-progress { margin-top: 1rem; padding: 0.9rem; border-left: 3px solid #facc15; background: var(--bg-main); }
.unified-proposal-progress > div:first-child { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-secondary); font-size: 0.74rem; }
.unified-proposal-progress > div:nth-child(2) { height: 6px; margin: 0.65rem 0; overflow: hidden; border-radius: 3px; background: var(--bg-hover); }
.unified-proposal-progress > div:nth-child(2) i { display: block; height: 100%; background: #facc15; }

.unified-back-link { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 1rem; color: var(--text-secondary); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.unified-document-content { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); color: var(--text-primary); }
.unified-document-content section { margin-bottom: 1.5rem; }
.unified-document-content h2 { font-size: 1.25rem; }
.unified-document-content h3 { color: var(--text-primary); font-size: 1rem; }
.unified-document-content p,
.unified-document-content li { color: var(--text-secondary); line-height: 1.7; }
.unified-document-content img { max-width: 100%; height: auto; }
.unified-comments { margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.unified-comments > h2 { margin: 0 0 1rem; color: var(--text-primary); font-size: 1rem; }
.unified-comment { display: flex; gap: 0.75rem; padding: 1rem 0; border-top: 1px solid var(--border-light); }
.unified-comment > div { min-width: 0; }
.unified-comment strong { color: var(--text-primary); font-size: 0.8rem; }
.unified-comment strong small { color: var(--text-muted); font-weight: 400; }
.unified-comment p { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.55; }
.unified-comment button { margin-right: 0.65rem; padding: 0; border: 0; background: transparent; color: var(--text-muted); font-size: 0.72rem; cursor: pointer; }
.unified-comment-box { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--border-light); }
.unified-comment-box button { padding: 0.7rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-main); color: var(--text-muted); text-align: left; cursor: pointer; }

html.dark .unified-post-kicker { color: #facc15 !important; }

@media (max-width: 700px) {
  .unified-feed-header { align-items: stretch; flex-direction: column; }
  .unified-feed-header .otv-primary-btn { width: 100%; }
  .unified-composer { grid-template-columns: auto minmax(0, 1fr); }
  .unified-composer > div { display: none; }
  .unified-post-body { padding-left: 1.1rem; }
  .unified-category { display: none; }
  .unified-post-actions button span { display: none; }
  .unified-post-actions button { min-width: 42px; justify-content: center; }
  .unified-video { min-height: 240px; }
  .unified-proposal-progress > div:first-child { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
}

/* ========================================
   NEWS SECTION
======================================== */
.news-section {
  margin: 3rem 0;
}

.news-grid {
  display: grid;
  /* Split in half with a single headline column: a wider lead only made the
     photo a letterbox strip that crops tall originals down to nothing. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.news-card.featured {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.news-card.featured:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.news-image {
  position: relative;
  /* The photo keeps a 16:9 shape at any column width instead of a fixed height,
     which turned into a letterbox strip on wide screens. It can still grow past
     that when the headline column beside it is taller, up to the cap. */
  flex: 1 0 auto;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  max-height: 340px;
  overflow: hidden;
}

.news-image img {
  /* Taken out of flow so the photo's own proportions cannot set the card's
     height. The card follows the headline column, and the photo fills it. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card.featured:hover .news-image img {
  transform: scale(1.05);
}

.news-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-badge.live {
  background: #ef4444;
  color: white;
}

.news-badge.live i {
  font-size: 0.5rem;
  animation: pulse-live 1.5s infinite;
}

.news-content {
  padding: 1.5rem;
}

/* When the feed gives the lead story no usable photo, the headline sits in the
   middle of the card instead of leaving the picture's space empty below it. */
.news-card.featured.news-card-textonly .news-content {
  margin: auto 0;
}

.news-category {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.news-category.small {
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.5rem;
}

.news-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.news-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.news-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-meta i {
  font-size: 0.75rem;
}

/* News sidebar list */
.news-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Two headlines share the column between them. The lead card is matched to
   this height, so fewer and taller rows keep its photo from taking over. */
.news-sidebar-list .news-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-sidebar-list-secondary {
  display: none;
}

@media (min-width: 1500px) {
  .news-grid.has-two-news-columns {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(250px, 1fr));
  }

  .news-grid.has-two-news-columns .news-sidebar-list-secondary {
    display: flex;
  }

  /* The second column takes over here, so both columns hold two headlines. */
  .news-grid.has-two-news-columns .news-item-overflow {
    display: none;
  }
}

.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.news-item:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.news-item-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.news-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dark mode news */
html.dark .news-card.featured {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .news-item {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .news-category {
  background: rgba(59, 130, 246, 0.15);
}

/* Responsive news grid. Stacking below 1150px because the headline column gets
   narrow enough there that its titles wrap into a column taller than the lead
   card, which stretched the photo towards a square. */
@media (max-width: 1150px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-sidebar-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .news-sidebar-list .news-item {
    flex: 0 0 280px;
  }
}

@media (max-width: 600px) {
  .news-image {
    min-height: 180px;
  }

  .news-content h3 {
    font-size: 1.1rem;
  }

  .news-sidebar-list {
    flex-direction: column;
  }

  .news-sidebar-list .news-item {
    flex: 1;
  }
}

/* ========================================
   TELEVOT TEASER (home page)
======================================== */
.televot-section {
  margin: 3rem 0;
}

/* ========================================
   FOCUS SECTION (Debates + Leaderboard)
======================================== */
.focus-section {
  margin: 3rem 0;
}

.focus-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.debates-column .section-header,
.leaderboard-column .section-title {
  margin-bottom: 1.25rem;
}

.debates-column .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.carousel-counter {
  margin-right: .25rem;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.debates-carousel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.debate-card {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 320px;
  text-decoration: none;
}

.debate-card[hidden] {
  display: none;
}

.debate-card.dark {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
}

.debate-card.light {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.debate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.debate-category {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.debate-category.economie {
  background: #ef4444;
  color: white;
}

.debate-category.mediu {
  background: #22c55e;
  color: white;
}

.debate-consensus {
  font-size: 0.75rem;
  opacity: 0.7;
}

.debate-card.light .debate-consensus {
  color: var(--text-muted);
}

.debate-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.debate-description {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.8;
  margin: 0;
}

.debate-card.light .debate-description {
  color: var(--text-secondary);
}

.debate-progress {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.progress-label {
  opacity: 0.7;
}

.debate-card.light .progress-label {
  color: var(--text-muted);
}

.progress-value {
  font-weight: 600;
  color: #3b82f6;
}

.debate-card.dark .progress-value {
  color: #60a5fa;
}

.debate-card.light .progress-value {
  color: #22c55e;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.debate-card.light .progress-bar {
  background: var(--border-light);
}

.progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-fill.green {
  background: #22c55e;
}

.debate-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.vote-count {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.8;
}

.vote-btn {
  /* The card is narrow enough that the label used to break across two lines
     and press against the count beside it. The button keeps its size and the
     count gives up the room instead. */
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: white;
  color: #1e293b;
}

.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vote-btn.outline {
  background: transparent;
  border: 1.5px solid #2a9d8f;
  color: #2a9d8f;
}

.vote-btn.outline:hover {
  background: #2a9d8f;
  color: white;
}

/* Leaderboard */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leader-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.leader-item:hover,
.leader-item:focus-visible {
  background: #eaf2ff;
  transform: translateY(-1px);
  outline: none;
}

.leader-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.leader-rank.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.leader-rank.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.leader-rank.rank-3 {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.leader-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.leader-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.leader-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.leader-points {
  font-weight: 700;
  font-size: 0.95rem;
  color: #2a9d8f;
  white-space: nowrap;
}

.leaderboard-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.leaderboard-link:hover {
  color: var(--secondary);
}

/* ========================================
   IMPACT SECTION (Stats)
======================================== */
.impact-section {
  margin: 3rem 0;
  text-align: center;
}

.impact-header {
  margin-bottom: 2rem;
}

.impact-title {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.impact-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.impact-card {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.impact-card i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.impact-card:nth-child(1) i {
  color: #3b82f6;
}
.impact-card:nth-child(2) i {
  color: #8b5cf6;
}
.impact-card:nth-child(3) i {
  color: #2a9d8f;
}
.impact-card:nth-child(4) i {
  color: #ef4444;
}

.impact-number {
  font-family: "Poppins", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.impact-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Dark mode for focus & impact sections */
html.dark .debate-card.light {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .leaderboard-card {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .leader-item {
  background: var(--bg-hover);
}

html.dark .impact-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Responsive for focus & impact */
@media (max-width: 1100px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-column {
    order: -1;
  }

  .leaderboard-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .leader-item {
    flex: 0 0 200px;
    flex-direction: column;
    text-align: center;
  }

  .leader-info {
    align-items: center;
  }
}

@media (max-width: 900px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .debates-carousel {
    grid-template-columns: 1fr;
  }

  .debate-card {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .impact-card {
    padding: 1.5rem 1rem;
  }

  .impact-number {
    font-size: 2.25rem;
  }

  .impact-title {
    font-size: 1.5rem;
  }
}

/* ========================================
   MEASURE DETAIL PAGE
======================================== */

/* New Page Layout - Sidebar at top, fixed while scrolling */
.measure-page-layout {
  display: flex;
  gap: 2rem;
  position: relative;
}

.measure-page-main {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 280px - 2rem);
  container-name: measure-main;
  container-type: inline-size;
}

.measure-page-sidebar {
  width: 280px;
  flex-shrink: 0;
  align-self: flex-start;
  position: fixed;
  z-index: 10;
  top: calc(var(--header-height) + 2rem);
  right: max(2rem, calc((100vw - var(--sidebar-width) - 1400px) / 2));
  max-height: calc(100dvh - var(--header-height) - 4rem);
  padding-bottom: 3rem;
  box-sizing: border-box;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.measure-page-sidebar::-webkit-scrollbar {
  width: 4px;
}

.measure-page-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.measure-page-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.measure-page-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--border-medium);
}

/* New Measure Detail Header - No Card */
.measure-detail-header {
  margin-bottom: 2rem;
}

.measure-detail-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  line-height: 1.25;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  min-height: 58px;
  padding: 0.5rem 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
}

.measure-detail-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.measure-detail-title .back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}

.measure-detail-title .back-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
  transform: translateX(-2px);
}

.measure-detail-title .back-btn i {
  font-size: 0.9rem;
}

/* The detail column can become narrow even on a desktop viewport because the
   app sidebar and the civic-status rail both remain visible. Move the impact
   badge below the title based on the space the title actually has, not merely
   on the browser width. */
@container measure-main (max-width: 760px) {
  .measure-detail-title {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .measure-detail-title .measure-impact-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
}

.measure-detail-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem 0;
  line-height: 1.6;
  max-width: 800px;
}

.measure-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.measure-detail-tags .category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  cursor: default;
  /* No hover effects */
}

.measure-impact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 28px;
  padding: 0 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.measure-impact-badge.impact-moderat {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.measure-impact-badge.impact-mediu {
  background: rgba(243, 156, 18, 0.15);
  color: #d68910;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.measure-impact-badge.impact-major {
  background: rgba(46, 204, 113, 0.15);
  color: #1e8449;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

html.dark .measure-impact-badge.impact-moderat {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.4);
}

html.dark .measure-impact-badge.impact-mediu {
  background: rgba(243, 156, 18, 0.2);
  color: #f5b041;
  border-color: rgba(243, 156, 18, 0.4);
}

html.dark .measure-impact-badge.impact-major {
  background: rgba(46, 204, 113, 0.2);
  color: #58d68d;
  border-color: rgba(46, 204, 113, 0.4);
}

/* Legacy Measure Header - kept for compatibility */
.measure-header {
  margin-bottom: 2rem;
}

.measure-title-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  border-left: 4px solid var(--secondary);
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.measure-title-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  line-height: 1.35;
}

.measure-title-section .subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem 0;
  line-height: 1.6;
}

.measure-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.measure-meta .measure-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 600;
}

.measure-meta .measure-impact-badge.impact-moderat {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.measure-meta .measure-impact-badge.impact-mediu {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.measure-meta .measure-impact-badge.impact-major {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.measure-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.measure-tags .category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

/* Article Container - Content LEFT, Sidebar RIGHT */
.measure-article-container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Article Content (Left/Main) */
.measure-article-content {
  --measure-section-title-size: 1.25rem;
  --measure-body-size: 0.95rem;
  --measure-meta-size: 0.8rem;
  background: var(--bg-card);
  font-size: var(--measure-body-size);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.measure-article-content .article-section {
  margin-bottom: 2.5rem;
}

.measure-article-content .article-section:last-child {
  margin-bottom: 1rem;
}

.measure-article-content h2 {
  color: var(--text-primary);
  font-size: var(--measure-section-title-size);
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.measure-article-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.measure-article-content p:last-child {
  margin-bottom: 0;
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  max-width: 100%;
}

.benefits-grid .benefit-item:nth-child(n + 9) {
  display: none;
}

@media (max-width: 600px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

.benefit-item {
  background: #edf4ff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: #e3efff;
}

.benefit-item i {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 0.875rem;
  display: block;
}

.benefit-item h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

.benefit-item .hover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--secondary), #2563eb);
  color: white;
  padding: 0.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  line-height: 1.4;
}

.benefit-item:hover .hover-info {
  transform: translateY(0);
}

html.dark .benefit-item {
  background: rgba(59, 130, 246, 0.13);
  border-color: var(--border-medium);
}

html.dark .benefit-item:hover {
  background: rgba(59, 130, 246, 0.19);
}

/* Arguments List */
.arguments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.argument {
  background: rgba(16, 185, 129, 0.04);
  border-left: 4px solid #10b981;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.argument h4 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.argument p {
  color: var(--text-primary);
  margin: 0;
  font-size: 0.95rem;
}

html.dark .argument {
  background: rgba(16, 185, 129, 0.06);
}

/* Case Study */
.case-study {
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}

.case-study .person-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.case-study .person-info i {
  display: none;
}

.case-study .person-info h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

/* Examples */
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.example-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
}

.example-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.example-header i {
  color: var(--secondary);
}

.example-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

/* Quote */
.quote {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(42, 157, 143, 0.03) 0%,
    rgba(42, 157, 143, 0.08) 100%
  );
  border-radius: var(--radius-xl);
  padding: 2.5rem 3rem;
  text-align: center;
  font-style: italic;
  border: 2px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin: 2rem 0;
  overflow: hidden;
}

.quote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 120px;
  line-height: 1;
  color: var(--secondary);
  opacity: 0.15;
  font-family: Georgia, serif;
  font-weight: bold;
}

.quote p {
  font-size: var(--measure-body-size, 0.95rem);
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.quote cite {
  display: block;
  color: var(--text-secondary);
  font-size: var(--measure-meta-size, 0.8rem);
  font-weight: 600;
  font-style: normal;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

.quote cite::before {
  content: "";
}

/* Proposal Quote */
.proposal-quote {
  background: #f0f9ff;
  border-left: 4px solid var(--secondary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.proposal-quote h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 1rem 0;
}

html.dark .quote {
  background: linear-gradient(
    135deg,
    rgba(42, 157, 143, 0.08) 0%,
    rgba(42, 157, 143, 0.15) 100%
  );
  border-color: rgba(42, 157, 143, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

html.dark .quote::before {
  color: var(--secondary);
  opacity: 0.2;
}

html.dark .quote p {
  color: var(--text-primary);
}

html.dark .quote cite {
  color: var(--text-secondary);
}

html.dark .proposal-quote {
  background: rgba(59, 130, 246, 0.1);
}

/* Article Sidebar (Right) - WordPress-style sticky */
.measure-article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - var(--header-height) - 2rem);
  overflow-y: auto;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.measure-article-sidebar::-webkit-scrollbar {
  width: 4px;
}

.measure-article-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.measure-article-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.measure-article-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--border-medium);
}

.sidebar-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.sidebar-box h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-box h3 i {
  color: var(--secondary);
  font-size: 0.9rem;
}

/* TOC */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
}

.toc-list a:hover {
  color: var(--secondary);
  background: var(--bg-hover);
  border-left-color: var(--secondary);
}

.toc-list a.active {
  color: var(--secondary);
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--secondary);
  font-weight: 500;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn.facebook:hover {
  background: #1877f2;
  color: white;
  border-color: #1877f2;
}

.share-btn.twitter:hover {
  background: #000000;
  color: white;
  border-color: #000000;
}

.share-btn.linkedin:hover {
  background: #0077b5;
  color: white;
  border-color: #0077b5;
}

.share-btn.whatsapp:hover {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.share-btn.copy:hover {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Action Box */
.action-box .support-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--secondary), #2563eb);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 0.75rem;
}

.action-box .support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.action-box .support-btn.supported {
  background: linear-gradient(135deg, #10b981, #059669);
}

.action-box .support-count {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.action-box .reform-participate-btn {
  background: linear-gradient(135deg, #f59e0b, #e8790a);
}

.measure-community {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.measure-community-heading,
.measure-comment-form > div,
.measure-comment header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.measure-community-heading span {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.measure-community-heading h2 { margin: 0.2rem 0 0; font-size: 1.3rem; }
.measure-community-heading > strong { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.measure-comment-form { margin: 1.25rem 0; }
.measure-comment-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
}
.measure-comment-form > div { margin-top: 0.65rem; }
.measure-comment-form small { color: var(--text-muted); }
.measure-comment-form button {
  padding: 0.65rem 1.1rem;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--secondary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.measure-comment-form button:disabled { opacity: 0.55; cursor: wait; }
.measure-comments-list { border-top: 1px solid var(--border-light); }
.measure-comment { display: flex; gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.measure-comment-avatar {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 800;
}
.measure-comment > div { min-width: 0; flex: 1; }
.measure-comment header { justify-content: flex-start; font-size: 0.82rem; }
.measure-comment header span { color: var(--text-muted); }
.measure-comment p { margin: 0.45rem 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.measure-comments-state { padding: 1.25rem 0; color: var(--text-muted); text-align: center; }
.measure-comments-state.is-error { color: #dc2626; }

@media (max-width: 560px) {
  .measure-community { padding: 1rem; }
  .measure-community-heading, .measure-comment-form > div { align-items: flex-start; flex-direction: column; }
  .measure-comment-form button { width: 100%; }
}

/* Related Measures */
.related-measures {
  margin-top: calc(clamp(2.25rem, 4vh, 3rem) + 15px);
  padding: 0;
  background: transparent;
}

.related-measures-separator {
  position: relative;
  height: 1px;
  margin-bottom: 1.35rem;
  background: linear-gradient(90deg, var(--border-medium), var(--border-light));
}

.related-measures-separator::before {
  content: "";
  position: absolute;
  inset: -1px auto auto 0;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0 33.33%, #facc15 33.33% 66.66%, #ef4444 66.66%);
}

.related-measures h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
}

.related-cards {
  display: grid;
  /* 2 columns to use full space since we show only 2 cards */
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .related-measures {
    margin-top: calc(2.25rem + 15px);
  }

  .related-measures-separator {
    margin-bottom: 1.25rem;
  }

  .related-cards {
    grid-template-columns: 1fr;
  }
}

/* Responsive - Measure Detail */
@media (max-width: 900px) {
  .measure-page-layout {
    flex-direction: column;
  }

  .measure-page-main {
    max-width: 100%;
  }

  .measure-page-sidebar {
    position: static;
    width: 100%;
    order: 2;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    padding-bottom: 0;
    overflow-y: visible;
    margin-top: 2rem;
    right: auto;
  }

  /* Hide TOC on mobile */
  .measure-page-sidebar .toc-box {
    display: none;
  }

  .measure-article-container {
    grid-template-columns: 1fr;
  }

  .measure-article-sidebar {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow-y: visible;
  }

  .sidebar-box {
    flex: 1;
    min-width: 200px;
  }

  .measure-title-section h1 {
    font-size: 1.6rem;
  }

  .measure-detail-title {
    font-size: 1.5rem;
  }

  .measure-detail-description {
    font-size: 1rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .measure-page-sidebar {
    flex-direction: column;
  }

  .measure-article-sidebar {
    flex-direction: column;
  }

  .sidebar-box {
    min-width: 100%;
  }

  .measure-title-section h1 {
    font-size: 1.4rem;
  }

  .measure-detail-title {
    font-size: 1.3rem;
    gap: 0.5rem;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .measure-detail-title .measure-impact-badge {
    grid-column: 2;
    justify-self: start;
  }

  .measure-detail-title .back-btn {
    width: 36px;
    height: 36px;
  }

  .measure-detail-description {
    font-size: 0.95rem;
  }

  .measure-article-content {
    padding: 1.25rem;
  }
}

/* ========================================
   TOAST NOTIFICATIONS
======================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================
   RESPONSIVE ADDITIONS
======================================== */
@media (max-width: 768px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
  }

  .filter-tabs {
    min-width: 0;
    flex: 1;
  }

  .view-toggle {
    margin-left: 0;
    align-self: flex-end;
  }

  .about-title {
    font-size: 1.4rem;
  }

  .about-content {
    padding: 1.5rem;
  }

  .about-content p {
    font-size: 0.95rem;
  }

  .newsletter-section {
    padding: 2rem 1.5rem;
  }

  .newsletter-title {
    font-size: 1.4rem;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }

  .newsletter-input {
    width: 100%;
    max-width: 100%;
  }

  .newsletter-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.4rem;
  }
}

/* ========================================
   Propose Reform Modal
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--bg-card, white);
  padding: 2rem;
  border-radius: var(--radius-xl, 12px);
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-content [hidden] { display: none; }

.modal-content h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.close-modal:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-content form {
  display: grid;
  gap: 1.25rem;
}

.modal-content .form-group {
  position: relative;
}

.modal-content .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-content .form-group input,
.modal-content .form-group textarea,
.modal-content .form-group select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: border-color 0.2s;
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus,
.modal-content .form-group select:focus {
  border-color: #60a5fa;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.modal-content .form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-content .btn,
.modal-content button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #3b82f6;
  color: white;
}

.modal-content .btn:hover,
.modal-content button[type="submit"]:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Dark mode modal */
html.dark .modal-content {
  background: var(--bg-card);
}

html.dark .modal-content .form-group input,
html.dark .modal-content .form-group textarea,
html.dark .modal-content .form-group select {
  background: var(--bg-main);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* ========================================
   MEASURE ARTICLE COMPONENTS
   Styles for dynamic measure content sections
======================================== */

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.benefit-item {
  background: #edf4ff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease-out;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: #e3efff;
  z-index: 10;
}

.benefit-item .hover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 0.5rem;
  transform: translateY(101%);
  transition: transform 0.3s ease-out;
  font-size: var(--measure-meta-size, 0.8rem);
  line-height: 1.4;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.benefit-item:hover .hover-info {
  transform: translateY(0);
}

.benefit-item i {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 0.875rem;
}

.benefit-item h4 {
  margin: 0;
  font-size: var(--measure-body-size, 0.95rem);
  color: var(--primary);
  line-height: 1.3;
}

/* Arguments List */
.arguments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.argument {
  background: rgba(46, 204, 113, 0.04);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.argument h4 {
  margin-top: 0;
  color: var(--primary);
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.argument p {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.6;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.faq-question {
  padding: 1rem 1.25rem;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-light);
}

.faq-question h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-question h4::before {
  content: "→";
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-answer {
  padding: 1rem 1.25rem;
}

.faq-answer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.6;
}

/* Impact List */
.impact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.impact-list li {
  padding: 0.875rem 1rem 0.875rem 2.25rem;
  background: rgba(42, 157, 143, 0.04);
  border-radius: var(--radius-md);
  position: relative;
  border: 1px solid var(--border-light);
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.impact-list li:before {
  content: "✓";
  position: absolute;
  left: 0.875rem;
  color: var(--secondary);
  font-weight: 700;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .impact-list {
    grid-template-columns: 1fr;
  }
}

/* Tags Container */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2rem 0;
}

.content-tag {
  background: #f1f5f9;
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: var(--measure-meta-size, 0.8rem);
  font-weight: 500;
}

/* Examples */
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.example-card {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}

.example-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.example-header i {
  font-size: 1.5rem;
  color: var(--secondary);
}

/* Inserted from the heading by initExampleFlags. Fixed width with a 4:3 box keeps
   the headings on one line whatever the flag's own proportions are, and the hairline
   border stops a white flag from dissolving into the card. */
.example-flag {
  width: 1.6rem;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.example-header h4 {
  margin: 0;
  color: var(--primary);
  font-size: var(--measure-body-size, 0.95rem);
}

.example-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.6;
}

/* Case Study */
.case-study {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid var(--border-light);
}

.person-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.person-info i {
  display: none;
}

.person-info h4 {
  margin: 0;
  color: var(--primary);
  font-size: var(--measure-body-size, 0.95rem);
}

.case-study p {
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.6;
}

.case-study p:last-child {
  margin-bottom: 0;
}

/* Questions */
.questions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.question-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
}

.question-item i {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 4px;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.question-item i::before {
  content: "?";
  font-family: inherit;
  font-weight: 700;
}

.question-item i.fas::before {
  content: "?";
}

.question-item p {
  margin: 0;
  font-weight: 500;
  font-size: var(--measure-body-size, 0.95rem);
  color: var(--text-primary);
  line-height: 1.5;
}

/* Infographic Cards */
.infographic-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
}

.infographic-tab {
  border: 1px solid var(--border-light);
  background: white;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: var(--measure-meta-size, 0.8rem);
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.infographic-tab:hover,
.infographic-tab:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.4);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.infographic-tab.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.28);
}

.infographic-stage {
  position: relative;
}

.infographic-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  animation: fadeIn 0.35s ease;
}

.infographic-card.active {
  display: flex;
}

.infographic-card[hidden] {
  display: none !important;
}

.infographic-card h3 {
  margin: 0 0 1.5rem 0;
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  color: var(--text-primary);
}

.chart-note {
  margin: 1rem 0 0 0;
  font-size: var(--measure-meta-size, 0.8rem);
  line-height: 1.5;
  color: var(--text-muted);
}

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

/* Bar Chart. Each row reads label and value on one line with the bar directly
   underneath, so the bar spans the full width and the two rows can be compared
   against the same edge. The older layout put label, bar and value side by side,
   which left the bar a narrow leftover column and clipped longer values. */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.bar-chart-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.bar-label {
  position: relative;
  padding-left: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--measure-meta-size, 0.8rem);
}

/* The dot ties the label to the colour of its bar. */
.bar-label::before {
  content: "";
  position: absolute;
  top: 0.4em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.tone-before .bar-label::before {
  background: #dc2626;
}

.tone-after .bar-label::before {
  background: #16a34a;
}

/* The number is the point of the chart, so it outranks the label. */
.bar-value {
  flex: 0 1 auto;
  font-weight: 700;
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.35;
  color: var(--text-primary);
  text-align: right;
}

/* The frame is the limit: a full bar reaches its right edge. */
.bar-track {
  position: relative;
  height: 1.75rem;
  background: #eef2f7;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--value) * 1%);
  min-width: 3px;
  border-radius: inherit;
  transition: width 0.6s ease;
}

/* Compact legacy cost charts whose label, track and value are direct children. */
.bar-chart:has(> .bar-chart-row:not(.tone-before):not(.tone-after)) {
  gap: 0.8rem;
}

.bar-chart-row:not(.tone-before):not(.tone-after) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.75rem;
  row-gap: 0.3rem;
}

.bar-chart-row:not(.tone-before):not(.tone-after) > .bar-label {
  grid-column: 1;
  grid-row: 1;
  padding-left: 0;
  font-size: var(--measure-meta-size, 0.8rem);
}

.bar-chart-row:not(.tone-before):not(.tone-after) > .bar-label::before {
  display: none;
}

.bar-chart-row:not(.tone-before):not(.tone-after) > .bar-value {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--measure-body-size, 0.95rem);
}

.bar-chart-row:not(.tone-before):not(.tone-after) > .bar-track {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  height: 0.75rem;
  border-radius: 999px;
}

.bar-taxed {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.bar-savings {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

/* A shared axis under both bars. Ticks sit outside the tracks rather than
   inside them, because a fill would paint over in-track gridlines and hide the
   scale exactly on the bar the reader is trying to measure. */
.bar-axis {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: -0.75rem;
  padding-top: 0.6rem;
  color: var(--text-muted);
  font-size: var(--measure-meta-size, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bar-axis::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.3rem;
  border-right: 1px solid var(--border-medium);
  background: repeating-linear-gradient(
    to right,
    var(--border-medium) 0,
    var(--border-medium) 1px,
    transparent 1px,
    transparent 25%
  );
}

/* Two qualitative statements, where a bar length would be meaningless. */
.compare-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.compare-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--border-medium);
  border-radius: var(--radius-md);
}

.compare-side.tone-before {
  border-top-color: #dc2626;
}

.compare-side.tone-after {
  border-top-color: #16a34a;
}

.compare-label {
  font-size: var(--measure-meta-size, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compare-value {
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .bar-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .bar-value {
    text-align: left;
  }

  .compare-pair {
    grid-template-columns: 1fr;
  }
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .flow-steps {
    flex-direction: row;
    align-items: stretch;
  }
}

.flow-step {
  flex: 1;
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flow-step h4 {
  margin: 0;
  font-size: var(--measure-body-size, 0.95rem);
  color: var(--primary);
}

.flow-step p {
  margin: 0;
  font-size: var(--measure-body-size, 0.95rem);
  color: var(--text-muted);
}

.flow-arrow {
  align-self: center;
  font-size: 1.8rem;
  color: var(--secondary);
}

/* Video Suggestion */
.video-suggestion {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 0;
  margin: 2rem 0;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.video-suggestion > i {
  display: none;
}

/* The card itself keeps padding: 0 because of the variant below, so the wrapper
   is what insets the title and the quote. Without this the text sat against the
   border on all 63 measures that use the plain block. */
.video-suggestion > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
}

/* One measure uses a richer block whose thumbnail runs edge to edge and whose
   heading and disclaimer strip pad themselves; padding the wrapper would inset
   the image and double pad the rest. */
.video-suggestion > div:has(.video-suggestion-content) {
  gap: 0;
  padding: 0;
}

.video-suggestion-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.video-suggestion-content::before {
  content: "\f03d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.video-suggestion-content h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  line-height: 1.5;
  flex: 1;
}

.video-suggestion h4 {
  display: inline;
  margin: 0;
  color: var(--text-primary);
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  line-height: 1.6;
}

.video-suggestion p {
  display: inline;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.6;
}

.video-suggestion-image {
  width: 100%;
  height: auto;
  display: block;
  border-top: 1px solid var(--border-light);
}

.video-disclaimer {
  margin: 0;
  padding: 1rem 1.5rem;
  font-size: var(--measure-meta-size, 0.8rem);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  background: var(--bg-hover);
  border-top: 1px solid var(--border-light);
}

/* Proposal Quote */
.proposal-quote {
  background: #f8fafc;
  border-left: 4px solid var(--secondary);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.proposal-quote h4 {
  margin-top: 0;
  color: var(--primary);
  font-size: var(--measure-body-size, 0.95rem);
  margin-bottom: 1rem;
}

.proposal-quote p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.7;
}

/* Highlight Box. The "what this means for you" callout. The lead-in prose, the
   sub heading and the list of concrete points each get their own visual layer,
   otherwise the whole thing reads as one undifferentiated block of text. */
.highlight-box {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(37, 99, 235, 0.05)
  );
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-left: 3px solid var(--secondary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
}

/* One spacing rule for every direct child, so prose, headings, charts, lists
   and tables all breathe the same regardless of the order a measure uses. */
.highlight-box > * + * {
  margin-top: 0.875rem;
}

/* margin-bottom is reset because .measure-article-content p adds one, which
   would fight the sibling spacing above and leave a gap under the box. */
.highlight-box p {
  margin-bottom: 0;
  color: var(--text-primary);
  line-height: 1.7;
  font-size: var(--measure-body-size, 0.95rem);
}

/* The opening sentence carries the point, so let it lead. */
.highlight-box > p:first-child {
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 500;
}

/* A closing aside such as "Nu lux, dar demnitate." */
.highlight-box > p > em:only-child {
  color: var(--text-secondary);
  font-size: var(--measure-meta-size, 0.8rem);
}

.highlight-box h4 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: var(--measure-body-size, 0.95rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
}

.highlight-box h4 i {
  color: var(--secondary);
  font-size: 0.95em;
}

/* Unclassed lists turn into chips: short entries line up side by side, while a
   long explanation still claims a full row. Lists that carry their own class,
   such as .impact-list, keep the layout that class defines. */
.highlight-box ul:not([class]) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.highlight-box ul:not([class]) > li {
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
  position: relative;
  padding: 0.625rem 0.875rem 0.625rem 2.125rem;
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: var(--radius-md);
  font-size: var(--measure-body-size, 0.95rem);
  line-height: 1.55;
  color: var(--text-primary);
}

.highlight-box ul:not([class]) > li::before {
  content: "\2713";
  position: absolute;
  left: 0.875rem;
  color: var(--secondary);
  font-weight: 700;
}

.highlight-box ul:not([class]) > li strong {
  color: var(--text-primary);
}

/* Comparison tables, for the measures that answer with "before vs. after". */
.highlight-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--measure-body-size, 0.95rem);
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.highlight-box th {
  padding: 0.625rem 0.875rem;
  background: rgba(59, 130, 246, 0.08);
  font-size: var(--measure-meta-size, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

.highlight-box th:first-child {
  text-align: left;
}

.highlight-box td {
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
  text-align: center;
}

.highlight-box td:first-child {
  text-align: left;
}

.highlight-box td.yes {
  color: var(--success);
  font-weight: 700;
}

.highlight-box td.no {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 600px) {
  .highlight-box {
    padding: 1.125rem;
  }

  .highlight-box > p:first-child {
    font-size: var(--measure-body-size, 0.95rem);
  }

  /* One chip per row, the side by side layout gets too tight to read. */
  .highlight-box ul:not([class]) > li {
    min-width: 100%;
  }
}

/* ========================================
   DARK MODE - ARTICLE COMPONENTS
======================================== */
html.dark .benefits-grid .benefit-item {
  background: rgba(59, 130, 246, 0.13);
  border-color: var(--border-light);
}

html.dark .benefits-grid .benefit-item:hover {
  box-shadow: var(--shadow-lg);
  background: rgba(59, 130, 246, 0.19);
}

html.dark .proposal-quote,
html.dark .argument,
html.dark .faq-item,
html.dark .impact-list li {
  background: rgba(42, 157, 143, 0.08);
  border-color: var(--border-light);
}

html.dark .argument {
  border-color: rgba(52, 211, 153, 0.3);
}

/* The left accent stays blue in dark mode, it is what ties the box to the
   chips and headings inside it. */
html.dark .highlight-box {
  background: rgba(42, 157, 143, 0.08);
  border-color: var(--border-light);
  border-left-color: var(--secondary);
}

html.dark .highlight-box ul:not([class]) > li,
html.dark .highlight-box table {
  background: rgba(15, 23, 42, 0.35);
  border-color: var(--border-light);
}

html.dark .highlight-box th {
  background: rgba(59, 130, 246, 0.12);
}

html.dark .example-card,
html.dark .case-study,
html.dark .infographic-card,
html.dark .video-suggestion {
  background: var(--bg-card);
  border-color: var(--border-light);
}

html.dark .question-item {
  background: transparent;
}

html.dark .proposal-quote h4,
html.dark .highlight-box p,
html.dark .benefit-item h4,
html.dark .argument h4,
html.dark .faq-question h4,
html.dark .example-header h4,
html.dark .person-info h4 {
  color: var(--text-primary);
}

/* The light theme hairline is a dark one; on a dark card it would disappear and a
   flag with white in it would bleed into the background. */
html.dark .example-flag {
  box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.22);
}

html.dark .question-item p {
  color: var(--text-primary);
}

html.dark .question-item i {
  background: var(--secondary);
  color: white;
}

html.dark .proposal-quote p,
html.dark .argument p,
html.dark .faq-answer p,
html.dark .example-card p,
html.dark .case-study p,
html.dark .video-suggestion p,
html.dark .chart-note {
  color: var(--text-secondary);
}

html.dark .video-suggestion h4 {
  color: var(--text-primary);
}

html.dark .video-suggestion-content h3 {
  color: var(--text-primary);
}

html.dark .video-disclaimer {
  background: var(--bg-hover);
  color: var(--text-muted);
  border-color: var(--border-light);
}

html.dark .content-tag {
  background: #1e252b;
  color: #b0b8c1;
}

html.dark .bar-track {
  background: #172033;
  border-color: var(--border-medium);
}

html.dark .compare-side {
  background: rgba(15, 23, 42, 0.45);
  border-color: var(--border-light);
}

html.dark .infographic-tab {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--text-primary);
}

html.dark .infographic-tab.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

html.dark .flow-step {
  background: var(--bg-card);
  border-color: var(--border-light);
}

/* ========================================
   OTV Community Prototype
======================================== */
.simulation-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #927100;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.otv-home-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
  padding: 2rem;
  background: #101010;
  color: #fff;
  border-left: 4px solid #facc15;
  border-radius: 6px;
}

.otv-home-copy h2,
.otv-home-status strong {
  color: #fff;
}

.otv-home-copy h2 { margin: 0 0 0.6rem; font-size: 1.6rem; }
.otv-home-copy p { margin: 0; color: #b7b7b7; line-height: 1.65; }
.otv-home-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.35rem; }

.otv-primary-btn,
.otv-secondary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.otv-primary-btn { background: #facc15; color: #111; }
.otv-primary-btn:hover { background: #eab308; color: #111; }
.otv-secondary-btn { background: transparent; color: var(--text-primary); border-color: var(--border-light); }
.otv-home-band .otv-secondary-btn { color: #fff; border-color: #4a4a4a; }
.otv-home-status { padding-left: 1.5rem; border-left: 1px solid #383838; display: grid; gap: 0.65rem; }
.otv-home-status small { color: #9d9d9d; }

.live-pill {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  background: #e11d48;
  color: #fff;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
}
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

.otv-community-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.otv-community-header h1 { margin: 0 0 0.5rem; font-family: "Poppins", sans-serif; font-size: 2.1rem; color: var(--text-primary); }
.otv-community-header p { margin: 0; max-width: 720px; color: var(--text-secondary); line-height: 1.65; }
.otv-interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.5rem; }
.otv-interest-grid a { min-width: 0; display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-primary); text-decoration: none; }
.otv-interest-grid a:hover { border-color: #d4a800; background: color-mix(in srgb, #facc15 6%, var(--bg-card)); }
.otv-interest-grid a > i { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 4px; background: rgba(250,204,21,.16); color: #9a7800; }
.otv-interest-grid a > span { min-width: 0; display: grid; gap: 0.18rem; }
.otv-interest-grid strong { font-size: 0.82rem; }
.otv-interest-grid small { overflow: hidden; color: var(--text-muted); font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.otv-community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.otv-main-column { min-width: 0; }

.otv-live-player,
.classic-feature {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: #111;
  border-radius: 6px;
  color: #fff;
}
.otv-player-image,
.classic-feature-image,
.otv-classic-promo-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/otv/community-cover.jpeg');
  background-size: cover;
  background-position: center;
}
.otv-player-image { filter: brightness(0.55) saturate(0.75); transform: scale(1.02); }
.otv-player-shade,
.classic-feature-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.2)); }
.otv-live-meta { position: absolute; left: 2rem; bottom: 2rem; max-width: 520px; z-index: 2; }
.otv-live-meta h2 { margin: 0.85rem 0 0.5rem; color: #fff; font-size: 1.7rem; }
.otv-live-meta p { margin: 0 0 1rem; color: #d2d2d2; line-height: 1.55; }
.otv-live-meta div { color: #bdbdbd; font-size: 0.85rem; display: flex; gap: 0.45rem; }
.otv-play-btn {
  position: absolute;
  right: 2rem;
  top: 50%;
  translate: 0 -50%;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #facc15;
  color: #111;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 3;
}
.otv-play-btn.playing { background: #fff; }
.otv-now-playing { position: absolute; right: 1rem; top: 1rem; z-index: 2; color: #d4d4d4; font-size: 0.75rem; }

.otv-section-block { margin-top: 2.5rem; }
.otv-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.otv-section-heading span,
.otv-eyebrow,
.classic-feature-copy > span,
.classic-watch-party span { color: #927100; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.5px; }
.otv-section-heading h2 { margin: 0.25rem 0 0; color: var(--text-primary); font-size: 1.3rem; }
.otv-text-btn { border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.82rem; cursor: pointer; }
.otv-proposals-list { display: grid; gap: 0.8rem; }
.otv-proposal-card { padding: 1.25rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.otv-proposal-topline { display: flex; justify-content: space-between; gap: 1rem; }
.otv-topic { color: #806400; font-size: 0.72rem; font-weight: 700; }
.otv-stage { color: var(--text-muted); font-size: 0.72rem; }
.otv-proposal-card h3 { margin: 0.65rem 0 0.45rem; color: var(--text-primary); font-size: 1.05rem; }
.otv-proposal-card > p { margin: 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.otv-author-row { display: flex; align-items: center; gap: 0.55rem; margin: 1rem 0; color: var(--text-muted); font-size: 0.76rem; }
.otv-author-row > span:last-child { margin-left: auto; }
.otv-mini-avatar,
.otv-user-avatar { display: grid; place-items: center; flex: 0 0 auto; background: #facc15; color: #111; font-weight: 800; border-radius: 50%; }
.otv-mini-avatar { width: 28px; height: 28px; font-size: 0.65rem; }
.otv-user-avatar { width: 34px; height: 34px; font-size: 0.72rem; }
.demo-status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #10b981; }
.otv-threshold > div:first-child { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.72rem; }
.otv-progress { height: 6px; margin: 0.5rem 0 0.9rem; overflow: hidden; background: var(--bg-hover); border-radius: 3px; }
.otv-progress span { display: block; height: 100%; background: #facc15; }
.otv-support-btn { width: 100%; padding: 0.65rem; border: 1px solid var(--border-light); border-radius: 5px; background: transparent; color: var(--text-primary); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.otv-support-btn.supported { border-color: #16a34a; background: rgba(22,163,74,.08); color: #15803d; }

.otv-community-rail { display: grid; gap: 1rem; }
.otv-leader-panel { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.otv-leader-image { aspect-ratio: 16/7; background: url('assets/otv/dan-diaconescu-direct.jpg') center/cover; }
.otv-leader-copy { padding: 1rem; }
.otv-leader-copy h3 { margin: 0.3rem 0; color: var(--text-primary); font-size: 1.15rem; }
.otv-leader-copy p { margin: 0 0 0.75rem; color: var(--text-secondary); font-size: 0.78rem; line-height: 1.5; }
.otv-leader-copy .otv-text-btn { padding: 0; color: #927100; font-weight: 700; }
.otv-news-panel { padding: 1.15rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.otv-news-panel > a { display: grid; gap: 0.25rem; padding: 0.75rem 0; border-top: 1px solid var(--border-light); color: var(--text-primary); text-decoration: none; }
.otv-news-panel > a small { color: var(--text-muted); font-size: 0.6rem; }
.otv-news-panel > a strong { font-size: 0.78rem; line-height: 1.4; }
.otv-poll-panel,
.otv-members-panel { padding: 1.15rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.otv-poll-panel h3 { color: var(--text-primary); font-size: 1rem; line-height: 1.45; }
.otv-poll-options { display: grid; gap: 0.55rem; }
.otv-poll-options button { display: flex; justify-content: space-between; padding: 0.7rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-main); color: var(--text-primary); cursor: pointer; }
.otv-poll-options button.selected { border-color: #c59a00; box-shadow: inset 4px 0 #facc15; }
.otv-poll-panel > small { display: block; margin-top: 0.75rem; color: var(--text-muted); font-size: 0.68rem; }
.otv-section-heading.compact { margin-bottom: 0.75rem; }
.otv-member { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0; border-top: 1px solid var(--border-light); }
.otv-member div { display: grid; gap: 0.15rem; min-width: 0; }
.otv-member strong { color: var(--text-primary); font-size: 0.8rem; }
.otv-member small { color: var(--text-muted); font-size: 0.68rem; }
.member-online { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #10b981; }
.otv-classic-promo { position: relative; min-height: 220px; padding: 1.25rem; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px; color: #fff; text-decoration: none; }
.otv-classic-promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0,0,0,.95)); }
.otv-classic-promo > *:not(.otv-classic-promo-image) { position: relative; z-index: 2; }
.otv-classic-promo span { color: #facc15; font-size: 0.65rem; font-weight: 800; }
.otv-classic-promo h3 { margin: 0.3rem 0; color: #fff; }
.otv-classic-promo p { margin: 0 0 0.75rem; color: #d1d1d1; font-size: 0.78rem; }
.otv-classic-promo strong { color: #facc15; font-size: 0.78rem; }

.classic-feature { min-height: 500px; }
.classic-feature-image { filter: brightness(.48) saturate(.65); }
.classic-feature-copy { position: absolute; left: 2.5rem; bottom: 2.5rem; z-index: 2; max-width: 580px; }
.classic-feature-copy h2 { margin: 0.6rem 0; color: #fff; font-size: 2rem; }
.classic-feature-copy p { color: #d0d0d0; line-height: 1.6; }
.classic-duration { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; padding: 0.25rem 0.4rem; background: rgba(0,0,0,.8); border-radius: 3px; font-size: 0.72rem; }
.classic-library { margin-bottom: 2.5rem; }
.classic-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.classic-filters button { border: 0; padding: 0.45rem 0.65rem; border-radius: 4px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.classic-filters button.active { background: var(--text-primary); color: var(--bg-card); }
.classic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.classic-card { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.classic-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16/10; background: url('assets/otv/community-cover.jpeg') center/240% auto; border-radius: 5px; overflow: hidden; color: #fff; }
.classic-thumb::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.2); }
.classic-thumb i { position: relative; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.72); }
.classic-thumb small { position: absolute; right: 0.4rem; bottom: 0.4rem; z-index: 2; padding: 0.18rem 0.3rem; background: #111; border-radius: 2px; }
.classic-card-copy { display: grid; gap: 0.25rem; margin-top: 0.65rem; }
.classic-card-copy strong { color: var(--text-primary); font-size: 0.86rem; }
.classic-card-copy small { color: var(--text-muted); }
.classic-watch-party { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.5rem 0; border-top: 1px solid var(--border-light); }
.classic-watch-party h2 { margin: 0.4rem 0; color: var(--text-primary); font-size: 1.3rem; }
.classic-watch-party p { margin: 0; color: var(--text-secondary); }
.classic-watch-party .confirmed { border-color: #16a34a; color: #15803d; }

.reforms-category-grid { margin-top: 0.5rem; }

.proposal-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 1.25rem; padding: 3px; background: var(--bg-hover); border-radius: 6px; }
.proposal-type-switch button { padding: 0.6rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.proposal-type-switch button.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.proposal-success { display: grid; justify-items: center; gap: 0.5rem; padding: 1.5rem 0 0.5rem; text-align: center; }
.proposal-success > i { color: #16a34a; font-size: 3rem; margin-bottom: 0.35rem; }
.proposal-success h3 { margin: 0; font-family: 'Poppins', sans-serif; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--text-primary); }
.proposal-success p { margin: 0; max-width: 40ch; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.proposal-success .btn { margin-top: 1.25rem; }

html.dark .simulation-label,
html.dark .otv-section-heading span,
html.dark .otv-eyebrow { color: #facc15; }

@media (max-width: 1050px) {
  .otv-interest-grid { grid-template-columns: repeat(2, 1fr); }
  .otv-community-layout { grid-template-columns: 1fr; }
  .otv-community-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .otv-classic-promo { min-height: 240px; }
  .classic-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .otv-interest-grid { grid-template-columns: 1fr; }
  .otv-home-band { grid-template-columns: 1fr; padding: 1.25rem; }
  .otv-home-status { padding: 1rem 0 0; border-left: 0; border-top: 1px solid #383838; }
  .otv-community-header { align-items: stretch; flex-direction: column; }
  .otv-community-header .otv-primary-btn { width: 100%; }
  .otv-community-layout,
  .otv-community-rail { display: grid; grid-template-columns: 1fr; }
  .otv-live-player { min-height: 390px; }
  .otv-live-meta { left: 1.1rem; right: 1.1rem; bottom: 1.1rem; }
  .otv-live-meta h2 { font-size: 1.35rem; }
  .otv-play-btn { right: 1rem; top: 1rem; translate: 0; width: 48px; height: 48px; }
  .otv-now-playing { display: none; }
  .otv-section-heading { align-items: flex-start; flex-direction: column; }
  .classic-feature { min-height: 440px; }
  .classic-feature-copy { left: 1.25rem; right: 1.25rem; bottom: 1.5rem; }
  .classic-feature-copy h2 { font-size: 1.45rem; }
  .classic-grid { grid-template-columns: 1fr; }
  .classic-watch-party { align-items: flex-start; flex-direction: column; }
  .classic-watch-party .otv-secondary-btn { width: 100%; }
}

/* ========================================
   RESPONSIVE - ARTICLE COMPONENTS
======================================== */
@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .benefit-item {
    padding: 1rem;
  }

  .video-suggestion > div {
    padding: 1rem;
  }

  .video-suggestion-content {
    padding: 1rem;
  }

  .video-suggestion-content::before {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.1rem;
  }

  .quote {
    padding: 2rem 1.5rem;
  }

  .quote::before {
    font-size: 80px;
    top: -5px;
    left: 10px;
  }

  .quote p {
    font-size: var(--measure-body-size, 0.95rem);
  }

  .quote cite {
    font-size: var(--measure-meta-size, 0.8rem);
  }
}

/* ========================================
   Cum funcționează Page Content Styles
   ======================================== */

.measure-article section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.measure-article section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.measure-article h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.measure-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary, #475569);
  margin: 0 0 0.875rem;
}

.measure-article p:last-child {
  margin-bottom: 0;
}

.measure-article ul,
.measure-article ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary, #475569);
}

.measure-article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.measure-article li:last-child {
  margin-bottom: 0;
}

.measure-article strong {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}

.measure-article em {
  color: var(--text-muted, #64748b);
}

.measure-article blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary, #f8fafc);
  border-left: 3px solid var(--secondary, #3b82f6);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.measure-article blockquote p {
  margin: 0;
}

.measure-article blockquote strong {
  color: var(--secondary, #3b82f6);
}

/* Override - ensure section styling is applied */
.measure-page-main .measure-article section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.measure-page-main .measure-article section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.measure-page-main .measure-article section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.measure-page-main .measure-article section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 1rem;
}

.measure-page-main .measure-article section ul,
.measure-page-main .measure-article section ol {
  margin: 1rem 0 1.25rem;
  padding-left: 1.75rem;
}

.measure-page-main .measure-article section li {
  margin-bottom: 0.6rem;
  line-height: 1.75;
  color: #475569;
}

.measure-page-main .measure-article section blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to right, #eff6ff, #f8fafc);
  border-left: 4px solid #3b82f6;
  border-radius: 0 10px 10px 0;
}

.measure-page-main .measure-article section blockquote p {
  margin: 0;
  color: #1e40af;
  font-size: 0.95rem;
}

.measure-page-main .measure-article section blockquote strong {
  color: #1e40af;
}

.measure-page-main .measure-article section blockquote em {
  color: #3b82f6;
}

/* Footer disabled links */
.footer-link-disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
  font-size: 0.95rem;
}

/* Footer disclaimer */
.footer-disclaimer {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* ========================================
   Dev Auth Screen
======================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.auth-container {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    to right,
    #5483e0 0%,
    #5483e0 33.33%,
    #fcd116 33.33%,
    #fcd116 66.66%,
    #ef5f6f 66.66%,
    #ef5f6f 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  font-family: "Poppins", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  font-family: "Poppins", sans-serif;
}

.auth-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.auth-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0 0 2rem;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper i {
  position: absolute;
  left: 1rem;
  color: #64748b;
  font-size: 1rem;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.auth-input-wrapper input::placeholder {
  color: #64748b;
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin: 0;
  min-height: 1.25rem;
}

.auth-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-footer {
  color: #64748b;
  font-size: 0.8rem;
  margin: 2rem 0 0;
}

/* ========================================
   RAPORT DIRECT NEWS
======================================== */
.rd-news-page {
  position: relative;
  width: min(100%, 1200px);
  margin: 0 auto;
  color: var(--text-primary);
}

.rd-page-header {
  display: grid;
  grid-template-areas: "heading actions";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.rd-page-heading { grid-area: heading; }

.rd-page-header h1 {
  margin: 0.45rem 0 0.25rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.rd-page-header p {
  color: var(--text-secondary);
  line-height: 1.5;
}

.rd-header-actions {
  grid-area: actions;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rd-refresh-btn,
.rd-options-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.rd-refresh-btn:hover,
.rd-options-btn:hover,
.rd-options-btn[aria-expanded="true"] {
  color: var(--secondary);
  border-color: var(--secondary);
  background: var(--bg-hover);
}

.rd-options-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 48px;
  z-index: 40;
  min-width: 245px;
  padding: 0.4rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}

.rd-options-menu button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.rd-options-menu button:hover {
  background: var(--bg-hover);
  color: var(--secondary);
}

.rd-summary-toggle-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.rd-summary-toggle-copy strong {
  color: var(--text-primary);
  font-size: 0.8rem;
}

.rd-summary-toggle-copy small {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 500;
}

.rd-switch {
  width: 34px;
  height: 20px;
  flex: 0 0 34px;
  padding: 2px;
  border-radius: 10px;
  background: var(--border-medium);
  transition: background var(--transition-fast);
}

.rd-switch span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform var(--transition-fast);
}

.rd-summary-toggle[aria-checked="true"] .rd-switch {
  background: var(--secondary);
}

.rd-summary-toggle[aria-checked="true"] .rd-switch span {
  transform: translateX(14px);
}

.rd-refresh-btn i {
  display: inline-block;
  transform-origin: center;
}

.rd-refresh-btn.is-loading i,
.rd-refresh-btn[aria-busy="true"] i {
  animation: rd-spin 0.9s linear infinite;
}

@keyframes rd-spin {
  to { transform: rotate(360deg); }
}

.rd-category-switcher {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto 1.25rem;
  padding: 0.3rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.rd-category-switcher button {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.rd-category-switcher button:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  width: 1px;
  height: 24px;
  background: var(--border-light);
}

.rd-category-switcher button {
  position: relative;
}

.rd-category-switcher button:hover:not(.active) {
  background: var(--bg-hover);
}

.rd-category-switcher button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.rd-category-switcher strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.rd-category-switcher button.active {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.24);
}

.rd-category-switcher button.active::before {
  display: none;
}

.rd-category-switcher button.active + button::before {
  display: none;
}

.rd-category-switcher button.active strong {
  color: #fff;
}

html.dark .rd-category-switcher button.active {
  background: #3b82f6;
}

.rd-brief-bubble {
  position: relative;
  max-width: 720px;
  margin: 1.5rem auto 0;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: #1e3a5f;
}

.rd-brief-bubble::after {
  content: "";
  position: absolute;
  left: 38px;
  top: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid #bfdbfe;
  border-top: 1px solid #bfdbfe;
  background: #eff6ff;
  transform: rotate(45deg);
}

.rd-brief-bubble span {
  display: block;
  margin-bottom: 0.25rem;
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 800;
}

.rd-brief-bubble p {
  font-size: 0.88rem;
  line-height: 1.45;
}

html.dark .rd-brief-bubble {
  border-color: #315a8d;
  background: #172b46;
  color: #dbeafe;
}

html.dark .rd-brief-bubble::after { border-color: #315a8d; background: #172b46; }

.rd-hero {
  text-align: center;
  padding: 0.75rem 0 2.5rem;
}

.rd-hero-frame {
  position: relative;
  width: min(690px, calc(100% - 2rem));
  min-height: 260px;
  display: block;
  margin: 0 auto 2rem;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  transform: rotate(-1.2deg);
}

.rd-hero-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 370px;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rd-hero-frame.loaded img { opacity: 1; }

.rd-hero-skeleton {
  position: absolute;
  inset: 12px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 45%, #e2e8f0 65%);
  background-size: 200% 100%;
  animation: rd-shimmer 1.25s infinite;
}

.rd-hero-frame.loaded .rd-hero-skeleton { display: none; }

@keyframes rd-shimmer {
  to { background-position: -200% 0; }
}

.rd-hero h2 {
  max-width: 900px;
  margin: 0 auto 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.rd-hero h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.rd-hero-meta,
.rd-news-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.rd-hero-meta { justify-content: center; }

.rd-important-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.rd-important-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-top: 3px solid #3b82f6;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.rd-important-card a {
  display: block;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.rd-important-card div {
  margin: 0.45rem 0;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.rd-important-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.casa-publica-editorial-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  border-top-color: #b88222;
}

.rd-important-card .casa-publica-editorial-title {
  color: var(--text-primary);
}

.rd-important-card .casa-publica-editorial-meta {
  margin: 0.55rem 0;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.casa-publica-editorial-meta i { color: #b88222; }

.casa-publica-editorial-card > p {
  margin-bottom: 1rem;
}

.rd-important-card .casa-publica-measure-link {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: Inter, sans-serif;
  font-size: 0.64rem;
}

.casa-publica-measure-link > span {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rd-important-card .casa-publica-measure-link > a {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: #2563eb;
  font-family: Inter, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.casa-publica-measure-link > a i {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.casa-publica-editorial-empty {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-align: center;
}

.rd-news-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}

.rd-news-column {
  min-width: 0;
}

.rd-news-item {
  position: relative;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.rd-news-item:first-child { padding-top: 0; }

.rd-news-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-hover);
}

.rd-headline {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.rd-headline:hover,
.rd-important-card a:hover,
.rd-hero h2 a:hover { color: var(--secondary); }

.rd-news-item.rd-ultra .rd-headline { color: #dc2626; }
.rd-news-item.rd-very-important .rd-headline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rd-news-item.rd-important .rd-headline { color: #dc2626; }

.rd-summary-btn {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-family: Georgia, serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--transition-fast), background var(--transition-fast);
}

.rd-summary-btn:hover,
.rd-summary-btn:focus-visible {
  opacity: 1;
  background: var(--bg-hover);
}

.rd-summary-popup {
  position: absolute;
  z-index: 300;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  font-size: 0.82rem;
  line-height: 1.5;
}

.rd-news-description {
  display: none;
  overflow: hidden;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rd-news-page.rd-show-article-descriptions .rd-news-description {
  display: -webkit-box;
}

.rd-quote {
  max-width: 760px;
  margin: 2.5rem auto 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.rd-quote span {
  color: var(--secondary);
  font-size: 0.68rem;
  font-weight: 800;
}

.rd-quote blockquote {
  margin: 0.65rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.35;
}

.rd-quote cite { color: var(--text-secondary); font-size: 0.8rem; }

.rd-updated {
  padding: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
}

.rd-news-error {
  grid-column: 1 / -1;
  padding: 4rem 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.rd-news-error i { margin-bottom: 0.75rem; color: #ef4444; font-size: 2rem; }
.rd-news-error h3 { margin-bottom: 0.4rem; color: var(--text-primary); }

@media (max-width: 960px) {
  .rd-category-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-category-switcher button:nth-child(3)::before { display: none; }
  .rd-news-columns { gap: 1.25rem; }
}

@media (max-width: 720px) {
  .rd-page-header h1 { font-size: 1.7rem; }
  .rd-page-header p { font-size: 0.88rem; }
  .rd-category-switcher { gap: 0; }
  .rd-category-switcher button { min-height: 42px; padding: 0.5rem; }
  .rd-hero { padding-top: 0.25rem; }
  .rd-hero-frame { min-height: 180px; padding: 7px; margin-bottom: 1.35rem; }
  .rd-hero-skeleton { inset: 7px; }
  .rd-hero h2 { font-size: 1.65rem; }
  .rd-important-strip,
  .rd-news-columns { grid-template-columns: 1fr; }
  .rd-important-strip { gap: 0.65rem; }
  .rd-news-columns { gap: 0; }
  .rd-news-column + .rd-news-column { margin-top: 0; }
  .rd-headline { font-size: 1.08rem; }
  .rd-updated { text-align: center; }
}

/* ========================================
   NOVA EDITORIAL
======================================== */
.editorial-page-header { align-items: end; }
.editorial-eyebrow {
  display: inline-block;
  color: #9a6b16;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.editorial-count {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.editorial-hero-summary {
  max-width: 720px;
  margin: 0.9rem auto 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}
.editorial-image-placeholder {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #f8ead0, #d8c19a);
  color: rgba(90, 60, 18, 0.52);
  font-size: 4rem;
}
.editorial-columns .rd-news-description { display: -webkit-box; }
.editorial-page .rd-important-card.rd-ultra { border-top-color: #dc2626; }
.editorial-page .rd-important-card.rd-ultra > a,
.editorial-page .rd-important-card.rd-important > a { color: #dc2626; }
.editorial-measure-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin: 0.65rem 0;
}
.editorial-hero .editorial-measure-links { justify-content: center; }
.editorial-measure-label {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.editorial-measure-label i { margin-right: 0.35rem; color: #3b82f6; }
.editorial-measure-chips {
  display: flex;
  align-items: center;
  justify-content: inherit;
  gap: 0.4rem;
  min-width: 0;
}
.editorial-measure-chips a,
.editorial-page .rd-important-card .editorial-measure-chips a {
  min-width: 0;
  max-width: 420px;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  overflow: hidden;
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-family: Inter, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editorial-measure-chips a:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.14); }
.editorial-measure-chips a i { flex: 0 0 auto; }
.editorial-measure-more {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}
.editorial-page .rd-important-card .editorial-measure-links,
.editorial-page .rd-important-card .editorial-measure-chips {
  margin: 0.55rem 0;
  color: inherit;
  font-size: inherit;
}
.editorial-reader-header .editorial-measure-links {
  flex-direction: column;
  justify-content: center;
  margin-top: 1rem;
}
.editorial-reader-header .editorial-measure-chips { flex-wrap: wrap; }
.editorial-reader-header .editorial-measure-chips a { max-width: none; white-space: normal; }

.editorial-reader {
  width: min(100%, 860px);
  margin: 0 auto;
  color: var(--text-primary);
}
.editorial-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.editorial-back:hover { color: var(--secondary); }
.editorial-reader-header { text-align: center; }
.editorial-reader-header h1 {
  max-width: 820px;
  margin: 0.65rem auto 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.editorial-reader-topic {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}
.editorial-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.editorial-byline i { color: #b88222; }
.editorial-byline strong { color: var(--text-primary); }
.editorial-byline span::before { content: '·'; margin-right: 0.5rem; }
.editorial-reader-image {
  margin: 2.25rem 0;
  padding: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  transform: rotate(-0.5deg);
}
.editorial-reader-image img {
  width: 100%;
  max-height: 560px;
  display: block;
  object-fit: cover;
}
.editorial-reader-body {
  max-width: 720px;
  margin: 2rem auto 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  line-height: 1.82;
}
.editorial-reader-body p { margin: 0 0 1.45em; }
.editorial-reader-body h2 { margin: 2em 0 0.7em; font-size: 1.45rem; line-height: 1.3; }
.editorial-reader-body ul { margin: 0 0 1.5em; padding-left: 1.4rem; }
.editorial-sources {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.editorial-sources h2 { margin-bottom: 0.75rem; font-size: 1rem; }
.editorial-sources ol { padding-left: 1.25rem; }
.editorial-sources li { margin: 0.45rem 0; color: var(--text-secondary); font-size: 0.82rem; }
.editorial-sources a { color: var(--secondary); overflow-wrap: anywhere; }
.editorial-reader-state {
  min-height: 45vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}
.editorial-reader-state > i { color: #ef4444; font-size: 2rem; }

@media (max-width: 720px) {
  .editorial-page-header { align-items: center; }
  .editorial-count { display: none; }
  .editorial-reader-header { text-align: left; }
  .editorial-reader-topic { margin: 0; }
  .editorial-byline { justify-content: flex-start; flex-wrap: wrap; }
  .editorial-reader-header .editorial-measure-links { align-items: flex-start; justify-content: flex-start; flex-direction: column; }
  .editorial-reader-header .editorial-measure-chips { justify-content: flex-start; }
  .editorial-reader-image { margin-inline: -0.5rem; padding: 6px; }
  .editorial-reader-body { line-height: 1.72; }
}

/* ========================================
   COMMUNITY LEADERBOARD PAGE
======================================== */
.leaderboard-page-header { margin-bottom: 1.5rem; }
.page-eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .65rem; color: #2563eb; font-size: .72rem; font-weight: 700; }

.leaderboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
  gap: .65rem;
}

.leaderboard-summary div {
  min-width: 0;
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: .65rem;
  align-items: center;
  padding: .65rem .8rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
}
.leaderboard-summary span { grid-row: 1 / 3; display: block; color: var(--text-primary); font-size: 1.25rem; font-weight: 750; line-height: 1; }
.leaderboard-summary small { display: block; align-self: center; color: var(--text-muted); font-size: .68rem; line-height: 1.25; }

.leaderboard-page-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 1.25rem; align-items: start; }
.leaderboard-page-grid > *,
.leaderboard-ranking-panel,
.leaderboard-full-list { min-width: 0; }
.leaderboard-ranking-panel,
.leaderboard-activity-panel,
.leaderboard-method-panel { border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.leaderboard-ranking-panel { overflow: hidden; }

.leaderboard-ranking-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--border-light); }
.leaderboard-ranking-header h2,
.leaderboard-side-panel h2 { margin: 0; color: var(--text-primary); font-size: 1rem; }
.leaderboard-ranking-header p { margin: .3rem 0 0; color: var(--text-muted); font-size: .78rem; }

.leaderboard-view-switch { display: grid; grid-template-columns: repeat(3, auto); gap: .25rem; padding: .25rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-secondary); }
.leaderboard-view-switch button { min-height: 32px; padding: .35rem .65rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.leaderboard-view-switch button.active { background: #2563eb; color: #fff; box-shadow: 0 2px 5px rgba(37,99,235,.2); }

.leaderboard-table-head,
.leaderboard-full-row { display: grid; grid-template-columns: 48px minmax(190px, 1.35fr) minmax(180px, 1fr) 100px; gap: .85rem; align-items: center; }
.leaderboard-table-head { padding: .7rem 1.25rem; border-bottom: 1px solid var(--border-light); color: var(--text-muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.leaderboard-full-row { min-height: 78px; margin: 0; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border-light); }
.leaderboard-full-row:last-child { border-bottom: 0; }

.leaderboard-position { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-hover); color: var(--text-secondary); font-size: .75rem; font-weight: 700; }
.leaderboard-position.top-1 { background: #f59e0b; color: #fff; }
.leaderboard-position.top-2 { background: #64748b; color: #fff; }
.leaderboard-position.top-3 { background: #f97316; color: #fff; }

.leaderboard-person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.leaderboard-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--leader-color) 16%, var(--bg-card)); color: #fff; font-size: .72rem; font-weight: 800; text-shadow: 0 1px 2px rgba(15, 23, 42, .45); }
.leaderboard-person > span:last-child { min-width: 0; }
.leaderboard-person strong { display: block; overflow: hidden; color: var(--text-primary); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-person small { display: block; margin-top: .18rem; overflow: hidden; color: var(--text-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

.leaderboard-contributions { display: flex; flex-direction: column; gap: .28rem; color: var(--text-secondary); font-size: .7rem; }
.leaderboard-contributions i { width: 15px; color: #94a3b8; }
.leaderboard-score { position: relative; display: grid; justify-items: end; padding-right: 28px; }
.leaderboard-score strong { color: #0f9f8f; font-size: .9rem; }
.leaderboard-score small { color: var(--text-muted); font-size: .65rem; }
.leader-trend { position: absolute; right: 0; top: 50%; display: inline-flex; align-items: center; gap: 2px; transform: translateY(-50%); font-size: .63rem; font-weight: 700; }
.leader-trend.up { color: #10b981; }
.leader-trend.down { color: #ef4444; }
.leader-trend.steady { color: #94a3b8; }

.leaderboard-side-panel { display: grid; gap: 1.25rem; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--border-light); }
.panel-heading span { padding: .2rem .45rem; border-radius: 20px; background: rgba(239,68,68,.1); color: #dc2626; font-size: .62rem; font-weight: 700; }
.community-activity-list { padding: 0 1.15rem; }
.community-activity-list > div { display: grid; grid-template-columns: 30px 1fr; gap: .65rem; padding: .9rem 0; border-bottom: 1px solid var(--border-light); }
.community-activity-list > div:last-child { border-bottom: 0; }
.activity-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--activity-color) 15%, var(--bg-card)); color: var(--activity-color); font-size: .62rem; font-weight: 700; }
.community-activity-list p { margin: 0; color: var(--text-secondary); font-size: .72rem; line-height: 1.45; }
.community-activity-list p strong { color: var(--text-primary); }
.community-activity-list time { grid-column: 2; color: var(--text-muted); font-size: .64rem; }

.leaderboard-method-panel { padding: 1.2rem; }
.method-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: .8rem; border-radius: 6px; background: rgba(59,130,246,.1); color: #2563eb; }
.leaderboard-method-panel p { margin: .5rem 0 1rem; color: var(--text-secondary); font-size: .74rem; line-height: 1.5; }
.method-score { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--border-light); color: var(--text-secondary); font-size: .72rem; }
.method-score strong { color: #2563eb; }

@media (max-width: 1230px) {
  .leaderboard-table-head { display: none; }
  .leaderboard-full-row { grid-template-columns: 38px minmax(0, 1fr) 82px; gap: .55rem; padding-inline: .9rem; }
  .leaderboard-contributions { grid-column: 2 / 4; grid-row: 2; flex-direction: row; flex-wrap: wrap; }
  .leaderboard-score { grid-column: 3; grid-row: 1; padding-right: 0; }
}

@media (max-width: 880px) {
  .leaderboard-page-grid { grid-template-columns: 1fr; }
  .leaderboard-side-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .leaderboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leaderboard-ranking-header { flex-direction: column; }
  .leaderboard-view-switch { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .leaderboard-full-row { margin: 0; }
  .leaderboard-side-panel { grid-template-columns: 1fr; }
}

/* ========================================
   DISCUSSIONS FEED
======================================== */
.discussions-page { max-width: 1120px; margin: 0 auto; }
.discussions-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.discussions-header h1 { margin: .35rem 0 .25rem; color: var(--text-primary); font-size: 2rem; }
.discussions-header p { max-width: 680px; margin: 0; color: var(--text-secondary); font-size: .9rem; line-height: 1.55; }
.discussions-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 1.5rem; align-items: start; }
.discussions-main { min-width: 0; }

.discussion-composer-sentinel { height: 1px; margin-bottom: -1px; pointer-events: none; }
.discussion-composer { position: relative; z-index: 12; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .8rem; padding: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); transition: padding var(--transition-fast), box-shadow var(--transition-fast); }
.discussion-composer.is-stuck { position: fixed; top: calc(var(--header-height) + .75rem); left: var(--composer-fixed-left); width: var(--composer-fixed-width); box-shadow: 0 10px 24px rgba(15,23,42,.14); }
.discussion-composer.is-stuck:not(.is-expanded) { grid-template-columns: 36px minmax(0, 1fr); gap: .65rem; padding: .65rem .75rem; }
.discussion-composer.is-stuck:not(.is-expanded) .discussion-avatar { width: 36px; height: 36px; flex-basis: 36px; }
.discussion-composer.is-stuck:not(.is-expanded) textarea { min-height: 40px; height: 40px; padding: .45rem 0; resize: none; overflow: hidden; }
.discussion-composer.is-stuck:not(.is-expanded) .discussion-composer-footer { padding-top: .4rem; }
.discussion-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 50%; background: #e0ecff; color: #2563eb; font-size: .72rem; font-weight: 800; }
.discussion-avatar.is-current { background: #facc15; color: #172033; }
.discussion-composer-body { min-width: 0; }
.discussion-composer textarea { width: 100%; min-height: 76px; resize: vertical; padding: .35rem 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: .95rem; line-height: 1.55; }
.discussion-composer textarea::placeholder { color: var(--text-muted); }
.discussion-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; border-top: 1px solid var(--border-light); }
.discussion-composer-tools { min-width: 0; display: flex; align-items: center; gap: .35rem; }
.discussion-tool { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #2563eb; cursor: pointer; }
.discussion-tool:hover { background: rgba(37,99,235,.08); }
.discussion-composer-tools select { min-width: 0; height: 34px; margin-left: .25rem; padding: 0 1.8rem 0 .65rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: .72rem; }
.discussion-persistence-note { display: inline-flex; align-items: center; gap: .35rem; margin-left: .25rem; color: var(--text-muted); font-size: .68rem; font-weight: 700; }
.discussion-persistence-note i { color: #059669; }
.discussion-compose-submit { display: flex; align-items: center; gap: .7rem; }
.discussion-compose-submit span { color: var(--text-muted); font-size: .68rem; white-space: nowrap; }
.discussion-compose-submit span.near-limit { color: #dc2626; font-weight: 700; }
.discussion-compose-submit button { min-width: 78px; height: 34px; padding: 0 .9rem; border: 0; border-radius: 4px; background: #2563eb; color: #fff; font-size: .76rem; font-weight: 700; cursor: pointer; }
.discussion-compose-submit button:disabled { background: #cbd5e1; color: #fff; cursor: not-allowed; }
.discussion-media-preview { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) 30px; gap: .7rem; align-items: center; margin: .5rem 0 .75rem; padding: .55rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-secondary); }
.discussion-media-preview[hidden] { display: none; }
.discussion-media-preview img,
.discussion-media-preview video { width: 72px; height: 52px; object-fit: cover; border-radius: 4px; background: #111827; }
.discussion-media-preview div { min-width: 0; display: grid; gap: .2rem; }
.discussion-media-preview strong { overflow: hidden; color: var(--text-primary); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.discussion-media-preview span { color: var(--text-muted); font-size: .66rem; }
.discussion-media-preview button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; }

.discussion-feed-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); overflow: hidden; }
.discussion-feed-tabs button { height: 42px; padding: 0 .5rem; border: 0; border-right: 1px solid var(--border-light); background: transparent; color: var(--text-secondary); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; }
.discussion-feed-tabs button:last-child { border-right: 0; }
.discussion-feed-tabs button.active { background: rgba(37,99,235,.08); color: #2563eb; box-shadow: inset 0 -2px #2563eb; }
.discussion-feed { display: grid; gap: .75rem; margin-top: .75rem; }
.discussion-loading,
.discussion-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: .55rem; padding: 2rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-muted); text-align: center; font-size: .8rem; }
.discussion-empty i { font-size: 1.8rem; color: #94a3b8; }
.discussion-empty strong { color: var(--text-primary); font-size: .9rem; }
.discussion-empty button { padding: .5rem .8rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }

.discussion-post { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .8rem; padding: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.discussion-post-body { min-width: 0; }
.discussion-post-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.discussion-post-header > div { min-width: 0; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.discussion-post-header strong { color: var(--text-primary); font-size: .83rem; }
.discussion-author-name { display: inline-flex; align-items: center; gap: .25rem; color: inherit; text-decoration: none; }
.discussion-author-name:hover strong { color: var(--secondary); text-decoration: underline; text-underline-offset: 2px; }
.discussion-avatar-link { color: #2563eb; text-decoration: none; }
.discussion-avatar-link:hover { box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.discussion-avatar img,
.discussion-comment-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.discussion-post-header span { color: var(--text-muted); font-size: .7rem; }
.discussion-verified { color: #2563eb; font-size: .72rem; }
.discussion-topic { display: inline-block; margin-top: .35rem; padding: .18rem .42rem; border-radius: 3px; background: rgba(37,99,235,.08); color: #2563eb; font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.discussion-post-text { margin: .65rem 0 .8rem; color: var(--text-primary); font-size: .88rem; line-height: 1.55; white-space: pre-wrap; }
.discussion-external-link { color: var(--secondary); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.discussion-external-link:hover { color: #2563eb; }
.discussion-video,
.discussion-image { position: relative; width: 100%; display: block; padding: 0; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: #111827; cursor: pointer; }
.discussion-video { aspect-ratio: 16 / 9; }
.discussion-image { max-height: 420px; background: var(--bg-secondary); }
.discussion-video img { width: 100%; height: 100%; display: block; object-fit: cover; }
.discussion-image img { width: 100%; max-height: 420px; display: block; object-fit: cover; }
.discussion-video::after { content: ''; position: absolute; inset: 0; background: rgba(15,23,42,.12); }
.discussion-video-play { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; background: #ef233c; color: #fff; z-index: 2; }
.discussion-video small { position: absolute; left: .65rem; bottom: .65rem; padding: .22rem .42rem; border-radius: 3px; background: rgba(15,23,42,.85); color: #fff; font-size: .58rem; font-weight: 800; z-index: 2; }
.discussion-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #111827; }
.discussion-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.discussion-uploaded-video { width: 100%; max-height: 460px; display: block; border-radius: 6px; background: #111827; }
.discussion-post-actions { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: .35rem; margin-top: .75rem; }
.discussion-post-actions button { min-width: 58px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: 0 .55rem; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); font: inherit; font-size: .68rem; cursor: pointer; }
.discussion-post-actions button:hover { background: var(--bg-hover); color: #2563eb; }
.discussion-post-actions button.supported { color: #e11d48; }
.discussion-post-actions button:disabled { cursor: wait; opacity: .55; }
.discussion-post-actions button b { font-size: inherit; font-weight: 700; }
.discussion-views { justify-self: end; color: var(--text-muted); font-size: .68rem; }
.discussion-inline-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; margin-top: .65rem; }
.discussion-inline-reply[hidden] { display: none; }
.discussion-inline-reply input { min-width: 0; height: 36px; padding: 0 .7rem; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: .74rem; outline: 0; }
.discussion-inline-reply input:focus { border-color: #2563eb; }
.discussion-inline-reply button { padding: 0 .8rem; border: 0; border-radius: 4px; background: #2563eb; color: #fff; font-size: .72rem; font-weight: 700; cursor: pointer; }

.discussion-thread { margin-top: .8rem; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-secondary); }
.discussion-thread[hidden] { display: none; }
.discussion-thread-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .8rem; border-bottom: 1px solid var(--border-light); background: var(--bg-card); }
.discussion-thread-head strong { color: var(--text-primary); font-size: .76rem; }
.discussion-thread-head button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; }
.discussion-thread-list { display: grid; gap: .75rem; padding: .8rem; }
.discussion-thread-state { padding: .75rem; color: var(--text-muted); font-size: .72rem; text-align: center; }
.discussion-thread-state.is-error { color: #dc2626; }
.discussion-comment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .55rem; }
.discussion-comment.is-reply { margin-top: .7rem; padding-left: .7rem; border-left: 2px solid rgba(37,99,235,.18); }
.discussion-comment-avatar { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #dbeafe; color: #2563eb; font-size: .58rem; font-weight: 800; }
.discussion-comment header { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.discussion-comment header strong { color: var(--text-primary); font-size: .72rem; }
.discussion-comment header span { color: var(--text-muted); font-size: .62rem; }
.discussion-comment p { margin: .22rem 0 .28rem; color: var(--text-primary); font-size: .75rem; line-height: 1.5; white-space: pre-wrap; }
.discussion-comment > div > button { padding: 0; border: 0; background: transparent; color: #2563eb; font-size: .64rem; font-weight: 700; cursor: pointer; }
.discussion-comment-replies { display: grid; gap: .65rem; }
.discussion-reply-context { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 .8rem; padding: .5rem .65rem; border-radius: 4px; background: rgba(37,99,235,.08); color: #2563eb; font-size: .65rem; }
.discussion-reply-context[hidden] { display: none; }
.discussion-reply-context button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.discussion-thread-form { display: grid; gap: .45rem; padding: .8rem; border-top: 1px solid var(--border-light); background: var(--bg-card); }
.discussion-thread-form textarea { width: 100%; min-height: 58px; resize: vertical; padding: .55rem .65rem; border: 1px solid var(--border-light); border-radius: 4px; outline: 0; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: .74rem; line-height: 1.45; }
.discussion-thread-form textarea:focus { border-color: #2563eb; }
.discussion-thread-form > div { display: flex; align-items: center; justify-content: space-between; }
.discussion-thread-form > div > span { color: var(--text-muted); font-size: .62rem; }
.discussion-thread-form button[type="submit"] { height: 32px; padding: 0 .75rem; border: 0; border-radius: 4px; background: #2563eb; color: #fff; font-size: .68rem; font-weight: 750; cursor: pointer; }
.discussion-thread-form button[type="submit"]:disabled { cursor: wait; opacity: .6; }

.discussions-rail { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-height) + 1rem); }
.discussion-rail-panel { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.discussion-rail-title { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid var(--border-light); }
.discussion-rail-title h2,
.discussion-rail-guide h2 { margin: 0; color: var(--text-primary); font-size: .86rem; }
.discussion-rail-title i { color: #f59e0b; }
.discussion-rail-panel > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .72rem 1rem; border: 0; border-bottom: 1px solid var(--border-light); background: transparent; color: var(--text-secondary); font: inherit; font-size: .75rem; text-align: left; cursor: pointer; }
.discussion-rail-panel > button:last-child { border-bottom: 0; }
.discussion-rail-panel > button:hover,
.discussion-rail-panel > button.active { background: var(--bg-hover); color: #2563eb; }
.discussion-rail-panel > button strong { color: var(--text-muted); font-size: .66rem; }
.discussion-rail-guide { padding: 1rem; }
.discussion-guide-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: .7rem; border-radius: 5px; background: rgba(16,185,129,.1); color: #059669; }
.discussion-rail-guide p { margin: .55rem 0 .85rem; color: var(--text-secondary); font-size: .72rem; line-height: 1.5; }
.discussion-rail-guide a { color: #2563eb; font-size: .7rem; font-weight: 700; text-decoration: none; }
.discussion-bridge-status { display: flex; align-items: center; gap: .45rem; padding: 0 .2rem; color: var(--text-muted); font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.discussion-bridge-status span { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.discussion-bridge-status.is-live span { background: #10b981; }

@media (max-width: 1000px) {
  .discussions-layout { grid-template-columns: minmax(0, 1fr) 250px; }
}

@media (max-width: 820px) {
  .discussions-layout { grid-template-columns: 1fr; }
  .discussions-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discussion-bridge-status { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .discussions-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .discussions-header .otv-primary-btn { width: 100%; }
  .discussion-composer,
  .discussion-post { grid-template-columns: 36px minmax(0, 1fr); gap: .65rem; padding: .85rem; }
  .discussion-composer { top: calc(var(--header-height) + .35rem); }
  .discussion-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .discussion-composer-footer { align-items: flex-start; flex-direction: column; }
  .discussion-composer-tools,
  .discussion-compose-submit { width: 100%; }
  .discussion-composer-tools select { flex: 1; }
  .discussion-compose-submit { justify-content: space-between; }
  .discussion-feed-tabs button { font-size: .67rem; }
  .discussion-post-actions { grid-template-columns: repeat(3, auto) 1fr; }
  .discussion-post-actions button { min-width: 38px; padding: 0 .35rem; }
  .discussion-post-actions button b { display: none; }
  .discussion-persistence-note { display: none; }
  .discussions-rail { grid-template-columns: 1fr; }
  .discussion-bridge-status { grid-column: auto; }
}

/* ========================================
   SHARED CIVIC COMMUNITY — HOME + DISCUSSIONS
======================================== */
.civic-community { width: 100%; min-width: 0; color: var(--text-primary); }
.home-civic-community-section { margin: 2rem 0 3rem; }
.civic-community-loading { min-height: 220px; display: grid; place-items: center; align-content: center; gap: .7rem; color: var(--text-muted); font-size: .78rem; }
.civic-community-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.civic-community-header > div { min-width: 0; }
.civic-community-kicker { display: inline-flex; align-items: center; gap: .45rem; color: #2563eb; font-size: .66rem; font-weight: 800; letter-spacing: .08em; }
.civic-community-header h2 { margin: .35rem 0 .25rem; color: var(--text-primary); font-family: "Poppins", sans-serif; font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.16; }
.civic-community-header p { max-width: 720px; margin: 0; color: var(--text-secondary); font-size: .86rem; line-height: 1.55; }
.civic-compose-open { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; flex: 0 0 auto; padding: 0 1rem; border: 0; border-radius: 6px; background: #2563eb; color: #fff; font: inherit; font-size: .76rem; font-weight: 750; cursor: pointer; }
.civic-compose-open:hover { background: #1d4ed8; }

.civic-community-layout { min-width: 0; }
.civic-community-layout.has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 1rem; align-items: start; }
.civic-community-main { min-width: 0; }
.civic-community-rail { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-height) + 1rem); }
.civic-rail-card { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.civic-rail-card > header { display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border-light); }
.civic-rail-card > header i { color: #f59e0b; }
.civic-rail-card h3 { margin: 0; color: var(--text-primary); font-size: .82rem; }
.civic-rail-card > a { display: grid; gap: .2rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border-light); color: var(--text-primary); text-decoration: none; }
.civic-rail-card > a:last-child { border-bottom: 0; }
.civic-rail-card > a:hover { background: var(--bg-hover); }
.civic-rail-card > a span { font-size: .72rem; font-weight: 700; line-height: 1.35; }
.civic-rail-card > a small { color: var(--text-muted); font-size: .62rem; }
.civic-rail-card > p { margin: 0; padding: 1rem; color: var(--text-muted); font-size: .7rem; line-height: 1.5; }

.civic-community-pulse { display: grid; gap: .8rem; margin-bottom: 1rem; }
.civic-community-pulse[hidden] { display: none; }
.civic-poll { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(175px, .6fr); gap: 1rem; align-items: center; padding: 1rem; border: 1px solid #bfdbfe; border-radius: 7px; background: linear-gradient(135deg, #eff6ff, var(--bg-card)); }
.civic-poll-copy { min-width: 0; }
.civic-poll-copy > span { display: inline-flex; align-items: center; gap: .35rem; color: #1d4ed8; font-size: .6rem; font-weight: 850; letter-spacing: .06em; }
.civic-poll-copy h3 { margin: .3rem 0 .2rem; color: var(--text-primary); font-size: .9rem; line-height: 1.4; }
.civic-poll-copy small { color: var(--text-muted); font-size: .62rem; }
.civic-poll-actions { display: grid; grid-template-columns: repeat(2, minmax(72px, 1fr)); gap: .45rem; }
.civic-poll-actions button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: 0 .8rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; }
.civic-poll-actions button.is-yes:hover,
.civic-poll-actions button.is-yes.is-selected { border-color: #10b981; background: #ecfdf5; color: #047857; }
.civic-poll-actions button.is-no:hover,
.civic-poll-actions button.is-no.is-selected { border-color: #f43f5e; background: #fff1f2; color: #be123c; }
.civic-poll-actions button:disabled { cursor: default; opacity: .68; }
.civic-poll-results { min-width: 0; color: var(--text-muted); font-size: .64rem; }
.civic-poll-results > div { height: 7px; display: flex; overflow: hidden; border-radius: 999px; background: var(--bg-hover); }
.civic-poll-results > div span:first-child { background: #10b981; }
.civic-poll-results > div span:last-child { background: #f43f5e; }
.civic-poll-results p { display: flex; justify-content: space-between; gap: .5rem; margin: .35rem 0 .2rem; }
.civic-poll-results p strong:first-child { color: #047857; }
.civic-poll-results p strong:last-child { color: #be123c; }
.civic-poll-results > small { display: block; color: var(--text-muted); text-align: right; }
.civic-poll.is-compact { grid-template-columns: minmax(0, 1fr) auto; margin: .75rem 0; padding: .8rem; }
.civic-poll.is-compact .civic-poll-copy h3 { font-size: .78rem; }
.civic-poll.is-compact .civic-poll-copy small { display: none; }
.civic-poll.is-compact .civic-poll-results { grid-column: 1 / -1; }

.civic-argument-balance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.civic-top-argument { min-width: 0; min-height: 112px; display: grid; align-content: start; gap: .35rem; padding: .9rem; border: 1px solid var(--border-light); border-left: 4px solid #10b981; border-radius: 6px; background: var(--bg-card); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.civic-top-argument.contra { border-left-color: #f43f5e; }
.civic-top-argument.is-empty { cursor: default; }
.civic-top-argument > span { color: #047857; font-size: .58rem; font-weight: 850; letter-spacing: .06em; }
.civic-top-argument.contra > span { color: #be123c; }
.civic-top-argument p { margin: 0; font-size: .76rem; line-height: 1.5; }
.civic-top-argument small { color: var(--text-muted); font-size: .6rem; }

.civic-composer { margin-bottom: .8rem; }
.civic-composer-context-locked { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; padding: .55rem .65rem; border: 1px solid #bfdbfe; border-radius: 5px; background: #eff6ff; color: #1d4ed8; }
.civic-composer-context-locked i { flex: 0 0 auto; }
.civic-composer-context-locked span { min-width: 0; }
.civic-composer-context-locked small { display: block; font-size: .57rem; font-weight: 750; text-transform: uppercase; }
.civic-composer-context-locked strong { display: block; overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.civic-composer-select { display: grid; gap: .3rem; margin-bottom: .6rem; }
.civic-composer-select > span,
.civic-composer-classification label > span { color: var(--text-muted); font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.civic-composer-select select,
.civic-composer-classification select { width: 100%; min-width: 0; min-height: 40px; padding: 0 2rem 0 .7rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: .72rem; }
.civic-composer-classification { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-bottom: .35rem; }
.civic-composer-classification label { display: grid; gap: .25rem; }

.civic-feed-tabs { grid-template-columns: repeat(var(--tab-count, 3), minmax(0, 1fr)); }
.civic-post { position: relative; }
.civic-post-menu { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; }
.civic-post-menu:hover { background: var(--bg-hover); color: var(--text-primary); }
.civic-post-labels { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.civic-post-labels span { padding: .2rem .42rem; border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.civic-post-labels .stance-pro { background: #ecfdf5; color: #047857; }
.civic-post-labels .stance-contra { background: #fff1f2; color: #be123c; }
.civic-post-context { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: .55rem; align-items: center; margin-top: .55rem; padding: .55rem .65rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; }
.civic-post-context:hover { border-color: #93c5fd; }
.civic-post-context > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: #dbeafe; color: #2563eb; }
.civic-post-context span { min-width: 0; }
.civic-post-context small { display: block; color: #2563eb; font-size: .52rem; font-weight: 850; }
.civic-post-context strong { display: block; overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.civic-post-context > b { color: var(--text-muted); font-size: .58rem; white-space: nowrap; }
.civic-post .discussion-post-actions button.supported { color: #d97706; }

.civic-report-dialog { width: min(520px, calc(100vw - 2rem)); max-height: min(680px, calc(100dvh - 2rem)); padding: 0; overflow: hidden; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-card); color: var(--text-primary); box-shadow: 0 24px 70px rgba(15, 23, 42, .25); }
.civic-report-dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.civic-report-form { display: grid; gap: 1rem; padding: 1.2rem; }
.civic-report-handle { display: none; }
.civic-report-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.civic-report-form > header span { color: #e11d48; font-size: .58rem; font-weight: 850; letter-spacing: .08em; }
.civic-report-form h3 { margin: .2rem 0 0; font-size: 1.05rem; }
.civic-report-form > header button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bg-hover); color: var(--text-muted); cursor: pointer; }
.civic-report-form > label { display: grid; gap: .35rem; color: var(--text-secondary); font-size: .7rem; font-weight: 700; }
.civic-report-form select,
.civic-report-form textarea { width: 100%; box-sizing: border-box; padding: .7rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: .8rem; }
.civic-report-feedback { min-height: 1.1rem; margin: 0; color: #be123c; font-size: .68rem; }
.civic-report-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.civic-report-actions button { min-height: 44px; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: .75rem; font-weight: 750; cursor: pointer; }
.civic-report-actions button[type="submit"] { border-color: #e11d48; background: #e11d48; color: #fff; }

html.dark .civic-poll,
html.dark .civic-composer-context-locked { border-color: #315a8d; background: linear-gradient(135deg, #172b46, var(--bg-card)); }
html.dark .civic-poll-actions button.is-yes.is-selected { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.dark .civic-poll-actions button.is-no.is-selected { background: rgba(244,63,94,.16); color: #fda4af; }
html.dark .civic-post-labels .stance-pro { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.dark .civic-post-labels .stance-contra { background: rgba(244,63,94,.16); color: #fda4af; }

.measure-mobile-actions { display: none; }

@media (max-width: 960px) {
  .civic-community-layout.has-rail { grid-template-columns: 1fr; }
  .civic-community-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .civic-poll { grid-template-columns: minmax(0, 1fr) auto; }
  .civic-poll-results { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .civic-community-header { align-items: center; gap: .75rem; }
  .civic-community-header h2 { font-size: 1.3rem; }
  .civic-community-header p { font-size: .76rem; }
  .civic-compose-open { width: 44px; padding: 0; border-radius: 50%; }
  .civic-compose-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .civic-community-rail { grid-template-columns: 1fr; }
  .civic-poll,
  .civic-poll.is-compact { grid-template-columns: 1fr; gap: .75rem; padding: .85rem; }
  .civic-poll-actions { width: 100%; }
  .civic-poll-results,
  .civic-poll.is-compact .civic-poll-results { grid-column: auto; }
  .civic-poll-results > small { text-align: left; }
  .civic-argument-balance { grid-template-columns: 1fr; }
  .civic-top-argument { min-height: 0; }
  .civic-composer { grid-template-columns: 32px minmax(0, 1fr); gap: .55rem; padding: .75rem; }
  .civic-composer .discussion-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .civic-composer-classification { grid-template-columns: 1fr; }
  .civic-composer select,
  .civic-composer textarea,
  .civic-report-form select,
  .civic-report-form textarea { font-size: 16px; }
  .civic-feed-tabs { display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .civic-feed-tabs::-webkit-scrollbar { display: none; }
  .civic-feed-tabs button { min-width: 92px; flex: 1 0 auto; }
  .civic-post { grid-template-columns: 32px minmax(0, 1fr); gap: .55rem; padding: .75rem; }
  .civic-post > .discussion-avatar { width: 32px; height: 32px; }
  .civic-post-context { grid-template-columns: 26px minmax(0, 1fr); }
  .civic-post-context > b { display: none; }
  .civic-post-context > i { width: 26px; height: 26px; }
  .civic-post .discussion-post-actions { grid-template-columns: repeat(3, minmax(44px, auto)) 1fr; gap: .15rem; }
  .civic-post .discussion-post-actions button { min-width: 44px; min-height: 44px; }
  .civic-post .discussion-views { display: none; }
  .civic-report-dialog { width: 100%; max-width: none; max-height: calc(100dvh - var(--header-height)); margin: auto 0 0; border-width: 1px 0 0; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .civic-report-form { padding: .65rem 1rem 1rem; }
  .civic-report-handle { width: 38px; height: 4px; display: block; justify-self: center; border-radius: 999px; background: var(--border-medium); }
  .home-civic-community-section { margin: 1.25rem 0 2rem; }
}

@media (max-width: 380px) {
  .civic-community-header p { display: none; }
  .civic-post .discussion-post-actions button b { display: none; }
  .civic-post .discussion-post-actions { grid-template-columns: repeat(3, 44px); }
}

@media (max-width: 900px) {
  .measure-mobile-actions { position: fixed; z-index: 84; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .4rem max(.55rem, env(safe-area-inset-right)) calc(.4rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left)); border-top: 1px solid var(--border-light); background: color-mix(in srgb, var(--bg-card) 94%, transparent); box-shadow: 0 -8px 24px rgba(15,23,42,.12); backdrop-filter: blur(14px); }
  .measure-mobile-actions button,
  .measure-mobile-actions a { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .18rem; padding: .25rem; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .58rem; font-weight: 750; text-decoration: none; cursor: pointer; }
  .measure-mobile-actions i { font-size: .95rem; }
  .measure-mobile-actions button.is-active { background: #eff6ff; color: #1d4ed8; }
  .measure-mobile-actions button:disabled { opacity: .55; }
  body:has(.measure-mobile-actions) .main-content { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* Community profile */
.community-profile-page { width: min(980px, 100%); margin: 0 auto; padding: 2rem; }
.community-profile-back { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; color: var(--text-secondary); font-size: .78rem; font-weight: 700; text-decoration: none; }
.community-profile-back:hover { color: var(--secondary); }
.community-profile-loading { min-height: 420px; display: flex; align-items: center; justify-content: center; gap: .65rem; color: var(--text-secondary); font-size: .82rem; }
.community-profile-skeleton-card { overflow: hidden; border: 1px solid var(--border-light); border-radius: 16px; background: var(--bg-card); }
.community-skeleton-block { display: block; border-radius: 6px; background: var(--bg-hover); animation: community-skeleton-pulse 1.35s ease-in-out infinite; }
.community-skeleton-cover { height: 92px; background: var(--bg-hover); animation: community-skeleton-pulse 1.35s ease-in-out infinite; }
.community-skeleton-profile-body { min-height: 172px; display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 1.35rem; align-items: start; padding: 0 1.5rem 1.5rem; }
.community-skeleton-avatar { width: 124px; height: 124px; margin-top: -58px; border: 4px solid var(--bg-card); border-radius: 50%; box-shadow: 0 0 0 1px var(--border-light); }
.community-skeleton-profile-copy { min-width: 0; padding-top: 1.15rem; }
.community-skeleton-name { width: 42%; height: 26px; }
.community-skeleton-handle { width: 24%; height: 12px; margin-top: .5rem; }
.community-skeleton-bio { width: 72%; height: 12px; margin-top: 1rem; }
.community-skeleton-meta { width: 46%; height: 25px; margin-top: .8rem; border-radius: 999px; }
.community-skeleton-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.community-skeleton-actions span:first-child { width: 138px; height: 38px; }
.community-skeleton-actions span:last-child { width: 38px; height: 38px; }
.community-profile-skeleton-score { display: flex; flex-direction: column; padding: 1.25rem; }
.community-skeleton-score-top { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); }
.community-skeleton-score-top span:first-child { width: 42%; height: 48px; }
.community-skeleton-score-top span:last-child { width: 24%; height: 48px; }
.community-skeleton-level { width: 58%; height: 42px; margin-top: 1rem; }
.community-skeleton-progress-label { width: 74%; height: 12px; margin-top: 1.15rem; }
.community-skeleton-progress { width: 100%; height: 6px; margin-top: .55rem; border-radius: 999px; }
.community-skeleton-score-journal { display: grid; gap: .45rem; margin-top: .85rem; padding-top: .7rem; border-top: 1px solid var(--border-light); }
.community-skeleton-score-journal span { width: 100%; height: 11px; }
.community-skeleton-score-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.25rem; }
.community-skeleton-score-footer span { width: 38%; height: 12px; }
.community-profile-skeleton-primary { overflow: hidden; }
.community-profile-skeleton-stream { min-height: 380px; border-top: 1px solid var(--border-light); }
.community-skeleton-tabs { height: 51px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; align-items: center; padding: 0 1.25rem; border-bottom: 1px solid var(--border-light); }
.community-skeleton-tabs span { width: 72%; height: 12px; justify-self: center; }
.community-skeleton-feed-card { min-height: 278px; margin: 1rem; padding: 1rem; border: 1px solid var(--border-light); border-radius: 10px; }
.community-skeleton-feed-title { width: 48%; height: 18px; }
.community-skeleton-feed-line { width: 86%; height: 12px; margin-top: 1rem; }
.community-skeleton-feed-line.short { width: 62%; }
.community-profile-skeleton-rail { grid-template-columns: 1fr; }
.community-skeleton-rail-card { min-height: 132px; display: grid; gap: .75rem; padding: 1rem; }
.community-skeleton-rail-card.tall { min-height: 190px; }
.community-skeleton-rail-card .community-skeleton-block { width: 100%; height: 12px; }
.community-skeleton-rail-card .community-skeleton-rail-title { width: 48%; height: 17px; margin-bottom: .25rem; }
@keyframes community-skeleton-pulse { 0%, 100% { opacity: .48; } 50% { opacity: .92; } }
@media (prefers-reduced-motion: reduce) { .community-skeleton-block, .community-skeleton-cover { animation: none; opacity: .7; } }
.community-profile-hero { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-profile-cover { height: 126px; background: linear-gradient(100deg, #2563eb 0 34%, #f43f5e 34% 66%, #fbbf24 66%); }
.community-profile-identity { position: relative; padding: 0 1.5rem 1.4rem; }
.community-profile-avatar { width: 104px; height: 104px; display: grid; place-items: center; margin-top: -54px; overflow: hidden; border: 5px solid var(--bg-card); border-radius: 50%; background: #dbeafe; color: #2563eb; font-size: 1.45rem; font-weight: 800; }
.community-profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.community-profile-actions { position: absolute; top: 1rem; right: 1.5rem; }
.community-profile-otv-link { height: 38px; display: inline-flex; align-items: center; gap: .5rem; padding: 0 .9rem; border: 1px solid var(--border-medium); border-radius: 5px; color: var(--text-primary); font-size: .72rem; font-weight: 750; text-decoration: none; }
.community-profile-otv-link:hover { border-color: var(--secondary); color: var(--secondary); }
.community-profile-name { margin-top: .65rem; }
.community-profile-name h1 { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--text-primary); font-size: 1.55rem; letter-spacing: 0; }
.community-profile-name > span { display: block; margin-top: .15rem; color: var(--text-muted); font-size: .78rem; }
.community-profile-verified { color: #2563eb; font-size: .85rem; }
.community-profile-bio { max-width: 680px; margin: .85rem 0 0; color: var(--text-primary); font-size: .86rem; line-height: 1.55; white-space: pre-wrap; }
.community-profile-bio.is-empty { color: var(--text-muted); }
.community-profile-meta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: .8rem; color: var(--text-secondary); font-size: .72rem; }
.community-profile-meta span,
.community-profile-meta a { display: inline-flex; align-items: center; gap: .35rem; color: inherit; text-decoration: none; }
.community-profile-meta a:hover { color: var(--secondary); text-decoration: underline; }
.community-profile-follow-counts { display: flex; gap: 1.1rem; margin-top: .75rem; color: var(--text-secondary); font-size: .85rem; }
.community-profile-follow-counts strong { color: var(--text-primary); }
.community-profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1rem; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-profile-stats > div { min-width: 0; padding: 1rem 1.15rem; border-right: 1px solid var(--border-light); }
.community-profile-stats > div:last-child { border-right: 0; }
.community-profile-stats strong { display: block; color: var(--text-primary); font-size: 1.15rem; }
.community-profile-stats span { display: block; margin-top: .15rem; color: var(--text-muted); font-size: .66rem; }
.community-profile-content-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.community-profile-content-header h2 { margin: .3rem 0 0; color: var(--text-primary); font-size: 1.15rem; letter-spacing: 0; }
.community-profile-filters { display: inline-flex; padding: 3px; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-card); }
.community-profile-filters button { height: 31px; padding: 0 .7rem; border: 0; border-radius: 3px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; }
.community-profile-filters button.active { background: #2563eb; color: #fff; }
.community-profile-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.community-profile-post { min-width: 0; display: flex; flex-direction: column; padding: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-profile-post > header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.community-profile-post > header .discussion-topic { margin-top: 0; }
.community-profile-post > header time { color: var(--text-muted); font-size: .64rem; }
.community-profile-post > p { margin: .75rem 0; color: var(--text-primary); font-size: .8rem; line-height: 1.5; white-space: pre-wrap; }
.community-profile-video,
.community-profile-image { width: 100%; max-height: 360px; display: block; margin-top: .75rem; overflow: hidden; border-radius: 5px; background: #111827; }
.community-profile-video { margin-top: auto; }
.community-profile-image img { width: 100%; max-height: 360px; display: block; object-fit: cover; }
.community-profile-post > footer { display: flex; align-items: center; gap: 1rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: .66rem; }
.community-profile-post > footer span { display: inline-flex; align-items: center; gap: .3rem; }
.community-profile-post > footer a { margin-left: auto; color: var(--text-muted); }
.community-profile-post > footer a:hover { color: var(--secondary); }
.community-profile-empty { grid-column: 1 / -1; min-height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .55rem; padding: 2rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-muted); text-align: center; }
.community-profile-empty > i { font-size: 1.7rem; color: var(--secondary); }
.community-profile-empty strong { color: var(--text-primary); font-size: .9rem; }
.community-profile-empty span { font-size: .74rem; }
.community-profile-empty.is-error { min-height: 420px; }

@media (max-width: 760px) {
  .community-profile-page { padding: 1rem; }
  .community-profile-cover { height: 96px; }
  .community-profile-identity { padding: 0 1rem 1rem; }
  .community-profile-avatar { width: 82px; height: 82px; margin-top: -43px; }
  .community-profile-actions { top: .75rem; right: 1rem; }
  .community-profile-name h1 { font-size: 1.25rem; }
  .community-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-profile-stats > div:nth-child(2) { border-right: 0; }
  .community-profile-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
  .community-profile-content-header { align-items: flex-start; flex-direction: column; }
  .community-profile-filters { width: 100%; }
  .community-profile-filters button { flex: 1; }
  .community-profile-posts { grid-template-columns: 1fr; }
}

/* Community profile v2: verified participation and points */
.community-profile-v2 { --community-rail-copy-size: .72rem; box-sizing: border-box; width: 100%; max-width: 1240px; margin: 0; padding: 0; container-type: inline-size; }
.community-profile-v2 .community-profile-back { margin-bottom: .8rem; }
.community-profile-layout { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 29%, 320px); gap: 1rem; align-items: start; }
.community-profile-primary { min-width: 0; border: 1px solid var(--border-light); background: var(--bg-card); }
.community-profile-v2 .community-profile-hero { overflow: visible; }
.community-profile-v2 .community-profile-identity { min-height: 236px; display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 1.35rem; align-content: center; padding: 1.5rem; }
.community-profile-v2 .community-profile-avatar { grid-row: 1 / 6; width: 124px; height: 124px; align-self: start; margin: 0; border: 4px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border-light); }
.community-profile-v2 .community-profile-actions { position: static; grid-column: 2; grid-row: 4; justify-self: start; max-width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.community-profile-follow-btn,
.community-profile-message-btn,
.community-profile-more { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: 0 .9rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: .72rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.community-profile-follow-btn { border-color: #2563eb; background: #2563eb; color: #fff; }
.community-profile-follow-btn:hover { background: #1d4ed8; }
.community-profile-follow-btn.is-following { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.community-profile-message-btn:hover,
.community-profile-more:hover { border-color: #93c5fd; color: #2563eb; }
.community-profile-more { width: 38px; padding: 0; border-radius: 50%; }
.community-profile-account-menu { position: relative; z-index: 50; flex: 0 0 38px; }
.community-profile-account-popover[hidden] { display: none; }
.community-profile-account-popover { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: 154px; padding: 4px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-card); box-shadow: 0 10px 26px rgba(15, 23, 42, .14); }
.community-profile-account-popover > button { width: 100%; min-height: 40px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: .5rem; align-items: center; padding: .4rem .55rem; border: 0; border-radius: 7px; background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.community-profile-account-popover > button:hover { background: #fff1f2; color: #be123c; }
.community-profile-account-popover > button:disabled { opacity: .65; cursor: wait; }
.community-profile-account-popover > button > i { width: 24px; height: 24px; display: grid; place-items: center; color: #e11d48; font-size: .76rem; }
.community-profile-account-popover strong { display: block; font-size: .7rem; }
.community-profile-v2 .community-profile-name { grid-column: 2; margin: .1rem 0 0; }
.community-profile-v2 .community-profile-name h1 { font-size: 1.7rem; }
.community-profile-v2 .community-profile-bio { grid-column: 2; max-width: 620px; margin: .65rem 0 0; font-size: .8rem; }
.community-profile-v2 .community-profile-meta { grid-column: 2; margin-top: .7rem; }
.community-profile-v2 .community-profile-meta a { max-width: 390px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-profile-v2 .community-profile-follow-counts { grid-column: 2; grid-row: 5; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border-light); }

.community-profile-score-card { min-width: 0; display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-score-topline { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); }
.community-score-topline > div:last-child { text-align: right; }
.community-score-topline small,
.community-level-row small { display: block; color: var(--text-muted); font-size: var(--community-rail-copy-size); }
.community-score-topline strong { display: block; margin-top: .2rem; color: var(--text-primary); font-size: 1.65rem; line-height: 1; }
.community-score-topline strong span { font-size: var(--community-rail-copy-size); font-weight: 600; }
.community-level-row { display: flex; align-items: center; gap: .65rem; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.community-level-row strong { display: block; margin-top: .15rem; color: var(--text-primary); font-size: .92rem; }
.community-level-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 50%; background: #fff7ed; color: #f59e0b; font-size: .95rem; }
.community-level-progress-label { display: flex; justify-content: space-between; gap: .6rem; margin-top: .95rem; color: var(--text-secondary); font-size: var(--community-rail-copy-size); }
.community-level-progress-label strong { color: var(--text-secondary); font-weight: 650; }
.community-level-progress { height: 6px; margin-top: .45rem; overflow: hidden; border-radius: 99px; background: var(--bg-hover); }
.community-level-progress span { height: 100%; display: block; border-radius: inherit; background: #2563eb; }
.community-score-journal { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid var(--border-light); }
.community-score-journal > strong { display: block; margin-bottom: .25rem; color: var(--text-primary); font-size: var(--community-rail-copy-size); }
.community-score-journal > div { min-height: 30px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .45rem; align-items: center; }
.community-score-journal b { color: #059669; font-size: var(--community-rail-copy-size); }
.community-score-journal span { overflow: hidden; color: var(--text-secondary); font-size: var(--community-rail-copy-size); text-overflow: ellipsis; white-space: nowrap; }
.community-score-journal time { color: var(--text-muted); font-size: var(--community-rail-copy-size); }
.community-score-footer { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: auto; padding-top: .65rem; border-top: 1px solid var(--border-light); color: #059669; font-size: var(--community-rail-copy-size); font-weight: 700; }
.community-score-footer button { padding: 0; border: 0; background: none; color: #2563eb; font: inherit; font-size: var(--community-rail-copy-size); font-weight: 700; cursor: pointer; }

.community-profile-stream { min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-profile-tabs { max-width: 100%; display: flex; align-items: center; gap: .2rem; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; padding: 0 1.25rem; border-bottom: 1px solid var(--border-light); }
.community-profile-tabs::-webkit-scrollbar { display: none; }
.community-profile-tabs button { position: relative; min-width: 104px; height: 50px; padding: 0 .75rem; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.community-profile-tabs button::after { position: absolute; right: .5rem; bottom: -1px; left: .5rem; height: 2px; background: transparent; content: ''; }
.community-profile-tabs button.active { color: #2563eb; }
.community-profile-tabs button.active::after { background: #2563eb; }
.community-profile-tab-panel { padding: 1rem; }
.community-profile-post-feed { min-width: 0; }
.community-profile-post-feed .civic-community-layout,
.community-profile-post-feed .civic-community-main,
.community-profile-post-feed .civic-community-feed { min-width: 0; width: 100%; }
.community-profile-post-feed .discussion-post:first-child { margin-top: 0; }
.community-contribution-card { padding: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-contribution-card + .community-contribution-card { margin-top: .85rem; }
.community-contribution-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--text-muted); font-size: .64rem; }
.community-contribution-type { color: #2563eb; font-weight: 800; }
.community-contribution-card h3 { margin: .55rem 0 0; color: var(--text-primary); font-size: .95rem; line-height: 1.35; }
.community-contribution-card > p { max-width: 680px; margin: .5rem 0 0; color: var(--text-secondary); font-size: .76rem; line-height: 1.55; }
.community-contribution-body { display: grid; grid-template-columns: minmax(0, 1fr) 205px; gap: 1rem; align-items: end; margin-top: .8rem; }
.community-contribution-body:not(.has-media) { grid-template-columns: 1fr 205px; }
.community-contribution-body .community-profile-video,
.community-contribution-body .community-profile-image { max-height: 300px; margin: 0; }
.community-contribution-body .community-profile-video { aspect-ratio: 16 / 9; object-fit: cover; }
.community-point-award { min-height: 96px; display: flex; flex-direction: column; justify-content: center; padding: .85rem; border: 1px solid #d1fae5; border-radius: 6px; background: #f0fdf4; }
.community-point-award strong { color: #059669; font-size: 1rem; }
.community-point-award strong span { font-size: .68rem; }
.community-point-award > span { display: flex; align-items: center; gap: .35rem; margin-top: .3rem; color: #059669; font-size: .67rem; }
.community-point-award small { margin-top: .85rem; color: #64748b; font-size: .62rem; }
.community-point-award.is-pending { border-color: #fde68a; background: #fffbeb; }
.community-point-award.is-pending strong,
.community-point-award.is-pending > span { color: #b45309; }
.community-contribution-card footer { display: flex; align-items: center; gap: 1.25rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: .67rem; }
.community-contribution-card footer span { display: inline-flex; align-items: center; gap: .35rem; }
.community-contribution-card footer .community-contribution-views { margin-left: auto; }
.community-contribution-card footer a { color: var(--text-muted); }
.community-contribution-card footer a:hover { color: #2563eb; }

.community-profile-rail { min-width: 0; display: grid; gap: 1rem; }
.community-profile-rail-card { overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.community-profile-rail-card > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--border-light); }
.community-profile-rail-card > header h2 { margin: 0; color: var(--text-primary); font-size: .82rem; }
.community-profile-rail-card > header button { border: 0; background: none; color: var(--text-muted); cursor: pointer; }
.community-impact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 43px; padding: 0 1rem; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); font-size: var(--community-rail-copy-size); }
.community-impact-list > div:last-child { border-bottom: 0; }
.community-impact-list span { display: flex; align-items: center; gap: .55rem; }
.community-impact-list i { width: 18px; color: #64748b; text-align: center; }
.community-impact-list div:nth-child(2) i { color: #10b981; }
.community-impact-list strong { color: var(--text-primary); }
.community-active-reforms > a { min-height: 82px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 12px; gap: .7rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border-light); color: inherit; text-decoration: none; }
.community-active-reforms > a:last-child { border-bottom: 0; }
.community-active-reforms > a:hover { background: var(--bg-hover); }
.community-profile-reform-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: #ecfdf5; color: #10b981; }
.community-profile-reform-icon.participating { background: #eff6ff; color: #2563eb; }
.community-active-reforms > a > span:nth-child(2) { min-width: 0; }
.community-active-reforms strong { display: -webkit-box; max-height: 2.6em; overflow: hidden; margin-top: .18rem; color: var(--text-primary); font-size: var(--community-rail-copy-size); line-height: 1.3; text-overflow: ellipsis; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.community-active-reforms span span:not(.community-reform-status):not(.community-mini-progress) { display: block; margin-top: .25rem; color: var(--text-muted); font-size: var(--community-rail-copy-size); }
.community-reform-status { display: inline-block; color: #059669; font-size: var(--community-rail-copy-size); font-weight: 800; }
.community-reform-status.participating { color: #2563eb; }
.community-mini-progress { width: 100%; height: 4px; display: block; margin-top: .35rem; overflow: hidden; border-radius: 99px; background: var(--bg-hover); }
.community-mini-progress i { height: 100%; display: block; border-radius: inherit; background: #2563eb; }
.community-active-reforms > a > i { color: var(--text-muted); font-size: .65rem; }
.community-profile-reform-list > article { display: grid; grid-template-columns: 42px minmax(0, 1fr) 22px; gap: .85rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.community-profile-reform-list > article:last-child { border-bottom: 0; }
.community-profile-reform-list h3 { margin: .3rem 0 0; color: var(--text-primary); font-size: .9rem; }
.community-profile-reform-list p { margin: .35rem 0 0; color: var(--text-secondary); font-size: .72rem; line-height: 1.45; }
.community-profile-reform-list small { color: var(--text-muted); font-size: .61rem; }
.community-profile-reform-list article > a { align-self: center; color: var(--text-muted); }
.community-reform-progress { height: 5px; margin: .65rem 0 .28rem; overflow: hidden; border-radius: 99px; background: var(--bg-hover); }
.community-reform-progress span { height: 100%; display: block; border-radius: inherit; background: #2563eb; }
.community-profile-activity-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.community-profile-activity-list article:last-child { border-bottom: 0; }
.community-profile-activity-list .activity-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #eff6ff; color: #2563eb; }
.community-profile-activity-list .activity-icon.points { background: #fff7ed; color: #f59e0b; }
.community-profile-activity-list .activity-icon.comment { background: #ecfdf5; color: #10b981; }
.community-profile-activity-list strong { color: var(--text-primary); font-size: .85rem; }
.community-profile-activity-list p { margin: .25rem 0; color: var(--text-secondary); font-size: .85rem; line-height: 1.5; }
.community-profile-activity-list time { color: var(--text-muted); font-size: .75rem; }

.community-points-dialog[hidden] { display: none; }
.community-points-dialog { --community-points-copy-size: .82rem; position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 1rem; }
.community-points-dialog-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.community-points-dialog > section { position: relative; width: min(620px, 100%); max-height: min(760px, calc(100vh - 2rem)); overflow: auto; border: 1px solid var(--border-light); border-radius: 16px; background: var(--bg-card); box-shadow: 0 20px 50px rgba(15,23,42,.2); font-size: var(--community-points-copy-size); }
.community-points-dialog > section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem; border-bottom: 1px solid var(--border-light); }
.community-points-dialog > section > header > div { display: flex; align-items: center; gap: .75rem; }
.community-points-dialog h2 { margin: 0; color: var(--text-primary); font-size: 1.22rem; }
.community-points-dialog header p { margin: .25rem 0 0; color: var(--text-secondary); font-size: inherit; line-height: 1.45; }
.community-points-dialog header button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border-light); border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
.community-points-rule-list { padding: .35rem 1.2rem; }
.community-points-rule-list > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .85rem; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.community-points-rule-list > div:last-child { border-bottom: 0; }
.community-points-rule-list > div > strong { color: #059669; font-size: 1.05rem; line-height: 1.3; }
.community-points-rule-list b { display: block; color: var(--text-primary); font-size: .9rem; line-height: 1.4; }
.community-points-rule-list small { display: block; margin-top: .25rem; color: var(--text-secondary); font-size: inherit; line-height: 1.5; }

html.dark .community-point-award { border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.09); }
html.dark .community-point-award.is-pending { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.1); }

@container (max-width: 1080px) {
  .community-profile-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .community-profile-v2 .community-profile-identity { grid-template-columns: 100px minmax(0, 1fr); }
  .community-profile-v2 .community-profile-avatar { width: 92px; height: 92px; }
}

@container (max-width: 820px) {
  .community-profile-layout { grid-template-columns: minmax(0, 1fr); }
  .community-profile-layout > * { min-width: 0; }
  .community-profile-score-card { min-height: 220px; }
  .community-profile-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-profile-rail > .community-profile-score-card,
  .community-profile-rail > .community-profile-skeleton-score { grid-column: 1 / -1; }
}

@container (max-width: 620px) {
  .community-skeleton-profile-body { display: flex; flex-direction: column; gap: 0; padding: 0 1rem 1rem; }
  .community-skeleton-avatar { width: 88px; height: 88px; margin-top: -44px; }
  .community-skeleton-profile-copy { width: 100%; padding-top: .85rem; }
  .community-skeleton-name { width: 55%; }
  .community-skeleton-bio { width: 88%; }
  .community-skeleton-tabs { gap: .45rem; padding-inline: .5rem; }
  .community-profile-v2 .community-profile-identity { min-height: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 1rem; }
  .community-profile-v2 .community-profile-avatar { width: 88px; height: 88px; }
  .community-profile-v2 .community-profile-name { order: 2; margin-top: .8rem; }
  .community-profile-v2 .community-profile-bio { order: 3; }
  .community-profile-v2 .community-profile-meta { order: 4; }
  .community-profile-v2 .community-profile-follow-counts { order: 5; width: 100%; }
  .community-profile-v2 .community-profile-actions { order: 6; width: 100%; display: grid; grid-template-columns: 1fr 1fr 38px; margin-top: 1rem; }
  .community-profile-v2 .community-profile-actions:has(.community-profile-edit-btn) { grid-template-columns: 1fr 38px; }
  .community-profile-v2 .community-profile-more { width: 38px; }
  .community-profile-account-popover { width: min(154px, calc(100vw - 2rem)); }
  .community-profile-rail { grid-template-columns: 1fr; }
  .community-profile-tabs { padding: 0 .5rem; }
  .community-profile-tabs button { min-width: 0; flex: 1; padding-inline: .25rem; font-size: var(--community-type-meta); }
  .community-profile-tab-panel { padding: .7rem; }
  .community-contribution-header { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .community-contribution-body,
  .community-contribution-body:not(.has-media) { grid-template-columns: 1fr; }
  .community-contribution-card footer { flex-wrap: wrap; gap: .8rem; }
  .community-contribution-card footer .community-contribution-views { margin-left: 0; }
  .community-contribution-card footer a { margin-left: auto; }
  .community-level-progress-label { align-items: flex-start; flex-direction: column; }
  .community-score-footer { align-items: flex-start; flex-direction: column; }
}

/* Profile header: cover band, portrait breaking into it, own-profile actions */
.community-profile-v2 .community-profile-hero { position: relative; z-index: 2; overflow: visible; }
.community-profile-v2 .community-profile-primary,
.community-profile-v2 .community-profile-score-card,
.community-profile-v2 .community-profile-rail-card { border-radius: 16px; }
.community-profile-v2 .community-profile-primary .community-profile-hero { border: 0; border-radius: 0; background: transparent; }
.community-profile-v2 .community-profile-primary .community-profile-stream { border: 0; border-top: 1px solid var(--border-light); border-radius: 0; background: transparent; }
.community-profile-v2 .community-profile-cover { height: 92px; border-radius: 15px 15px 0 0; background: linear-gradient(115deg, #1d4ed8 0, #3b82f6 46%, #f59e0b 100%); }
.community-profile-v2 .community-profile-identity { min-height: 172px; align-content: start; padding-top: 0; }
.community-profile-v2 .community-profile-avatar { margin-top: -58px; }
.community-profile-v2 .community-profile-name { margin-top: .5rem; }
.community-profile-v2 .community-profile-meta { gap: .4rem; }
.community-profile-v2 .community-profile-meta span,
.community-profile-v2 .community-profile-meta a { padding: .26rem .6rem; border-radius: 999px; background: var(--bg-hover); font-size: .7rem; }
.community-profile-v2 .community-profile-meta a:hover { background: #eff6ff; color: #2563eb; text-decoration: none; }
.community-profile-v2 .community-profile-follow-counts { gap: .75rem 1.4rem; flex-wrap: wrap; }
.community-profile-v2 .community-profile-name,
.community-profile-v2 .community-profile-bio,
.community-profile-v2 .community-profile-meta,
.community-profile-v2 .community-profile-follow-counts { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.community-profile-v2 .community-profile-meta span,
.community-profile-v2 .community-profile-meta a { max-width: 100%; }
.community-profile-v2 .community-profile-primary { overflow: hidden; }
.community-profile-v2 .community-score-topline > div,
.community-profile-v2 .community-level-row > div,
.community-profile-v2 .community-level-progress-label > span,
.community-profile-v2 .community-level-progress-label > strong,
.community-profile-v2 .community-impact-list span { min-width: 0; overflow-wrap: anywhere; }
.community-profile-edit-btn { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: 0 1rem; border: 1px solid #2563eb; border-radius: 5px; background: transparent; color: #2563eb; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.community-profile-edit-btn:hover { background: #2563eb; color: #fff; }
.community-profile-edit-btn:disabled { opacity: .6; cursor: default; }

.community-profile-rail-card > header .community-profile-view-all {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem 0;
  color: #2563eb;
  font-size: var(--community-rail-copy-size);
  font-weight: 750;
}
.community-profile-rail-card > header .community-profile-view-all:hover { color: #1d4ed8; }
.community-profile-rail-card > header .community-profile-view-all i { font-size: .5rem; }
.community-profile-rail .community-profile-empty span { font-size: var(--community-rail-copy-size); }

/* Profile editor. Specific enough to win over the auth modal's narrower card,
   whose rule sits further down this file. */
.nova-profile-modal.nova-auth-modal .auth-container { max-width: 560px; padding: 1.6rem 1.5rem 1.35rem; }
.nova-profile-modal .auth-title { margin: 0 0 .3rem; font-size: 1.25rem; }
.nova-profile-modal .auth-subtitle { margin: 0 0 1.15rem; font-size: .8rem; }
.nova-profile-avatar-row { display: flex; justify-content: center; margin-bottom: .35rem; }
.nova-profile-textarea { box-sizing: border-box; width: 100%; padding: .7rem .9rem; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-hover); color: var(--text-primary); font: inherit; font-size: .9rem; line-height: 1.5; resize: vertical; }
.nova-profile-textarea:focus { border-color: #3b82f6; background: var(--bg-card); outline: none; }
.nova-profile-counter { justify-self: end; font-variant-numeric: tabular-nums; }
.nova-profile-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.nova-profile-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.nova-profile-actions .auth-btn { padding: .75rem 1.5rem; font-size: .88rem; }

@media (max-width: 560px) {
  .nova-profile-pair { grid-template-columns: 1fr; }
  .nova-profile-actions { flex-direction: column-reverse; }
  .nova-profile-actions .auth-btn { width: 100%; }
}

/* Profile typography: four deliberate sizes across the entire profile surface. */
.community-profile-v2 {
  --community-type-meta: .72rem;
  --community-type-body: .85rem;
  --community-type-emphasis: .95rem;
  --community-type-display: 1.7rem;
  --community-rail-copy-size: var(--community-type-meta);
}

.community-profile-v2 .community-profile-name h1,
.community-profile-v2 .community-profile-avatar,
.community-profile-v2 .community-score-topline strong {
  font-size: var(--community-type-display);
}

.community-profile-v2 .community-profile-tabs button,
.community-profile-v2 .community-level-row strong,
.community-profile-v2 .community-profile-rail-card > header h2,
.community-profile-v2 .community-contribution-card h3,
.community-profile-v2 .community-profile-reform-list h3,
.community-profile-v2 .community-profile-activity-list strong,
.community-profile-v2 .community-profile-empty strong,
.community-profile-v2 .community-point-award strong {
  font-size: var(--community-type-emphasis);
}

.community-profile-v2 .community-profile-bio,
.community-profile-v2 .community-profile-follow-counts,
.community-profile-v2 .discussion-author-name strong,
.community-profile-v2 .discussion-post-text,
.community-profile-v2 .community-contribution-card > p,
.community-profile-v2 .community-profile-activity-list p {
  font-size: var(--community-type-body);
}

.community-profile-v2 .community-profile-name > span,
.community-profile-v2 .community-profile-meta,
.community-profile-v2 .community-profile-meta span,
.community-profile-v2 .community-profile-meta a,
.community-profile-v2 .community-profile-follow-btn,
.community-profile-v2 .community-profile-message-btn,
.community-profile-v2 .community-profile-edit-btn,
.community-profile-v2 .community-profile-account-popover strong,
.community-profile-v2 .community-score-topline small,
.community-profile-v2 .community-score-topline strong span,
.community-profile-v2 .community-level-row small,
.community-profile-v2 .community-level-progress-label,
.community-profile-v2 .community-score-journal > strong,
.community-profile-v2 .community-score-journal b,
.community-profile-v2 .community-score-journal span,
.community-profile-v2 .community-score-journal time,
.community-profile-v2 .community-score-footer,
.community-profile-v2 .community-score-footer button,
.community-profile-v2 .community-impact-list > div,
.community-profile-v2 .community-active-reforms strong,
.community-profile-v2 .community-active-reforms span span:not(.community-reform-status):not(.community-mini-progress),
.community-profile-v2 .community-reform-status,
.community-profile-v2 .community-profile-reform-list p,
.community-profile-v2 .community-profile-reform-list small,
.community-profile-v2 .community-profile-activity-list time,
.community-profile-v2 .discussion-author-name + span,
.community-profile-v2 .discussion-topic,
.community-profile-v2 .discussion-post-actions,
.community-profile-v2 .discussion-post-actions button,
.community-profile-v2 .discussion-views,
.community-profile-v2 .community-contribution-header,
.community-profile-v2 .community-point-award strong span,
.community-profile-v2 .community-point-award > span,
.community-profile-v2 .community-point-award small,
.community-profile-v2 .community-contribution-card footer,
.community-profile-v2 .community-profile-empty span {
  font-size: var(--community-type-meta);
}

@container (max-width: 620px) {
  .community-profile-v2 .community-profile-tabs button {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: .25rem;
    font-size: var(--community-type-meta);
  }
}

/* When the available profile column narrows, keep the score and impact summary
   between the identity card and the feed instead of burying it after every post. */
@container (max-width: 820px) {
  .community-profile-v2 .community-profile-primary { display: contents; }
  .community-profile-v2 .community-profile-primary .community-profile-hero,
  .community-profile-v2 .community-profile-skeleton-hero {
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--bg-card);
  }
  .community-profile-v2 .community-profile-rail { grid-row: 2; }
  .community-profile-v2 .community-profile-primary .community-profile-stream,
  .community-profile-v2 .community-profile-skeleton-stream {
    grid-row: 3;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--bg-card);
  }
}

@container (max-width: 620px) {
  .community-profile-v2 .community-profile-primary .community-profile-stream,
  .community-profile-v2 .community-profile-skeleton-stream { grid-row: 2; }
  .community-profile-v2 .community-profile-rail { grid-row: 3; }
}

/* Live OTV polls */
.otv-polls-page { width: min(1080px, 100%); margin: 0 auto; padding: 2rem; }
.otv-polls-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; }
.otv-polls-header h1 { display: flex; align-items: center; gap: .65rem; margin: .35rem 0 .25rem; color: var(--text-primary); font-size: 2rem; letter-spacing: 0; }
.otv-polls-header h1 i { color: #f59e0b; }
.otv-polls-header p { margin: 0; color: var(--text-secondary); font-size: .86rem; }
.otv-polls-refresh { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.otv-polls-refresh:hover { border-color: var(--secondary); color: var(--secondary); }
.otv-polls-refresh:disabled { opacity: .6; cursor: wait; }
.otv-polls-auth-note { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .8rem; margin: 1rem 0; padding: .85rem 1rem; border: 1px solid rgba(245,158,11,.35); border-radius: 6px; background: rgba(245,158,11,.08); }
.otv-polls-auth-note[hidden] { display: none; }
.otv-polls-auth-note > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: rgba(245,158,11,.14); color: #d97706; }
.otv-polls-auth-note > div { display: grid; gap: .15rem; }
.otv-polls-auth-note strong { color: var(--text-primary); font-size: .78rem; }
.otv-polls-auth-note span { color: var(--text-secondary); font-size: .69rem; }
.otv-polls-auth-note a { height: 34px; display: inline-flex; align-items: center; gap: .4rem; padding: 0 .75rem; border-radius: 4px; background: #172033; color: #fff; font-size: .68rem; font-weight: 750; text-decoration: none; }
.otv-polls-status { min-height: 0; color: var(--text-secondary); font-size: .73rem; }
.otv-polls-status.is-error { margin: .8rem 0; padding: .7rem .8rem; border: 1px solid rgba(239,68,68,.25); border-radius: 5px; background: rgba(239,68,68,.07); color: #dc2626; }
.otv-polls-loading { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: .6rem; color: var(--text-secondary); font-size: .78rem; }
.otv-polls-loading[hidden] { display: none; }
.otv-polls-section { margin-top: 1.5rem; }
.otv-polls-section.is-closed { margin-top: 2.5rem; }
.otv-polls-section-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; }
.otv-polls-section-title h2 { margin: 0; color: var(--text-primary); font-size: 1.05rem; letter-spacing: 0; }
.otv-polls-section-title > span { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 .35rem; border-radius: 11px; background: var(--border-light); color: var(--text-secondary); font-size: .65rem; font-weight: 800; }
.otv-live-polls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.otv-live-poll { min-width: 0; display: flex; flex-direction: column; padding: 1.15rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); }
.otv-live-poll > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.otv-live-poll-status { display: inline-flex; align-items: center; gap: .35rem; color: #059669; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.otv-live-poll-status i { font-size: .5rem; }
.otv-live-poll-source { color: var(--text-muted); font-size: .56rem; font-weight: 800; }
.otv-live-poll h2 { margin: .75rem 0 .35rem; color: var(--text-primary); font-size: 1.05rem; line-height: 1.4; letter-spacing: 0; }
.otv-live-poll > p { margin: 0 0 .7rem; color: var(--text-secondary); font-size: .75rem; line-height: 1.5; }
.otv-live-poll-options { display: grid; gap: .5rem; margin-top: auto; padding-top: .75rem; }
.otv-live-poll-options button { position: relative; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; overflow: hidden; padding: .55rem .7rem; border: 1px solid var(--border-light); border-radius: 5px; background: var(--bg-main); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.otv-live-poll-options button:not(:disabled):hover { border-color: var(--secondary); }
.otv-live-poll-options button:disabled { cursor: default; }
.otv-live-poll-options button.is-selected { border-color: #2563eb; box-shadow: inset 3px 0 #2563eb; }
.otv-live-poll-fill { position: absolute; inset: 0 auto 0 0; background: rgba(37,99,235,.09); pointer-events: none; }
.otv-live-poll-option-label,
.otv-live-poll-option-result { position: relative; z-index: 1; }
.otv-live-poll-option-label { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; }
.otv-live-poll-option-label i { color: #2563eb; }
.otv-live-poll-option-result { display: flex; align-items: flex-end; flex-direction: column; flex: 0 0 auto; }
.otv-live-poll-option-result strong { font-size: .76rem; }
.otv-live-poll-option-result small { color: var(--text-muted); font-size: .57rem; }
.otv-live-poll > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: .62rem; }
.otv-live-poll > footer span { display: inline-flex; align-items: center; gap: .35rem; }
.otv-live-poll.is-closed { background: color-mix(in srgb, var(--bg-card) 86%, var(--bg-main)); }
.otv-live-poll.is-closed .otv-live-poll-status { color: var(--text-muted); }
.otv-live-poll.is-closed .otv-live-poll-fill { background: rgba(100,116,139,.08); }
.otv-polls-empty { min-height: 300px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .5rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-muted); text-align: center; }
.otv-polls-empty i { color: var(--secondary); font-size: 1.8rem; }
.otv-polls-empty strong { color: var(--text-primary); font-size: .9rem; }
.otv-polls-empty span { font-size: .72rem; }

@media (max-width: 760px) {
  .otv-polls-page { padding: 1rem; }
  .otv-polls-header { align-items: flex-start; }
  .otv-polls-header h1 { font-size: 1.55rem; }
  .otv-polls-auth-note { grid-template-columns: 36px minmax(0, 1fr); }
  .otv-polls-auth-note a { grid-column: 1 / -1; justify-content: center; }
  .otv-live-polls-grid { grid-template-columns: 1fr; }
  .otv-live-poll > footer { align-items: flex-start; flex-direction: column; gap: .4rem; }
}

/* ============================================================
   Account area (sidebar) + real login modal
   ============================================================ */

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-account .user-card {
  flex: 1;
  min-width: 0;
}

.sidebar-account .account-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  opacity: 0.6;
}

.account-signin {
  width: 100%;
  border: none;
  font: inherit;
  text-align: left;
}

/* The avatar font size is set for two initials, which leaves a glyph looking
   lost in the circle. */
.account-signin .otv-user-avatar {
  font-size: 0.95rem;
}

img.otv-user-avatar {
  object-fit: cover;
}

.verified-tick {
  color: #3b82f6;
  font-size: 0.75rem;
}

/* Login modal reuses the dev-gate auth markup, but sits over the app instead of
   replacing it. The dev gate is permanently dark; this modal follows the theme,
   so every hardcoded colour it would inherit is remapped to a variable. */
.nova-auth-modal {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.nova-auth-modal .auth-container {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
  color: var(--text-primary);
  animation: novaAuthIn 0.18s ease-out;
}

@keyframes novaAuthIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.nova-auth-modal .auth-logo-text,
.nova-auth-modal .auth-title {
  color: var(--text-primary);
}

.nova-auth-modal .auth-subtitle {
  color: var(--text-secondary);
}

.nova-auth-modal .auth-input-wrapper input {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.nova-auth-modal .auth-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.nova-auth-modal .auth-input-wrapper input:focus {
  background: var(--bg-card);
  border-color: #3b82f6;
}

.nova-auth-modal .auth-input-wrapper i {
  color: var(--text-muted);
}

/* Show/hide password toggle */
.nova-auth-modal .auth-input-wrapper.has-reveal input {
  padding-right: 3rem;
}

.auth-reveal {
  position: absolute;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* The wrapper positions any icon on the left; the one in this button must not move. */
.nova-auth-modal .auth-reveal i {
  position: static;
  left: auto;
  color: inherit;
  font-size: 0.95rem;
}

.auth-reveal:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.auth-reveal:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.nova-auth-modal .auth-form {
  gap: 0.85rem;
}

.nova-auth-modal .auth-footer {
  color: var(--text-secondary);
}

.nova-auth-modal .auth-footer a {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}

.nova-auth-modal .auth-footer a:hover {
  text-decoration: underline;
}

.auth-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Sign in / create account, in one card */
.nova-auth-modal .auth-container {
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 14px;
  text-align: left;
}

.nova-auth-modal .auth-logo {
  margin-bottom: 1.25rem;
}

.nova-auth-modal .auth-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.nova-auth-modal .auth-logo-text {
  font-size: 1.15rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-hover);
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-tabs button:hover {
  color: var(--text-primary);
}

.auth-tabs button.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.auth-pane[hidden] {
  display: none;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
}

.auth-label {
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 650;
}

.auth-hint {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.nova-auth-modal .auth-input-wrapper input {
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.nova-auth-modal .auth-input-wrapper i {
  left: 0.9rem;
  font-size: 0.85rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.auth-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.auth-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.nova-auth-modal .auth-btn {
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.nova-auth-modal .auth-btn.secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: none;
}

.nova-auth-modal .auth-btn.secondary:hover {
  background: var(--bg-hover);
  transform: none;
  box-shadow: none;
}

.auth-success {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  text-align: center;
}

.auth-success i {
  color: #16a34a;
  font-size: 1.75rem;
}

.auth-success strong {
  color: var(--text-primary);
  font-size: 1rem;
}

.auth-success p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-success .auth-btn {
  width: 100%;
  margin-top: 0.35rem;
}

.nova-auth-modal .auth-footer {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  text-align: center;
}

.auth-link {
  padding: 0;
  border: 0;
  background: none;
  color: #3b82f6;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

/* Profile picture picker */
.avatar-picker {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}

.avatar-picker-face {
  position: relative;
  width: 84px;
  height: 84px;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-hover);
  cursor: pointer;
}

.avatar-picker-face:hover {
  border-color: #3b82f6;
}

.avatar-picker-face:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.avatar-picker-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-secondary);
  font-size: 1.6rem;
  font-weight: 700;
}

.avatar-picker-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-picker-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 0.7rem;
}

.avatar-picker-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

.avatar-picker .auth-error {
  min-height: 0;
  font-size: 0.72rem;
  text-align: center;
}

/* Square crop dialog */
.nova-crop-modal {
  z-index: 100000;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
}

.crop-container {
  width: 100%;
  max-width: 330px;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.crop-container h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-align: center;
}

.crop-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  cursor: grab;
  touch-action: none;
}

.crop-viewport.is-dragging {
  cursor: grabbing;
}

.crop-viewport img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  user-select: none;
  -webkit-user-drag: none;
}

/* Shows the circle the picture will be cropped to, without clipping the drag area. */
.crop-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
  pointer-events: none;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.crop-zoom input {
  flex: 1;
  accent-color: #3b82f6;
  cursor: pointer;
}

.crop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.crop-actions .auth-btn {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.crop-actions .auth-btn.secondary {
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
}

.crop-actions .auth-btn.secondary:hover {
  background: var(--bg-hover);
  transform: none;
  box-shadow: none;
}

/* Pre-launch population preview. Synthetic rows stay visibly distinct from
   real civic totals and verified community activity. */
.demo-population-inline,
.demo-population-banner {
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
  color: #5b21b6;
}

.demo-population-inline {
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.demo-population-inline span,
.demo-population-banner > span,
.community-profile-simulation-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.35rem 0.5rem;
}

.demo-population-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 1rem 1.25rem 0;
  padding: 0.85rem;
  border-radius: var(--radius-md);
}

.demo-population-banner strong { display: block; color: #4c1d95; font-size: 0.85rem; }
.demo-population-banner p { margin: 0.15rem 0 0; color: #6d28d9; font-size: 0.75rem; line-height: 1.45; }
.leaderboard-full-row.is-synthetic { background: linear-gradient(90deg, rgba(124, 58, 237, 0.035), transparent); }
.leaderboard-full-row.is-synthetic:hover { background: rgba(124, 58, 237, 0.07); }
.leaderboard-person strong em { margin-left: 0.3rem; color: #7c3aed; font-size: 0.58rem; font-style: normal; letter-spacing: 0.05em; }
.leader-item.is-synthetic .leader-points { color: #7c3aed; }
.community-profile-simulation-label { margin: 0 0 0.65rem; }
.community-contribution-card.is-synthetic,
.community-profile-activity-list article.is-synthetic { border-color: #c4b5fd; background: linear-gradient(135deg, #fff, #faf5ff); }
.community-contribution-card.is-synthetic .community-point-award { border-color: #ddd6fe; background: rgba(255, 255, 255, .82); box-shadow: inset 3px 0 0 #8b5cf6; }
.community-contribution-card.is-synthetic .community-point-award strong,
.community-contribution-card.is-synthetic .community-point-award > span { color: #6d28d9; }

html.dark .demo-population-inline,
html.dark .demo-population-banner { border-color: #6d28d9; background: rgba(91, 33, 182, 0.2); color: #ddd6fe; }
html.dark .demo-population-banner strong { color: #ede9fe; }
html.dark .demo-population-banner p { color: #c4b5fd; }
html.dark .community-contribution-card.is-synthetic,
html.dark .community-profile-activity-list article.is-synthetic { border-color: #6d28d9; background: rgba(91, 33, 182, 0.12); }
html.dark .community-contribution-card.is-synthetic .community-point-award { border-color: rgba(196, 181, 253, .35); background: rgba(255, 255, 255, .05); box-shadow: inset 3px 0 0 #8b5cf6; }
html.dark .community-contribution-card.is-synthetic .community-point-award strong,
html.dark .community-contribution-card.is-synthetic .community-point-award > span { color: #c4b5fd; }

/* --------------------------------------------------------------------------
   Nova Voices — standalone, video-first civic feed on /discutii
   -------------------------------------------------------------------------- */

.nova-voices-root {
  /* Four-size scale shared with the rest of the app: 2rem / 1rem / .9rem / .8rem.
     Meta stays an alias of ui so the page renders exactly four text sizes. */
  --voices-type-display: 2rem;
  --voices-type-heading: 1rem;
  --voices-type-body: .9rem;
  --voices-type-ui: .8rem;
  --voices-type-meta: .8rem;
  width: 100%;
  min-width: 0;
  color: var(--text-primary);
}

.voices-loading {
  min-height: 55vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .7rem;
  color: var(--text-secondary);
  font-size: var(--voices-type-ui);
}

.voices-page {
  width: 100%;
  max-width: 1120px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 0 5rem;
}

/* Header uses the shared .page-header / .page-title / .page-description
   pattern (same as Televot and Lideri Comunitate). */
.voices-header { margin-bottom: 1.25rem; }

.voices-compose-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.voices-compose-head {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.voices-compose-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
}

.voices-compose-head strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: var(--voices-type-heading);
}

.voices-compose-head > div > span {
  display: block;
  margin-top: .14rem;
  color: var(--text-secondary);
  font-size: var(--voices-type-ui);
  line-height: 1.45;
}

.voices-filter-row label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 .75rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
}

.voices-filter-row select,
.voices-filter-row input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--voices-type-ui);
  font-weight: 650;
}

.voices-stance-group {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
}

.voices-stance-group button {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: 0 .65rem;
  border: 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--voices-type-ui);
  font-weight: 750;
  cursor: pointer;
}

.voices-stance-group button:last-child { border-right: 0; }
.voices-stance-group button:hover { background: var(--bg-hover); color: #2563eb; }
.voices-stance-group button.active { background: #eff6ff; color: #2563eb; box-shadow: inset 0 0 0 1px #2563eb; }

.voice-studio-stances {
  gap: 4px;
  padding: 3px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-secondary);
  overflow: visible;
}

.voice-studio-stances button {
  justify-content: center;
  gap: .35rem;
  padding: 0 .45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: center;
  white-space: nowrap;
}

.voice-studio-stances button:hover { background: var(--bg-card); }

.voice-studio-stances button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.voice-studio-stances button:last-child { border-right: 1px solid transparent; }
.voice-studio-stances button[data-studio-stance="pro"].active { border-color: #86efac; background: #ecfdf5; color: #047857; box-shadow: none; }
.voice-studio-stances button[data-studio-stance="contra"].active { border-color: #fda4af; background: #fff1f2; color: #be123c; box-shadow: none; }
.voice-studio-stances button[data-studio-stance="question"].active { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; box-shadow: none; }

.voices-record-primary,
.voice-publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .17);
}

.voices-record-primary {
  flex: 0 0 auto;
  min-width: 0;
  height: 44px;
  padding: 0 1.1rem;
  font-size: var(--voices-type-ui);
}

.voices-record-primary > span { display: inline; text-align: left; }

.voices-record-primary:hover,
.voice-publish:hover { background: #1d4ed8; }

.voices-record-primary > i { font-size: var(--voices-type-meta); }

.voices-discovery {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  align-items: start;
  margin-top: 1.25rem;
}

.voices-feed-tabs {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .22rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
}

.voices-feed-tabs button {
  height: 34px;
  padding: 0 .85rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--voices-type-ui);
  font-weight: 750;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.voices-feed-tabs button:hover { color: #2563eb; background: var(--bg-hover); }
.voices-feed-tabs button.active { background: #eff6ff; color: #2563eb; box-shadow: inset 0 0 0 1px #bfdbfe; }

.voices-filter-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 190px 190px;
  gap: .55rem;
}

.voices-filter-row label {
  height: 36px;
  padding: 0 .65rem;
}

.voices-filter-row label > i { color: var(--text-muted); font-size: var(--voices-type-ui); }
.voices-filter-row select,
.voices-filter-row input { font-weight: 600; }
.voices-filter-row input::placeholder { color: var(--text-muted); font-weight: 400; opacity: 1; }
.voices-search-filter:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }

.voices-feed { margin-top: 1rem; }

.voices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.voice-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(145px, 36%) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 7px;
  background: var(--bg-card);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.voice-card:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(15, 23, 42, .08);
}

.voice-card-media {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #0f172a;
  cursor: pointer;
}

.voice-card-media img,
.voice-card-media video {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: cover;
  object-position: center;
}

.voice-card-media video { pointer-events: none; }

.voice-play {
  position: absolute;
  left: .65rem;
  bottom: .65rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 50%;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  font-size: var(--voices-type-ui);
  backdrop-filter: blur(4px);
}

.voice-card-media.is-playing .voice-play { opacity: 0; }

.voice-card-media > time {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  padding: .2rem .32rem;
  border-radius: 3px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: var(--voices-type-meta);
  font-weight: 750;
}

.voice-caption {
  position: absolute;
  right: .55rem;
  bottom: 3rem;
  left: .55rem;
  display: -webkit-box;
  max-height: 2.7em;
  overflow: hidden;
  padding: .18rem .35rem;
  color: #fff;
  font-size: var(--voices-type-meta);
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.voice-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: .78rem;
}

.voice-reform-title {
  display: -webkit-box;
  min-height: 2.55em;
  overflow: hidden;
  color: #2563eb;
  font-family: "Poppins", sans-serif;
  font-size: var(--voices-type-body);
  font-weight: 700;
  line-height: 1.28;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.voice-reform-title:hover { text-decoration: underline; }

.voice-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  margin-top: .6rem;
  color: var(--text-muted);
  font-size: var(--voices-type-meta);
}

.voice-card-signals {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .55rem;
}

.voice-stance {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .28rem .5rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  font-size: var(--voices-type-meta);
  font-weight: 750;
  white-space: nowrap;
}

.voice-stance.pro { color: #059669; }
.voice-stance.contra { color: #e11d48; }
.voice-stance.question { color: #475569; }
.voice-author { min-width: 0; display: flex; align-items: baseline; gap: .3rem; overflow: hidden; color: var(--text-secondary); }
.voice-author b { overflow: hidden; color: var(--text-primary); font-size: var(--voices-type-ui); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.voice-author small { overflow: hidden; color: var(--text-muted); font-size: var(--voices-type-ui); text-overflow: ellipsis; white-space: nowrap; }

.voice-useful {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: 0 .5rem;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--voices-type-meta);
  font-weight: 750;
  cursor: pointer;
}

.voice-useful:hover { border-color: #93c5fd; color: #2563eb; }
.voice-useful.active { border-color: #86efac; background: #f0fdf4; color: #059669; }
.voice-useful b { font-size: var(--voices-type-meta); }

.voice-card-body > p {
  display: -webkit-box;
  min-height: 4.5em;
  max-height: 4.5em;
  overflow: hidden;
  margin: .65rem 0 0;
  color: var(--text-secondary);
  font-size: var(--voices-type-ui);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.voice-card footer {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: .4rem;
  margin-top: auto;
  padding-top: .58rem;
  border-top: 1px solid var(--border-light);
}

.voice-card footer button {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: 0 .4rem;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--voices-type-meta);
  font-weight: 750;
  cursor: pointer;
}

.voice-card footer button:hover { border-color: #93c5fd; color: #2563eb; }

.voices-sentinel { height: 2px; }

.voices-empty {
  grid-column: 1 / -1;
  min-height: 290px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .55rem;
  padding: 2rem;
  border: 1px dashed var(--border-medium);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}

.voices-empty > i { color: #93c5fd; font-size: var(--voices-type-display); }
.voices-empty strong { color: var(--text-primary); }
.voices-empty span { font-size: var(--voices-type-ui); }
.voices-empty-actions { display: flex; gap: .5rem; margin-top: .35rem; }
.voices-empty button { min-height: 40px; padding: 0 .9rem; border: 0; border-radius: 5px; background: #2563eb; color: #fff; font: inherit; font-size: var(--voices-type-ui); font-weight: 750; cursor: pointer; }
.voices-empty button.is-secondary { border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-secondary); }
.voices-empty button.is-secondary:hover { border-color: #93c5fd; color: #2563eb; }

/* Recording studio */
.voice-studio {
  position: fixed;
  inset: 50% auto auto 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  width: min(1040px, calc(100vw - 2rem));
  max-height: min(800px, calc(100dvh - 2rem));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .3);
}

.voice-studio::backdrop { background: rgba(15, 23, 42, .65); backdrop-filter: blur(4px); }
.voice-studio-shell > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border-light); background: color-mix(in srgb, var(--bg-card) 96%, transparent); backdrop-filter: blur(12px); }
.voice-studio-shell > header h2 { margin: 0; font-family: "Poppins", sans-serif; font-size: var(--voices-type-heading); }
.voice-studio-shell > header button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bg-hover); color: var(--text-secondary); cursor: pointer; }

.voice-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr);
  gap: 1rem;
  padding: 1rem;
}

.voice-camera-pane { min-width: 0; }
.voice-camera-stage { position: relative; min-height: 500px; overflow: hidden; border-radius: 8px; background: #0f172a; }
.voice-camera-stage > video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.voice-camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .55rem; color: #cbd5e1; text-align: center; }
.voice-camera-placeholder[hidden] { display: none; }
.voice-camera-placeholder > i { font-size: var(--voices-type-display); color: #60a5fa; }
.voice-camera-placeholder strong { color: #fff; font-size: var(--voices-type-body); }
.voice-camera-placeholder span { max-width: 320px; color: #94a3b8; font-size: var(--voices-type-ui); }
.voice-recording-status { position: absolute; z-index: 3; top: .75rem; left: .75rem; display: flex; align-items: center; gap: .35rem; padding: .35rem .5rem; border-radius: 5px; background: rgba(15, 23, 42, .78); color: #fff; font-size: var(--voices-type-ui); }
.voice-recording-status[hidden] { display: none; }
.voice-recording-status > i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: voice-rec-pulse 1s ease-in-out infinite; }
.voice-recording-status strong { margin-left: .35rem; }

@keyframes voice-rec-pulse { 50% { opacity: .35; } }

.voice-teleprompter { position: absolute; z-index: 2; right: .75rem; bottom: .75rem; left: .75rem; padding: .7rem .8rem; border-radius: 6px; background: rgba(15, 23, 42, .72); color: #fff; text-align: center; backdrop-filter: blur(5px); }
.voice-teleprompter > span { color: #93c5fd; font-size: var(--voices-type-ui); font-weight: 850; letter-spacing: .06em; }
.voice-teleprompter p { max-width: 560px; margin: .35rem auto; font-size: var(--voices-type-body); line-height: 1.5; }
.voice-teleprompter small { color: #cbd5e1; font-size: var(--voices-type-ui); }

.voice-camera-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .65rem; }
.voice-camera-actions button,
.voice-camera-actions label { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: .4rem; padding: 0 .65rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: var(--voices-type-ui); font-weight: 750; cursor: pointer; }
.voice-camera-actions button:hover,
.voice-camera-actions label:hover { border-color: #93c5fd; color: #2563eb; }
.voice-camera-actions button:disabled { opacity: .45; cursor: not-allowed; }
.voice-camera-actions [data-action="record"]:not(:disabled) { border-color: #fecaca; color: #dc2626; }

.voice-studio-form { min-width: 0; display: flex; flex-direction: column; gap: .9rem; }
.voice-studio-form > label { position: relative; display: grid; gap: .35rem; color: var(--text-secondary); font-size: var(--voices-type-ui); font-weight: 750; }
.voice-studio-form > label > span,
.voice-studio-form legend { color: var(--text-muted); font-size: var(--voices-type-ui); font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.voice-studio-form select,
.voice-studio-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-secondary); color: var(--text-primary); font: inherit; font-size: var(--voices-type-ui); }
.voice-studio-form select { min-height: 44px; padding: 0 .7rem; }
.voice-studio-form textarea { resize: vertical; min-height: 100px; padding: .7rem; line-height: 1.5; }
.voice-studio-form > label > small { justify-self: end; color: var(--text-muted); font-size: var(--voices-type-ui); }
.voice-studio-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.voice-studio-form legend { margin-bottom: .35rem; }
.voice-studio-stances button { min-height: 42px; font-size: var(--voices-type-ui); }
.voice-studio-note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .55rem; align-items: start; padding: .65rem; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1d4ed8; }
.voice-studio-note > i { width: 28px; height: 28px; display: grid; place-items: center; }
.voice-studio-note p { margin: 0; }
.voice-studio-note strong { display: block; font-size: var(--voices-type-ui); }
.voice-studio-note span { display: block; margin-top: .2rem; font-size: var(--voices-type-ui); line-height: 1.45; }
.voice-publish { min-height: 46px; padding: 0 1rem; font-size: var(--voices-type-ui); }
.voice-publish:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.voice-studio-feedback { min-height: 1.2em; margin: -.35rem 0 0; color: var(--text-secondary); font-size: var(--voices-type-ui); line-height: 1.45; }

html.dark .voices-stance-group button.active { background: rgba(37, 99, 235, .18); color: #93c5fd; }
html.dark .voices-compose-icon { background: rgba(37, 99, 235, .18); color: #93c5fd; }
html.dark .voice-studio-stances button:hover { background: var(--bg-hover); }
html.dark .voice-studio-stances button[data-studio-stance="pro"].active { border-color: rgba(16, 185, 129, .5); background: rgba(16, 185, 129, .14); color: #6ee7b7; }
html.dark .voice-studio-stances button[data-studio-stance="contra"].active { border-color: rgba(244, 63, 94, .5); background: rgba(244, 63, 94, .14); color: #fda4af; }
html.dark .voice-studio-stances button[data-studio-stance="question"].active { border-color: rgba(96, 165, 250, .5); background: rgba(37, 99, 235, .16); color: #93c5fd; }
html.dark .voice-useful.active { border-color: rgba(16, 185, 129, .45); background: rgba(16, 185, 129, .12); color: #6ee7b7; }
html.dark .voice-studio-note { border-color: #315a8d; background: #172b46; color: #bfdbfe; }
html.dark .voice-stance.question { color: #cbd5e1; }

@media (max-width: 1180px) {
  .voices-discovery { grid-template-columns: 1fr; gap: .75rem; }
  .voices-filter-row { padding-bottom: .7rem; }
}

@media (max-width: 980px) {
  .voices-grid { grid-template-columns: 1fr; }
  .voice-studio-body { grid-template-columns: 1fr; }
  .voice-camera-stage { min-height: 460px; }
}

@media (max-width: 720px) {
  .voices-page { padding: 0 0 5.5rem; }
  .voices-compose-strip { flex-direction: column; align-items: stretch; padding: .8rem; }
  .voices-record-primary { width: 100%; }
  .voices-stance-group { width: 100%; }
  .voices-feed-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .voices-feed-tabs::-webkit-scrollbar { display: none; }
  .voices-feed-tabs button { min-width: 96px; flex: 1 0 auto; }
  .voices-filter-row { grid-template-columns: 1fr; }
  .voices-filter-row label { height: 44px; }
  .voices-filter-row select,
  .voices-filter-row input,
  .voice-studio-form select,
  .voice-studio-form textarea { font-size: 16px; }
  .voices-grid { grid-template-columns: 1fr; gap: .75rem; }
  .voice-studio { inset: auto 0 0; width: 100%; max-width: none; max-height: calc(100dvh - var(--header-height)); margin: 0; transform: none; border-width: 1px 0 0; border-radius: 16px 16px 0 0; }
  .voice-studio-body { padding: .75rem; }
  .voice-camera-stage { min-height: min(54vh, 520px); }
  .voice-camera-actions { grid-template-columns: 1fr; }
  .voice-camera-actions button,
  .voice-camera-actions label { min-height: 46px; }
}

@media (max-width: 560px) {
  .voice-card { grid-template-columns: minmax(118px, 36%) minmax(0, 1fr); }
  .voice-card-body { padding: .65rem; }
}

@media (max-width: 420px) {
  .voice-card footer { grid-template-columns: repeat(2, 1fr); }
  .voice-card footer button { min-height: 42px; font-size: var(--voices-type-ui); }
}
