/* ==========================================================================
   JanWatchdog - Main App Layout & Component Styles
   ========================================================================== */

/* Header & Ticker Bar */
.top-ticker {
  background: rgba(7, 10, 19, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.ticker-items {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.ticker-items::-webkit-scrollbar { display: none; }
.top-ticker > div:last-child { flex-shrink: 0; white-space: nowrap; margin-left: 12px; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ticker-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.ticker-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

/* Main Navigation Bar */
.main-header {
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14, 22, 38, 0.65);
  backdrop-filter: var(--glass-blur);
  flex-wrap: wrap;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}


.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.brand-title h1 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-title p {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 18, 32, 0.7);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.nav-tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #0e2744, #14355c);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.2);
}

/* Sub Navigation Tabs (Inside Section) */
.sub-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.sub-nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 18, 32, 0.85);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.sub-nav-btn {
  padding: 8px 18px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sub-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.sub-nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.45);
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.2);
}

.sub-nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.devolution-subtab-pane {
  display: block;
}

/* Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

/* Section Header */
.section-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 26px;
  font-weight: 800;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* KPI Overview Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(14, 22, 38, 0.85);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
}

.kpi-card .kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-card .kpi-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
}

.kpi-card .kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Devolution Flow Pipeline Diagram */
.flow-diagram-container {
  padding: 24px;
  margin-bottom: 32px;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.8) 0%, rgba(9, 14, 26, 0.95) 100%);
}

.flow-step-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.5fr;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.flow-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(17, 27, 46, 0.85);
  border: 1px solid var(--border-card);
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.flow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.4);
}

.flow-card .step-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-teal);
  margin-bottom: 6px;
}

.flow-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.flow-card .amount {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
}

.flow-arrow {
  color: var(--accent-teal);
  font-size: 20px;
  opacity: 0.7;
}

/* Formula Criteria Weights Cards */
.criteria-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(13, 20, 36, 0.7);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.criteria-card .weight-badge {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-saffron);
}

/* State Comparison Cards & Table */
.data-table-container {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.custom-table th {
  padding: 14px 18px;
  background: rgba(11, 18, 32, 0.9);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Simulator Widget */
.sim-controls {
  padding: 24px;
  border-radius: 16px;
  background: rgba(14, 22, 38, 0.85);
  border: 1px solid var(--border-card);
}

.slider-group {
  margin-bottom: 18px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.slider-val {
  font-family: var(--font-mono);
  color: var(--accent-teal);
  font-weight: 700;
}

/* Major Head Cards */
.head-card {
  padding: 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.head-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Scheme Card & District Card */
.district-card {
  padding: 22px;
  border-radius: 16px;
  background: rgba(14, 22, 38, 0.8);
  border: 1px solid var(--border-card);
  transition: all var(--transition-normal);
}

.district-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
  border-color: rgba(6, 182, 212, 0.3);
}

.scheme-row {
  padding: 12px;
  background: rgba(10, 16, 30, 0.7);
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Audit Alert Card */
.alert-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  border-left: 4px solid var(--accent-crimson);
  margin-bottom: 18px;
  transition: transform var(--transition-fast);
}

.alert-card.high {
  border-left-color: var(--accent-saffron);
}
.alert-card.medium {
  border-left-color: var(--accent-sky);
}

.alert-card:hover {
  transform: translateX(4px);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--border-card);
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  padding: 28px;
  position: relative;
}

.close-modal-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 15-Digit Classification Explainer */
.digit-breakdown-card {
  background: linear-gradient(135deg, rgba(14, 28, 52, 0.85), rgba(11, 20, 38, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.digit-tiers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.digit-tier-box {
  background: rgba(7, 12, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: all var(--transition-fast);
}

.digit-tier-box:hover {
  border-color: var(--accent-teal);
  transform: translateY(-2px);
  background: rgba(14, 30, 56, 0.9);
}

.digit-tier-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-teal);
  background: rgba(6, 182, 212, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.digit-tier-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.digit-tier-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Spending Alerts Subtabs */
.alerts-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 18, 32, 0.85);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.alerts-subtab-btn {
  padding: 7px 16px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.alerts-subtab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.alerts-subtab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(245, 158, 11, 0.25));
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.2);
}

/* ============================================================
   CHATBOT STYLES
   ============================================================ */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 68vh;
  min-height: 520px;
  background: rgba(11, 18, 32, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.chat-messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  min-height: 100%;
}

.chat-welcome-icon {
  font-size: 48px;
  margin-bottom: 14px;
  animation: floatBounce 2.5s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.chat-welcome h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.chat-welcome p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 700px;
}

.chat-suggestion-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chat-suggestion-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Chat Messages */
.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.chat-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-message-user .chat-msg-avatar {
  background: rgba(6, 182, 212, 0.2);
}

.chat-message-assistant .chat-msg-avatar {
  background: rgba(99, 102, 241, 0.2);
}

.chat-msg-body {
  flex: 1;
  min-width: 0;
}

.chat-msg-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-msg-content {
  background: rgba(17, 27, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.chat-message-user .chat-msg-content {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
}

.chat-message-error .chat-msg-content {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.chat-msg-content p { margin-bottom: 8px; }
.chat-msg-content p:last-child { margin-bottom: 0; }

.chat-msg-content h2.chat-heading,
.chat-msg-content h3.chat-heading,
.chat-msg-content h4.chat-heading {
  font-size: 15px;
  font-weight: 700;
  margin: 12px 0 6px;
  color: var(--accent-teal);
}

.chat-msg-content .chat-list {
  padding-left: 20px;
  margin: 8px 0;
}

.chat-msg-content .chat-list li {
  margin-bottom: 4px;
  font-size: 13px;
}

.chat-msg-content .chat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12px;
}

.chat-msg-content .chat-table td {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-msg-content .chat-table tr:first-child td {
  background: rgba(6, 182, 212, 0.1);
  font-weight: 700;
}

.chat-msg-content .chat-code-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  margin: 8px 0;
}

.chat-msg-content .chat-inline-code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.chat-msg-content .chat-currency {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-saffron);
}

.chat-msg-content .chat-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

.chat-msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Typing Indicator */
.chat-typing-dots {
  display: flex;
  gap: 5px;
  padding: 12px 18px;
  background: rgba(17, 27, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  width: fit-content;
}

.chat-typing-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: typingPulse 1.4s ease-in-out infinite;
}

.chat-typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.1); }
}

/* Chat Input */
.chat-input-area {
  flex-shrink: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 19, 0.95);
  position: relative;
  z-index: 10;
  display: block !important;
  visibility: visible !important;
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(14, 22, 38, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 8px 14px;
  transition: border-color var(--transition-fast);
}

.chat-input-wrapper:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  resize: none;
  outline: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.5;
  display: block;
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.chat-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-body);
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.chat-clear-btn:hover {
  color: var(--accent-crimson);
  background: rgba(244, 63, 94, 0.1);
}

/* ============================================================
   STARTUP EVALUATION PIPELINE
   ============================================================ */
.startup-pipeline-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-step {
  background: rgba(14, 22, 38, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  min-width: 140px;
  transition: all var(--transition-fast);
}

.pipeline-step:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

.pipeline-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  color: white;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.pipeline-step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-step-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pipeline-arrow {
  color: var(--accent-teal);
  font-size: 18px;
  opacity: 0.6;
}

/* ============================================================
   CHUNKED EVALUATION PROGRESS BANNER
   ============================================================ */
.eval-progress-banner {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.eval-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: evalSpin 0.8s linear infinite;
}

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

.eval-stages-tracker {
  display: flex;
  align-items: center;
  gap: 0;
}

.eval-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.eval-stage.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--accent-teal);
  animation: evalPulse 1.5s ease-in-out infinite;
}

.eval-stage.done {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

@keyframes evalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
}

.eval-stage-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.eval-stage.active .eval-stage-num {
  background: var(--accent-teal);
  color: #0a101e;
}

.eval-stage.done .eval-stage-num {
  background: var(--accent-emerald);
  color: #0a101e;
}

.eval-stage-connector {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}


/* Responsive */
@media (max-width: 1024px) {
  .flow-step-pipeline {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    transform: rotate(90deg);
    margin: 4px auto;
  }
  .grid-4, .grid-3, .grid-2, .kpi-row {
    grid-template-columns: 1fr;
  }
  .top-ticker {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .chat-window {
    height: 55vh;
    min-height: 400px;
  }
  .startup-pipeline-steps {
    flex-direction: column;
  }
  .pipeline-arrow {
    transform: rotate(90deg);
  }
  .digit-tiers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .main-header {
    flex-direction: column;
    padding: 14px 16px;
  }
  .nav-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .app-container {
    padding: 16px;
  }
  .digit-tiers-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   INSTITUTIONS: 3 PILLARS (JUDICIARY, LEGISLATURE, EXECUTIVE)
   ============================================================ */
.pillar-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pillar-btn {
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(14, 22, 38, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.pillar-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.pillar-btn.active {
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-teal);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

.tier-nav {
  display: flex;
  gap: 8px;
  background: rgba(10, 16, 30, 0.9);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  width: fit-content;
  margin-bottom: 24px;
}
.tier-btn {
  padding: 8px 18px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tier-btn:hover {
  color: var(--text-primary);
}
.tier-btn.active {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: white;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.inst-section-title {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-mla-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .mp-mla-wrapper {
    grid-template-columns: 1fr;
  }
}
.mp-mla-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.mp-mla-card.mp-highlight {
  border-color: rgba(99, 102, 241, 0.35);
}
.mp-mla-card.mla-highlight {
  border-color: rgba(245, 158, 11, 0.35);
}


/* ============================================================
   STANDALONE ASK ME CHATBOX (askme.js — no auth required)
   Prefix: am- to avoid conflicts with startup evaluator chat
   ============================================================ */
#askme-chat-container { margin-top: 8px; }

.am-chat-window {
  display: flex;
  flex-direction: column;
  height: 68vh;
  min-height: 520px;
  background: rgba(11, 18, 32, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  overflow: hidden;
}

.am-messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.am-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  min-height: 100%;
}

.am-welcome-icon { font-size: 52px; margin-bottom: 16px; animation: floatBounce 2.5s ease-in-out infinite; }
.am-welcome h3 { font-size: 22px; margin-bottom: 8px; color: var(--text-primary); }
.am-welcome p { font-size: 14px; color: var(--text-secondary); max-width: 520px; margin-bottom: 28px; line-height: 1.5; }

.am-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; }

.am-suggestion-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.am-suggestion-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.am-message { display: flex; gap: 12px; margin-bottom: 20px; animation: fadeIn 0.3s ease; }
.am-msg-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.am-msg-user .am-msg-avatar { background: rgba(6, 182, 212, 0.2); }
.am-msg-assistant .am-msg-avatar { background: rgba(99, 102, 241, 0.2); }
.am-msg-error .am-msg-avatar { background: rgba(244, 63, 94, 0.15); }
.am-msg-body { flex: 1; min-width: 0; }
.am-msg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }

.am-msg-content {
  background: rgba(17, 27, 46, 0.7);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 18px;
  font-size: 14px; line-height: 1.6; color: var(--text-primary);
}
.am-msg-user .am-msg-content { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.25); }
.am-msg-error .am-msg-content { background: rgba(244,63,94,0.1); border-color: rgba(244,63,94,0.3); color: #fb7185; }

.am-typing-dots { display: flex; gap: 6px; padding: 14px 18px; background: rgba(17,27,46,0.7); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; width: fit-content; }
.am-typing-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-teal); animation: typingPulse 1.4s ease-in-out infinite; }
.am-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.am-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

.am-input-area {
  flex-shrink: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 19, 0.95);
}

.am-input-wrapper {
  display: flex; align-items: flex-end; gap: 10px;
  background: rgba(14, 22, 38, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 8px 14px;
  transition: border-color var(--transition-fast);
}
.am-input-wrapper:focus-within { border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }

.am-input {
  flex: 1; background: transparent; border: none;
  color: var(--text-primary); font-family: var(--font-body);
  font-size: 14px; resize: none; outline: none;
  min-height: 42px; max-height: 120px; line-height: 1.5;
}
.am-input::placeholder { color: var(--text-muted); }

.am-send-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  border: none; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition-fast);
}
.am-send-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(6,182,212,0.4); }
.am-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.am-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; color: var(--text-muted); }

.am-clear-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer; font-family: var(--font-body); transition: color 0.2s;
}
.am-clear-btn:hover { color: var(--accent-crimson); }

/* ============================================================
   LIVE REPORTING FEED AND STATE / UT COVERAGE PANELS
   ============================================================ */
.feed-panel { padding: 20px 22px; }
.feed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.feed-heading { font-size: 16px; font-weight: 700; margin: 0; }
.feed-sub { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.feed-updated { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed-item { padding: 12px 0; border-top: 1px solid var(--border-subtle); min-width: 0; }
.feed-item:first-child { border-top: none; padding-top: 4px; }
.feed-item-related { opacity: 0.85; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.feed-publisher { color: var(--accent-teal); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.feed-ministry { color: var(--accent-saffron); }
.feed-title { display: block; color: var(--text-primary); font-weight: 600; font-size: 14px; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.feed-title:hover { color: var(--accent-sky); text-decoration: underline; }
.feed-summary { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.feed-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); color: var(--text-secondary); }
.feed-tag-place { color: #a5f3fc; border-color: rgba(6, 182, 212, 0.3); }
.feed-tag-fact { color: #fda4af; border-color: rgba(244, 63, 94, 0.35); }
.feed-divider { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 12px 0 4px; border-top: 1px dashed var(--border-subtle); }
.feed-loading, .feed-empty { font-size: 13px; color: var(--text-muted); padding: 10px 0; }

.coverage-panel { display: flex; flex-direction: column; gap: 18px; margin: 8px 0 24px; }
.coverage-header { padding: 20px 22px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.coverage-title h3 { font-size: 20px; margin: 8px 0 4px; }
.coverage-title p { font-size: 13px; color: var(--text-secondary); margin: 0; max-width: 640px; }
.coverage-stats { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 10px; min-width: 0; }
.coverage-stat { background: rgba(10, 16, 30, 0.7); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.coverage-stat span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.coverage-stat strong { font-size: 14px; font-family: var(--font-mono); overflow-wrap: anywhere; }
.coverage-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.coverage-cag { padding: 20px 22px; }
.cag-mini-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cag-mini-list li { border-left: 2px solid rgba(245, 158, 11, 0.5); padding-left: 10px; }
.cag-mini-list a { color: var(--text-primary); font-size: 13px; line-height: 1.45; text-decoration: none; display: block; overflow-wrap: anywhere; }
.cag-mini-list a:hover { color: var(--accent-sky); text-decoration: underline; }
.cag-mini-list span { font-size: 11px; color: var(--text-muted); }
.cag-mini-foot { font-size: 11px; color: var(--text-muted); margin-top: 12px; }

.region-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.region-filter-bar label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.region-filter-bar select { min-width: 200px; max-width: 100%; }

/* ============================================================
   RESPONSIVE LAYER
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; }
.glass-panel, .kpi-card, .feed-panel, .coverage-panel { min-width: 0; }
.data-table-container, .table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.custom-table { min-width: 640px; }
select.input-glass, input.input-glass { max-width: 100%; }

@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .coverage-grid { grid-template-columns: 1fr; }
  .main-header { padding: 14px 20px; }
  .app-container { padding: 22px 20px 60px; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-nav-tabs { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
}

@media (max-width: 768px) {
  .main-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .brand-title h1 { font-size: 19px; }
  .brand-title p { display: none; }
  .nav-tabs {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-category-group { flex: 0 0 auto; scroll-snap-align: start; }
  .nav-tab-btn { padding: 8px 12px; font-size: 12.5px; }
  .section-header { align-items: flex-start; }
  .section-header h2 { font-size: 21px; }
  .sub-nav-wrapper { flex-direction: column; align-items: stretch; }
  .sub-nav-tabs { width: 100%; }
  .coverage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .coverage-header, .feed-panel, .coverage-cag { padding: 16px; }
  .top-ticker { font-size: 11px; }
  .ticker-items { flex-wrap: wrap; gap: 8px 14px; }
  .modal-box { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; max-height: 88vh; overflow-y: auto; }
  .chat-window, .am-chat-window { height: 70vh; min-height: 420px; }
}

@media (max-width: 640px) {
  .app-container { padding: 14px 12px 48px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 12px; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-card { padding: 12px 14px; }
  .kpi-card .kpi-value { font-size: 16px; overflow-wrap: anywhere; }
  .kpi-card .kpi-sub { font-size: 11px; }
  .glass-panel { border-radius: 14px; }
  .region-filter-bar select, .region-filter-bar input { width: 100%; min-width: 0; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .chat-input-area, .am-input-area { padding: 10px; }
  .chat-messages, .am-messages { padding: 14px; }
  .chat-msg-content table, .am-msg-content table { display: block; overflow-x: auto; }
}

/* Ask Me reply formatting */
.am-msg-content p { margin: 0 0 8px; }
.am-msg-content p:last-child { margin-bottom: 0; }
.am-msg-content .chat-heading { font-size: 14px; margin: 10px 0 6px; color: var(--text-primary); }
.am-msg-content .chat-list { margin: 4px 0 8px 18px; }
.am-msg-content .chat-list li { margin-bottom: 3px; }
.am-msg-content .chat-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; min-width: 420px; }
.am-msg-content .chat-table th, .am-msg-content .chat-table td { border: 1px solid var(--border-subtle); padding: 6px 8px; text-align: left; vertical-align: top; }
.am-msg-content .chat-table th { background: rgba(255, 255, 255, 0.04); font-weight: 700; }

/* ============================================================
   STARTUP FEASIBILITY FORM, DOSSIER AND VERDICT
   ============================================================ */
.feas-form { padding: 14px 18px; margin-bottom: 16px; }
.feas-form summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; list-style: none; }
.feas-form summary::-webkit-details-marker { display: none; }
.feas-form summary::before { content: '+'; font-family: var(--font-mono); color: var(--accent-teal); margin-right: 4px; }
.feas-form[open] summary::before { content: '-'; }
.feas-title { font-weight: 700; font-size: 14px; }
.feas-hint { font-size: 12px; color: var(--text-muted); }
.feas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.feas-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.feas-grid .input-glass { padding: 8px 10px; font-size: 13px; width: 100%; }
.feas-flags { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-secondary); }
.feas-flags label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

.feas-dossier { display: flex; flex-direction: column; gap: 14px; }
.feas-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.feas-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-teal); font-weight: 700; }
.feas-head h4 { font-size: 16px; margin: 2px 0; }
.feas-place { font-size: 12px; color: var(--text-muted); }
.feas-score { text-align: right; font-family: var(--font-mono); flex-shrink: 0; }
.feas-score strong { font-size: 30px; color: var(--accent-saffron); }
.feas-score span { color: var(--text-muted); }
.feas-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.feas-kpis > div { background: rgba(10, 16, 30, 0.7); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 12px; }
.feas-kpis span { display: block; font-size: 10.5px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.feas-kpis strong { display: block; font-family: var(--font-mono); font-size: 16px; margin: 2px 0; }
.feas-kpis small { font-size: 11px; color: var(--text-muted); }
.feas-section h5 { font-size: 13px; margin: 0 0 8px; color: var(--text-primary); }
.feas-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feas-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.feas-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.feas-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: top; }
.feas-note { font-size: 11.5px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.5; }
.feas-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); }
.feas-params { display: flex; flex-direction: column; gap: 6px; }
.feas-param { display: grid; grid-template-columns: 180px 1fr 34px; gap: 10px; align-items: center; font-size: 12px; }
.feas-param strong { font-family: var(--font-mono); text-align: right; }
.feas-bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.feas-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-teal), var(--accent-indigo)); border-radius: 999px; }
.feas-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.feas-pillars > div { border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border-subtle); background: rgba(6, 182, 212, 0.06); }
.feas-pillars span { display: block; font-size: 10.5px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.feas-pillars strong { display: block; font-family: var(--font-mono); font-size: 22px; color: var(--accent-teal); text-transform: capitalize; }
.feas-pillars small { font-size: 11px; color: var(--text-secondary); }
.feas-conf-low strong { color: var(--accent-crimson); }
.feas-conf-medium strong { color: var(--accent-saffron); }
.feas-conf-high strong { color: var(--accent-emerald); }
.feas-cap { color: var(--accent-crimson); }
.feas-flag-list { display: flex; flex-direction: column; gap: 8px; }
.feas-flag { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.feas-flag strong { color: var(--text-primary); font-size: 12.5px; }
.feas-flag-high { border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.07); }
.feas-flag-medium { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.07); }
.feas-flag-low { border-color: rgba(99, 102, 241, 0.35); background: rgba(99, 102, 241, 0.06); }
.feas-chart { margin: 10px 0; background: rgba(10, 16, 30, 0.7); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 12px; }
.feas-chart svg { width: 100%; height: 120px; display: block; overflow: visible; }
.feas-line { fill: none; stroke: var(--accent-teal); stroke-width: 2; vector-effect: non-scaling-stroke; }
.feas-zero { stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; vector-effect: non-scaling-stroke; }
.feas-be { stroke: var(--accent-emerald); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.feas-chart-cap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.feas-assume { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.feas-assume summary { cursor: pointer; color: var(--accent-teal); }
.feas-pillar-params { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.feas-pillar-params h6 { margin: 4px 0 2px; font-size: 12px; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.04em; }
.feas-pillar-params h6 span { color: var(--accent-teal); font-family: var(--font-mono); margin-left: 6px; }
.feas-verdict { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-subtle); }
.feas-verdict.ok { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.08); }
.feas-verdict.no { border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.07); }
.feas-verdict-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.feas-verdict-value { font-size: 20px; font-weight: 800; font-family: var(--font-display); }
.feas-verdict.ok .feas-verdict-value { color: var(--accent-emerald); }
.feas-verdict.no .feas-verdict-value { color: var(--accent-crimson); }
.feas-verdict-scores { display: flex; gap: 14px; flex-wrap: wrap; }
.feas-verdict-scores span { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; }
.feas-verdict-scores strong { font-family: var(--font-mono); font-size: 15px; }
.verdict-ok { color: var(--accent-emerald); font-weight: 800; }
.verdict-no { color: var(--accent-crimson); font-weight: 800; }
.chat-msg-content blockquote { border-left: 2px solid var(--accent-teal); padding-left: 10px; color: var(--text-secondary); margin: 6px 0; }
.chat-msg-content .chat-table th { text-align: left; font-weight: 700; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.04); }
.chat-msg-content .chat-table td { padding: 6px 8px; border: 1px solid rgba(255, 255, 255, 0.08); }

@media (max-width: 768px) {
  .feas-two { grid-template-columns: 1fr; }
  .feas-param { grid-template-columns: 1fr 34px; }
  .feas-param .feas-bar { grid-column: 1 / -1; grid-row: 2; }
  .feas-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .feas-pillars > div { padding: 8px 10px; }
  .feas-pillars .feas-conf { grid-column: 1 / -1; }
  .feas-pillars strong { font-size: 18px; }
  .feas-pillars small { font-size: 10.5px; }
  .chat-msg-content { overflow-x: auto; }
}

/* Small screens: inline-styled rows and grids must wrap and shrink instead of widening the page */
@media (max-width: 768px) {
  div[style*="display:flex"], div[style*="display: flex"], header[style*="display:flex"],
  section[style*="display:flex"], span[style*="display:flex"], label[style*="display:flex"] { flex-wrap: wrap; }
  div[style*="display:grid"] > *, div[style*="display: grid"] > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
  div[style*="text-align:right"] { text-align: left !important; }
  .input-glass, select, input[type="text"], input[type="search"] { min-width: 0 !important; max-width: 100%; }
  .top-ticker { padding: 8px 12px; }
  .ticker-item { white-space: normal; flex-wrap: wrap; }
  .glass-panel, .kpi-card, .alert-card, .district-card { overflow-wrap: anywhere; }
  table { max-width: 100%; }
  .evaluator-page-header { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 480px) {
  div[style*="grid-template-columns:repeat(4"], div[style*="grid-template-columns: repeat(4"],
  div[style*="grid-template-columns:repeat(3"], div[style*="grid-template-columns: repeat(3"],
  div[style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
  div[style*="flex-direction:column"] > *, div[style*="flex-direction: column"] > * { min-width: 0; max-width: 100%; }
  .section-header > *, .region-filter-bar > *, .exp-filter-bar > *, .ws-filter-bar > * { max-width: 100%; min-width: 0; }
  .section-header select.input-glass, .section-header input.input-glass,
  .region-filter-bar select, .region-filter-bar input { width: 100% !important; }
  div[style*="minmax("] { grid-template-columns: 1fr !important; }
}

/* ============================================================
   LATEST UPDATES TAB AND NEWS CARDS
   ============================================================ */
.lu-wrap { display: flex; flex-direction: column; gap: 14px; }
.lu-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.lu-head h3 { font-size: 20px; margin: 0; }
.lu-head p { font-size: 12.5px; color: var(--text-muted); margin: 3px 0 0; }
.lu-meta { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }
.lu-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.lu-controls select { min-width: 190px; }
.lu-controls input { flex: 1; min-width: 200px; }
.lu-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lu-chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary); font-family: var(--font-display); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all var(--transition-fast);
}
.lu-chip:hover { color: var(--text-primary); border-color: rgba(6, 182, 212, 0.35); }
.lu-chip.active { color: #fff; background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(99, 102, 241, 0.25)); border-color: rgba(6, 182, 212, 0.5); }
.lu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lu-divider { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 6px 2px 0; border-top: 1px dashed var(--border-subtle); }
.lu-empty { grid-column: 1 / -1; padding: 36px 20px; text-align: center; color: var(--text-muted); font-size: 13.5px; background: var(--bg-card); border: 1px dashed var(--border-subtle); border-radius: 14px; }
.lu-more { display: flex; justify-content: center; }

.news-card {
  --pub: #38bdf8;
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 18px 18px 14px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 31, 52, 0.92) 0%, rgba(11, 18, 32, 0.95) 100%);
  border: 1px solid var(--border-card);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.news-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pub); opacity: 0.85; }
.news-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pub) 45%, transparent); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.7); }
.news-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; }
.news-pub { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pub); }
.news-pub i { width: 7px; height: 7px; border-radius: 50%; background: var(--pub); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pub) 22%, transparent); }
.news-card-head time { color: var(--text-muted); white-space: nowrap; }
.news-ministry { font-size: 11.5px; color: #fcd34d; font-weight: 600; }
.news-title { color: var(--text-primary); font-family: var(--font-display); font-size: 15.5px; font-weight: 700; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.news-title:hover { color: var(--accent-sky); }
.news-summary { font-size: 12.8px; color: var(--text-secondary); line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.news-facts span { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(244, 63, 94, 0.12); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }
.news-card-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.news-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); color: var(--text-secondary); }
.news-tag-place { color: #a5f3fc; border-color: rgba(6, 182, 212, 0.3); }
.news-read { font-size: 12px; font-weight: 700; color: var(--pub); text-decoration: none; white-space: nowrap; }
.news-read:hover { text-decoration: underline; }
.news-card-featured { grid-column: span 2; padding: 22px 24px 16px; background: linear-gradient(150deg, color-mix(in srgb, var(--pub) 14%, rgba(20, 31, 52, 0.95)) 0%, rgba(11, 18, 32, 0.96) 70%); }
.news-card-featured .news-title { font-size: 19px; }
.news-card-featured .news-summary { -webkit-line-clamp: 4; font-size: 13.5px; }
.news-skeleton { min-height: 170px; gap: 12px; }
.news-skeleton span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: luShimmer 1.4s infinite; }
.news-skeleton span:nth-child(1) { width: 35%; }
.news-skeleton span:nth-child(2) { width: 90%; height: 16px; }
.news-skeleton span:nth-child(3) { width: 75%; }
.news-skeleton span:nth-child(4) { width: 55%; }
@keyframes luShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.coverage-latest-btn { margin-top: 12px; font-size: 12px; padding: 7px 14px; }

@media (max-width: 700px) {
  .news-card-featured { grid-column: auto; padding: 18px; }
  .news-card-featured .news-title { font-size: 16.5px; }
  .lu-grid { grid-template-columns: 1fr; }
  .lu-controls select, .lu-controls input { width: 100%; min-width: 0; }
}

/* Page-level tabs (standalone pages) */
.page-tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 12px; border: 1px solid var(--border-subtle); background: rgba(11, 18, 32, 0.85); margin-bottom: 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab { padding: 9px 18px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-secondary); font-family: var(--font-display); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: all var(--transition-fast); }
.page-tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.page-tab.active { color: #fff; background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(99, 102, 241, 0.25)); border-color: rgba(6, 182, 212, 0.45); box-shadow: 0 2px 12px rgba(6, 182, 212, 0.2); }
@media (max-width: 640px) { .page-tabs { display: flex; width: 100%; } .page-tab { flex: 1 1 auto; padding: 9px 12px; } }

.lu-levels { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(11, 18, 32, 0.85); border: 1px solid var(--border-subtle); width: fit-content; max-width: 100%; overflow-x: auto; }
.lu-level { padding: 7px 16px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text-secondary); font-family: var(--font-display); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.lu-level:hover { color: var(--text-primary); }
.lu-level.active { color: #fff; background: rgba(6, 182, 212, 0.2); border-color: rgba(6, 182, 212, 0.45); }
@media (max-width: 640px) { .lu-levels { display: flex; width: 100%; } .lu-level { flex: 1 1 auto; padding: 7px 8px; } }

/* Ask Me: chat fills the screen under the navigation so the typing area is visible without scrolling */
/* Chat boxes open compact with the typing area at the top, then grow with the conversation
   up to the screen height, after which the messages scroll */
.chat-window, .am-chat-window,
#section-askme .am-chat-window { height: auto; min-height: 0; max-height: calc(100vh - 240px); }
.chat-messages, .am-messages { flex: 0 1 auto; }
.chat-messages:empty, .am-messages:empty { display: none; }
.chat-messages:empty + .chat-input-area, .am-messages:empty + .am-input-area { border-top: 0; }
@media (max-width: 768px) {
  .chat-window, .am-chat-window,
  #section-askme .am-chat-window { height: auto; min-height: 0; max-height: calc(100vh - 200px); }
}

/* Sideways tab strips fade at the edge where more tabs are hidden (set by js/tab-scroll.js) */
.tabs-scroll { scroll-behavior: smooth; }
.tabs-scroll.tabs-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.tabs-scroll.tabs-more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); }
.tabs-scroll.tabs-more-left.tabs-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }

/* ---------- Detail pop-up (js/detail-modal.js) ---------- */
html.dm-locked, html.dm-locked body { overflow: hidden; }
.dm-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center;
  padding: 4vh 16px; background: rgba(3, 6, 14, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; }
.dm-overlay.open { display: flex; }
.dm-box { width: 100%; max-width: 980px; background: #0c1424; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); position: relative; animation: dm-in 0.18s ease-out; }
@keyframes dm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dm-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; background: rgba(12, 20, 36, 0.97); border-bottom: 1px solid var(--border-subtle); border-radius: 18px 18px 0 0; }
.dm-head-text { min-width: 0; }
.dm-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-teal); margin-bottom: 4px; }
.dm-title { font-family: var(--font-display); font-size: 22px; line-height: 1.25; color: var(--text-primary); margin: 0; overflow-wrap: anywhere; }
.dm-sub { margin-top: 6px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.dm-close { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: var(--text-primary); font: 600 13px var(--font-body); }
.dm-close:hover, .dm-close:focus-visible { background: rgba(244, 63, 94, 0.16); border-color: rgba(244, 63, 94, 0.45); outline: none; }
.dm-body { padding: 8px 24px 26px; }
.dm-section { padding: 18px 0 4px; border-bottom: 1px solid var(--border-subtle); }
.dm-section:last-child { border-bottom: 0; }
.dm-section h4 { font-family: var(--font-display); font-size: 15px; color: var(--text-primary); margin: 0 0 10px; }
.dm-note { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin: -4px 0 12px; }
.dm-empty, .dm-ok { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.dm-ok { color: var(--accent-emerald); }
.dm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dm-kpi { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--border-subtle); }
.dm-kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.dm-kpi-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); margin-top: 4px; }
.dm-kpi-note { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }
.dm-kpi.dm-good .dm-kpi-value { color: var(--accent-emerald); }
.dm-kpi.dm-warn .dm-kpi-value { color: var(--accent-saffron); }
.dm-kpi.dm-bad .dm-kpi-value { color: var(--accent-crimson); }
.dm-bars { display: grid; gap: 8px; margin-bottom: 14px; }
.dm-bar-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(60px, 1.4fr) auto; gap: 10px; align-items: center; font-size: 12.5px; }
.dm-bar-label { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-bar-track { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.dm-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-teal), var(--accent-indigo)); }
.dm-bar-value { color: var(--text-primary); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.dm-progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.dm-progress-track { flex: 1; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.dm-progress-fill { height: 100%; border-radius: 6px; }
.dm-progress-fill.dm-good { background: var(--accent-emerald); }
.dm-progress-fill.dm-warn { background: var(--accent-saffron); }
.dm-progress-fill.dm-bad { background: var(--accent-crimson); }
.dm-progress-cap { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.dm-flags { display: grid; gap: 10px; margin-bottom: 14px; }
.dm-flag { padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.dm-flag-high { border-color: rgba(244, 63, 94, 0.4); background: rgba(244, 63, 94, 0.07); }
.dm-flag-medium { border-color: rgba(245, 158, 11, 0.38); background: rgba(245, 158, 11, 0.06); }
.dm-flag-low { border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.05); }
.dm-flag-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--text-primary); }
.dm-flag-sev { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.dm-flag-high .dm-flag-sev { background: rgba(244, 63, 94, 0.2); color: #fda4af; }
.dm-flag-medium .dm-flag-sev { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.dm-flag-low .dm-flag-sev { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.dm-table-wrap { overflow-x: auto; margin-bottom: 14px; border: 1px solid var(--border-subtle); border-radius: 12px; }
.dm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dm-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 10px 12px; background: rgba(255, 255, 255, 0.03); white-space: nowrap; }
.dm-table td { padding: 10px 12px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: top; }
.dm-table td strong { color: var(--text-primary); }
.dm-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--text-secondary); white-space: nowrap; }
.dm-tag.dm-good { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.dm-tag.dm-warn { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.dm-tag.dm-bad { background: rgba(244, 63, 94, 0.16); color: #fda4af; }
.dm-source { font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.dm-source a { color: var(--accent-sky); }
@media (max-width: 640px) {
  .dm-overlay { padding: 0; }
  .dm-box { border-radius: 0; min-height: 100%; }
  .dm-head { border-radius: 0; padding: 16px; }
  .dm-title { font-size: 18px; }
  .dm-body { padding: 4px 16px 24px; }
  .dm-close span { display: none; }
  .dm-bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dm-bar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- MP and MLA local area funds (js/mplads.js, Institutions > Legislature) ---------- */
.mp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.mp-title { font-family: var(--font-display); font-size: 20px; color: var(--text-primary); margin: 0 0 6px; }
.mp-lede { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin: 0; max-width: 760px; }
.mp-source-btn { font-size: 12px; padding: 7px 12px; white-space: nowrap; }
.mp-how { margin: 4px 0 16px; border: 1px solid var(--border-subtle); border-radius: 12px; padding: 10px 14px; background: rgba(255, 255, 255, 0.02); }
.mp-how summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--accent-teal); }
.mp-how ol { margin: 10px 0 2px 18px; display: grid; gap: 6px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.mp-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.mp-controls .input-glass { font-size: 13px; padding: 8px 12px; min-width: 0; max-width: 100%; }
.mp-controls input[type=search] { flex: 1 1 200px; }
.mp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.mp-count { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 10px; }
.mp-list { display: grid; gap: 8px; }
.mp-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.025); color: inherit; font: inherit; cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast); }
.mp-row:hover, .mp-row:focus-visible { border-color: var(--border-glow); background: rgba(6, 182, 212, 0.06); outline: none; }
.mp-row-name { font-weight: 700; color: var(--text-primary); font-size: 14.5px; }
.mp-row-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.mp-row-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.mp-row-figs { font-size: 12.5px; color: var(--text-secondary); }
.mp-row-figs strong { color: var(--text-primary); }
.mp-row-money .dm-progress { margin: 6px 0 4px; }
.mp-row-works { font-size: 11.5px; color: var(--text-muted); }
.mp-more { margin-top: 12px; width: 100%; }
.mp-loading { padding: 30px; text-align: center; color: var(--text-muted); font-size: 13px; }
.mla-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.mla-steps > div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.025); font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.mla-steps strong { display: block; color: var(--text-primary); font-size: 13px; margin-bottom: 4px; }
.mla-news-title { font-size: 14px; color: var(--text-primary); margin: 0 0 8px; }
.mla-news { display: grid; gap: 8px; }
.mla-news-item { display: block; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-subtle); text-decoration: none; }
.mla-news-item:hover { border-color: var(--border-glow); }
.mla-news-head { display: block; color: var(--text-primary); font-size: 13px; font-weight: 600; }
.mla-news-meta { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 3px; }
@media (max-width: 640px) {
  .mp-row { grid-template-columns: 1fr; gap: 8px; }
  .mp-controls > * { flex: 1 1 100%; }
}
.mla-explorer { margin: 16px 0 22px; }

/* ---------- Pay over the years (js/salary-timeline.js) ---------- */
.sal-mla-figure { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--accent-emerald); }
.sal-mla-note, .sal-intro { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin: 4px 0 8px; }
.sal-mla-history { margin: 6px 0 8px 18px; font-size: 12.5px; color: var(--text-secondary); }
.sal-src { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.sal-src a { color: var(--accent-sky); }
.sal-bars { display: grid; gap: 6px; margin: 10px 0; }
.sal-bar-row { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--text-secondary); }
.sal-bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.sal-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-emerald), var(--accent-teal)); }
.sal-bar-row b { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); font-size: 12px; white-space: nowrap; }
.sal-timeline-wrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.sal-office { margin: 14px 0 18px; }
.sal-office-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.sal-office-head h5 { font-size: 15px; color: var(--text-primary); margin: 0; }
.sal-law { font-size: 11.5px; color: var(--text-muted); }
.sal-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid rgba(56, 189, 248, 0.35); display: grid; gap: 12px; }
.sal-timeline li { position: relative; display: grid; grid-template-columns: 52px minmax(90px, auto) 1fr; gap: 2px 12px; align-items: baseline; font-size: 12.5px; color: var(--text-secondary); }
.sal-timeline li::before { content: ''; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-sky); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18); }
.sal-timeline li.sal-temp::before { background: var(--accent-saffron); }
.sal-year { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }
.sal-amount { font-family: var(--font-mono); font-weight: 700; color: var(--accent-emerald); white-space: nowrap; }
.sal-change { color: var(--text-secondary); }
.sal-by, .sal-timeline .sal-src { grid-column: 3; font-size: 11.5px; color: var(--text-muted); margin: 0; }
@media (max-width: 640px) {
  .sal-timeline li { grid-template-columns: 46px 1fr; }
  .sal-change, .sal-by, .sal-timeline .sal-src { grid-column: 1 / -1; }
  .sal-bar-row { grid-template-columns: minmax(0, 110px) 1fr auto; }
}

/* Site emblem (img/logo.svg) replaces the old gradient box */
.brand-icon.brand-logo, .admin-brand-icon.brand-logo { background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; }
.brand-logo img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.35)); }

/* ---------- Infrastructure search and project pop-ups (js/infra-detail.js) ---------- */
.infra-search { position: relative; margin: 0 0 16px; }
.infra-search-label { display: block; font-size: 12px; font-weight: 700; color: var(--accent-teal); margin-bottom: 6px; letter-spacing: 0.02em; }
.infra-search input { width: 100%; font-size: 14px; padding: 12px 14px; }
.infra-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; max-height: 60vh; overflow-y: auto;
  background: #0c1424; border: 1px solid var(--border-glow); border-radius: 12px; box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8); }
.infra-search-hit { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--border-subtle); color: inherit; font: inherit; cursor: pointer; }
.infra-search-hit:last-child { border-bottom: 0; }
.infra-search-hit:hover, .infra-search-hit:focus-visible { background: rgba(6, 182, 212, 0.08); outline: none; }
.infra-search-hit strong { display: block; color: var(--text-primary); font-size: 13.5px; }
.infra-search-hit span { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.infra-full-btn { color: var(--accent-teal) !important; font-weight: 700 !important; }
.infra-list { margin: 0 0 12px 18px; display: grid; gap: 6px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.infra-list a, .infra-news a span { color: var(--accent-sky); }
.infra-news { display: grid; gap: 8px; margin-bottom: 12px; }
.infra-news a { display: block; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 10px; text-decoration: none; }
.infra-news a:hover { border-color: var(--border-glow); }
.infra-news strong { display: block; color: var(--text-primary); font-size: 13px; }
.infra-news span { display: block; color: var(--text-muted) !important; font-size: 11.5px; margin-top: 3px; }
.mega-sourced { padding: 20px; margin-bottom: 22px; }
.mega-sourced-head h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 4px; color: var(--text-primary); }
.mega-sourced-head p { font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.5; }
.mega-sourced-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mega-sourced-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.025); color: inherit; font: inherit; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast); }
.mega-sourced-card:hover, .mega-sourced-card:focus-visible { border-color: var(--border-glow); background: rgba(6, 182, 212, 0.06); outline: none; }
.mega-sourced-card .dm-tag { align-self: flex-start; }
.mega-sourced-card strong { font-size: 14px; color: var(--text-primary); line-height: 1.3; }
.mega-sourced-meta { font-size: 11.5px; color: var(--text-muted); }
.mega-sourced-cost { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }

/* Scheme cards open a detail pop-up (js/scheme-detail.js) */
.district-card[data-scheme-kind] { cursor: pointer; }
.district-card[data-scheme-kind]:hover { border-color: var(--border-glow); }
.scheme-full-btn { margin-top: 12px; width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08); color: var(--accent-teal); font: 700 12px var(--font-body); cursor: pointer; }
.scheme-full-btn:hover { background: rgba(6, 182, 212, 0.16); }
.scheme-row-link { cursor: pointer; border-radius: 8px; }
.scheme-row-link:hover, .scheme-row-link:focus-visible { background: rgba(6, 182, 212, 0.07); outline: none; }

/* Foreign borrowing and lending (js/external-finance.js) */
.extfin-sub { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin: 10px 0 8px; }
.extfin-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* Who holds office now (js/office-holders.js) */
.oh-panel { padding: 22px; margin-bottom: 24px; }
.oh-sub { font-size: 14px; color: var(--text-primary); margin: 18px 0 10px; }
.oh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.oh-card { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.025); color: inherit; font: inherit; cursor: pointer; }
.oh-card:hover, .oh-card:focus-visible { border-color: var(--border-glow); background: rgba(6, 182, 212, 0.06); outline: none; }
.oh-office { font-size: 10.5px; font-weight: 700; color: var(--accent-teal); text-transform: uppercase; letter-spacing: 0.04em; }
.oh-card strong { font-size: 13.5px; color: var(--text-primary); }
.oh-meta { font-size: 11px; color: var(--text-muted); }

/* Reforms by committees (js/reforms.js) */
.reforms-panel { padding: 22px; margin: 28px 0 10px; }
.reforms-title { font-family: var(--font-display); font-size: 18px; color: var(--text-primary); margin: 0 0 4px; }
.reforms-intro { font-size: 12.5px; color: var(--text-secondary); margin: 0 0 14px; line-height: 1.55; }
.reform-item { border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.02); }
.reform-item[open] { border-color: var(--border-glow); }
.reform-item summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; list-style: none; }
.reform-item summary::-webkit-details-marker { display: none; }
.reform-item summary strong { color: var(--text-primary); font-size: 14px; }
.reform-item summary span { color: var(--text-muted); font-size: 12px; }
.reform-item p, .reform-item li { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.reform-item h5 { font-size: 12.5px; color: var(--text-primary); margin: 10px 0 4px; }
.reform-item ul { margin: 0 0 8px 18px; }
.reform-outcome { margin-top: 8px; }
.reform-item a { font-size: 12.5px; color: var(--accent-sky); }

/* Working days and holidays (js/salary-timeline.js) */
.wd-panel-head .sal-intro { max-width: 860px; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 12px; }
.wd-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); min-width: 0; }
.wd-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wd-body { margin: 0; font-size: 15px; line-height: 1.35; color: var(--text-primary); }
.wd-period { font-size: 11.5px; color: var(--text-muted); }
.wd-figures { display: flex; align-items: center; gap: 16px; }
.wd-ring { width: 86px; height: 86px; flex: 0 0 auto; }
.wd-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 4.2; }
.wd-ring-fg { fill: none; stroke: var(--accent-emerald); stroke-width: 4.2; stroke-linecap: round; }
.wd-ring-num { font-family: var(--font-mono); font-size: 9px; font-weight: 700; fill: var(--text-primary); text-anchor: middle; }
.wd-ring-of { font-size: 4.6px; fill: var(--text-muted); text-anchor: middle; }
.wd-split { margin: 0; display: grid; gap: 4px; font-size: 12.5px; }
.wd-split div { display: flex; justify-content: space-between; gap: 14px; }
.wd-split dt { color: var(--text-muted); }
.wd-split dd { margin: 0; color: var(--text-secondary); }
.wd-split b { font-family: var(--font-mono); color: var(--text-primary); }
.wd-detail { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); }

/* Tablets and phones: the ticker strip fits the screen and scrolls inside itself; the main nav becomes one
   swipeable row (fading at the edge where more tabs are hidden) instead of wrapping into many rows */
.top-ticker { max-width: 100%; }
.ticker-items { min-width: 0; max-width: 100%; }
@media (max-width: 1024px) {
  .top-ticker .ticker-items { width: 100%; }
}
@media (max-width: 1280px) {
  .nav-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-category-group { flex: 0 0 auto; scroll-snap-align: start; }
}
@media (max-width: 480px) {
  select.input-glass, input.input-glass { max-width: 100%; min-width: 0 !important; }
  #cag-sector-filter, #cag-state-filter { width: 100%; }
}

/* Withheld names: reason and RTI option */
.redact-note { margin: 10px 0; padding: 8px 12px; border-radius: 10px; border: 1px dashed rgba(148, 163, 184, 0.35);
  font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.about-contact { font-size: 13.5px; color: var(--text-secondary); margin: -6px 0 16px; }
.about-contact a { color: var(--accent-sky); font-weight: 600; }

/* ------------------------------------------------------------------
   Official budget data panels (Union Budget, devolution releases, Railways and transport,
   public enterprises, public sector banks, spending on officials)
   ------------------------------------------------------------------ */
.pd-panel { padding: 22px; margin-bottom: 22px; }
.pd-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pd-panel-head h3 { font-size: 17px; margin: 0; color: var(--text-primary); }
.pd-banner h3 { font-size: 20px; margin: 8px 0 4px; }
.pd-banner p, .pd-intro { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 12px; }
.pd-source { font-size: 11.5px; color: var(--text-muted); margin: 12px 0 0; line-height: 1.5; }
.pd-source a, .pd-list a, .pd-plain a, .pd-head-src a, .pd-rti a { color: var(--accent-teal); }
.pd-note { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }
.pd-empty, .pd-ok { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
.pd-ok { color: var(--accent-emerald); }
.pd-h4 { font-size: 14px; margin: 18px 0 8px; color: var(--text-primary); }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pd-kpi { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.pd-kpi-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pd-kpi-value { font-size: 20px; font-weight: 800; color: var(--accent-teal); margin-top: 4px; overflow-wrap: anywhere; }
.pd-kpi-note { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.pd-kpi.pd-bad .pd-kpi-value { color: var(--accent-crimson); }
.pd-kpi.pd-warn .pd-kpi-value { color: var(--accent-saffron); }
.pd-kpi.pd-good .pd-kpi-value { color: var(--accent-emerald); }
.pd-plain { background: rgba(6, 182, 212, 0.06); border: 1px solid rgba(6, 182, 212, 0.25); border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.pd-plain h4 { margin: 0 0 6px; font-size: 14px; color: var(--accent-teal); }
.pd-plain ul { margin: 0; padding-left: 18px; }
.pd-plain li { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; margin: 4px 0; }
.pd-plain strong { color: var(--text-primary); }
.pd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-subtle); border-radius: 12px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-table th { position: sticky; top: 0; background: var(--bg-surface); color: var(--text-muted); font-weight: 600; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.pd-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: var(--text-secondary); vertical-align: top; }
.pd-table td strong { color: var(--text-primary); }
.pd-table .pd-num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.pd-table tr.pd-click { cursor: pointer; }
.pd-table tr.pd-click:hover td, .pd-table tr.pd-click:focus td { background: var(--bg-card-hover); }
.pd-table tr.pd-click:focus { outline: 2px solid var(--accent-teal); outline-offset: -2px; }
.pd-sub { display: block; font-size: 11px; color: var(--text-muted); font-family: var(--font-body); }
.pd-num .pd-sub { display: inline; }
.pd-indent { padding-left: 14px; display: inline-block; }
.pd-up { color: var(--accent-emerald); }
.pd-down { color: var(--accent-crimson); }
.pd-count { font-size: 12px; color: var(--text-muted); margin: 0 0 8px; }
.pd-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-controls input { flex: 1 1 240px; min-width: 0; }
.pd-controls select { flex: 0 1 260px; min-width: 0; }
.pd-flags { display: flex; flex-direction: column; gap: 10px; }
.pd-flag { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 13px; line-height: 1.55; }
.pd-flag strong { color: var(--text-primary); }
.pd-flag-text { color: var(--text-secondary); margin-top: 2px; }
.pd-flag-sev { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; }
.pd-flag-high { border-color: rgba(244, 63, 94, 0.4); background: rgba(244, 63, 94, 0.07); }
.pd-flag-high .pd-flag-sev { background: rgba(244, 63, 94, 0.2); color: #fda4af; }
.pd-flag-medium { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.07); }
.pd-flag-medium .pd-flag-sev { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.pd-flag-low { border-color: rgba(99, 102, 241, 0.35); background: rgba(99, 102, 241, 0.06); }
.pd-flag-low .pd-flag-sev { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
.pd-heads { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pd-head-card { background: rgba(10, 16, 30, 0.7); border: 1px solid var(--border-card); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.pd-head-body { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.pd-head-text { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 6px; line-height: 1.5; overflow-wrap: anywhere; }
.pd-head-src { font-size: 11px; color: var(--text-muted); }
.pd-list { list-style: none; margin: 0; padding: 0; }
.pd-list li { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px; line-height: 1.5; }
.pd-list-meta { display: block; font-size: 11px; color: var(--text-muted); }
.pd-rti { font-size: 13px; color: var(--text-secondary); line-height: 1.6; background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.25); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.pd-rti strong { color: var(--text-primary); }
@media (max-width: 640px) {
  .pd-panel { padding: 16px; }
  .pd-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pd-kpi-value { font-size: 16px; }
  .pd-heads { grid-template-columns: 1fr; }
  .pd-controls select { flex-basis: 100%; }
}

/* Phones: the status strip is one swipeable line that scrolls away with the page, so the screen is left
   to the content (it used to wrap into five rows and stay pinned at the top) */
@media (max-width: 768px) {
  .top-ticker { position: relative; flex-direction: row; align-items: center; gap: 8px; padding: 6px 12px; font-size: 11px; }
  .top-ticker .ticker-items { flex-wrap: nowrap; gap: 16px; overflow-x: auto; width: auto; }
  .top-ticker .ticker-item { white-space: nowrap; flex-wrap: nowrap; gap: 6px; }
  .top-ticker > div:last-child { margin-left: 0; }
  .top-ticker > div:last-child .badge { font-size: 10px; padding: 3px 8px; }
}
