/**
 * Rooted Way Assembly - Torah Laws Directory Stylesheet
 * Strict Conventions: Zero emojis, clean brand colors, responsive typography.
 */

:root {
  --rtl-brand-green: #1f3a2b;
  --rtl-brand-green-hover: #2e563e;
  --rtl-brand-gold: #c59b27;
  --rtl-brand-gold-hover: #a8821a;
  --rtl-bg-light: #f8fafc;
  --rtl-card-bg: #ffffff;
  --rtl-border: #e2e8f0;
  --rtl-text-main: #1e293b;
  --rtl-text-muted: #64748b;
  --rtl-status-active-bg: #ecfdf5;
  --rtl-status-active-text: #065f46;
  --rtl-status-active-border: #a7f3d0;
  --rtl-status-meal-bg: #eff6ff;
  --rtl-status-meal-text: #1e40af;
  --rtl-status-meal-border: #bfdbfe;
  --rtl-status-fulfilled-bg: #fffbeb;
  --rtl-status-fulfilled-text: #92400e;
  --rtl-status-fulfilled-border: #fde68a;
  --rtl-status-civil-bg: #f1f5f9;
  --rtl-status-civil-text: #334155;
  --rtl-status-civil-border: #cbd5e1;
  --rtl-status-suspended-bg: #f8fafc;
  --rtl-status-suspended-text: #64748b;
  --rtl-status-suspended-border: #e2e8f0;
  --rtl-status-pagan-bg: #faf5ff;
  --rtl-status-pagan-text: #6b21a8;
  --rtl-status-pagan-border: #e9d5ff;
}

/* Ensure Torah Laws Directory expands to full 1250px container width without narrow theme constraints */
.page-id-626 .entry-content,
.page-id-626 .wp-block-post-content,
.post-626 .entry-content,
.post-626 .wp-block-post-content,
.entry-content:has(.rtl-app-container),
.wp-block-post-content:has(.rtl-app-container),
.wp-block-group:has(.rtl-app-container) {
  box-sizing: border-box !important;
  max-width: 1250px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-id-626 .alignwide,
.post-626 .alignwide,
.alignwide:has(.rtl-app-container) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Hide redundant theme post title on Torah Laws page */
.page-id-626 .wp-block-post-title,
.post-626 .wp-block-post-title {
  display: none !important;
}

.rtl-app-container,
.rtl-app-container *,
.rtl-app-container *::before,
.rtl-app-container *::after {
  box-sizing: border-box;
}

.rtl-app-container {
  max-width: 1250px;
  width: 100%;
  margin: 0 auto !important;
  padding: 1.5rem 1rem 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--rtl-text-main);
  line-height: 1.6;
}

/* Hero Section - Narrowed and Centered */
.rtl-hero {
  text-align: center;
  max-width: 960px;
  margin: 0 auto 2rem auto;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, #1f3a2b 0%, #15271d 100%);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.rtl-hero-badge {
  display: inline-block;
  background: rgba(197, 155, 39, 0.2);
  color: #f7d77b;
  border: 1px solid rgba(197, 155, 39, 0.4);
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.rtl-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.rtl-hero-subtitle {
  font-size: 1.15rem;
  max-width: 820px;
  margin: 0 auto;
  color: #e2e8f0;
  line-height: 1.6;
}

/* KPI Cards Grid - Narrowed to 960px and stacked in exactly 2 rows of 4 cards */
.rtl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  max-width: 960px;
  margin: 0 auto 2.5rem auto;
}
@media (max-width: 820px) {
  .rtl-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}
.rtl-kpi-card {
  background: var(--rtl-card-bg);
  border: 1px solid var(--rtl-border);
  border-radius: 10px;
  padding: 1.15rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.rtl-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
  border-color: var(--rtl-brand-green);
}
.rtl-kpi-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--rtl-brand-green);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.rtl-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rtl-text-main);
  margin-bottom: 0.2rem;
}
.rtl-kpi-desc {
  font-size: 0.72rem;
  color: var(--rtl-text-muted);
}
.rtl-kpi-active .rtl-kpi-num { color: #059669; }
.rtl-kpi-milk .rtl-kpi-num { color: #2563eb; }
.rtl-kpi-meat .rtl-kpi-num { color: #d97706; }
.rtl-kpi-fulfilled .rtl-kpi-num { color: #b45309; }
.rtl-kpi-civil .rtl-kpi-num { color: #475569; }
.rtl-kpi-suspended .rtl-kpi-num { color: #64748b; }
.rtl-kpi-nt .rtl-kpi-num { color: #0284c7; }
.rtl-kpi-pagan .rtl-kpi-num { color: #7c3aed; }

/* Visual Hermeneutic Section - Shrunk by 1/3 directly below main table and Centered */
.rtl-hermeneutic-section {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  max-width: 850px;
  margin: 2.5rem auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.rtl-section-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.rtl-section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--rtl-brand-green);
  margin: 0 0 0.4rem 0;
}
.rtl-section-header p {
  color: var(--rtl-text-muted);
  font-size: 0.95rem;
  margin: 0;
}
.rtl-hermeneutic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.rtl-filter-step {
  background: var(--rtl-bg-light);
  border: 1px solid var(--rtl-border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.rtl-filter-step:hover {
  border-color: var(--rtl-brand-gold);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.rtl-step-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e2e8f0;
  color: #334155;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.rtl-filter-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--rtl-text-main);
}
.rtl-filter-step p {
  font-size: 0.83rem;
  color: var(--rtl-text-muted);
  margin: 0 0 1rem 0;
  flex-grow: 1;
  line-height: 1.45;
}
.rtl-step-outcome {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid transparent;
}
.rtl-outcome-fulfilled {
  background: var(--rtl-status-fulfilled-bg);
  color: var(--rtl-status-fulfilled-text);
  border-color: var(--rtl-status-fulfilled-border);
}
.rtl-outcome-civil {
  background: var(--rtl-status-civil-bg);
  color: var(--rtl-status-civil-text);
  border-color: var(--rtl-status-civil-border);
}
.rtl-outcome-suspended {
  background: var(--rtl-status-suspended-bg);
  color: var(--rtl-status-suspended-text);
  border-color: var(--rtl-status-suspended-border);
}
.rtl-outcome-active {
  background: var(--rtl-status-active-bg);
  color: var(--rtl-status-active-text);
  border-color: var(--rtl-status-active-border);
}

.rtl-context-callout {
  background: #fdfaf3;
  border-left: 4px solid var(--rtl-brand-gold);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: #524220;
  line-height: 1.55;
}

/* Deep Contextual Clarity Panel */
.rtl-clarity-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rtl-border);
}
.rtl-clarity-box {
  background: var(--rtl-bg-light);
  border: 1px solid var(--rtl-border);
  border-left: 4px solid var(--rtl-brand-gold);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
}
.rtl-clarity-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rtl-brand-green);
  margin: 0 0 0.65rem 0;
  line-height: 1.4;
}
.rtl-clarity-box p {
  font-size: 0.88rem;
  color: var(--rtl-text-main);
  line-height: 1.55;
  margin: 0 0 0.75rem 0;
}
.rtl-clarity-box p:last-child {
  margin-bottom: 0;
}
.rtl-clarity-box strong {
  color: var(--rtl-brand-green);
}

/* Quick Filter Presets - Shrunk by 1/3 directly above main table and Centered */
.rtl-presets-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 850px;
  margin: 0 auto 1.5rem auto;
}
.rtl-preset-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rtl-text-muted);
  margin-right: 0.25rem;
}
.rtl-preset-btn {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  color: var(--rtl-text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rtl-preset-btn:hover {
  border-color: var(--rtl-brand-green);
  color: var(--rtl-brand-green);
  background: #f1f5f9;
}
.rtl-preset-btn.active {
  background: var(--rtl-brand-green);
  color: #ffffff;
  border-color: var(--rtl-brand-green);
}

/* Search & Filter Controls - Shrunk by 1/3 directly above main table and Centered */
.rtl-controls-card {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 850px;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rtl-search-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.rtl-search-box {
  position: relative;
  flex-grow: 1;
}
.rtl-search-box input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 2.75rem;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--rtl-text-main);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rtl-search-box input:focus {
  outline: none;
  border-color: var(--rtl-brand-green);
  box-shadow: 0 0 0 3px rgba(31, 58, 43, 0.12);
}
.rtl-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #94a3b8;
  pointer-events: none;
}
.rtl-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.rtl-clear-btn:hover { color: #475569; }

.rtl-view-toggles {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
}
.rtl-view-btn {
  background: #ffffff;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rtl-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rtl-view-btn.active {
  background: var(--rtl-brand-green);
  color: #ffffff;
}

.rtl-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto;
  gap: 1rem;
  align-items: flex-end;
}
.rtl-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}
.rtl-filter-group label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rtl-text-muted);
}
.rtl-filter-group select {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--rtl-text-main);
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
.rtl-filter-group select:focus {
  outline: none;
  border-color: var(--rtl-brand-green);
}
.rtl-reset-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--rtl-text-main);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
}
.rtl-reset-btn:hover { background: #e2e8f0; }

/* Status Bar - Aligned with Controls Card */
.rtl-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 850px;
  margin: 0 auto 1.5rem auto;
  padding: 0 0.25rem;
}
.rtl-counter {
  font-size: 0.95rem;
  color: var(--rtl-text-muted);
}
.rtl-counter strong { color: var(--rtl-text-main); }
.rtl-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.rtl-active-tag {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.rtl-remove-tag {
  margin-left: 0.35rem;
  cursor: pointer;
  font-weight: bold;
}

/* Card Grid Results */
.rtl-results-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.rtl-card {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.rtl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}
.rtl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.rtl-law-number {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--rtl-brand-green);
  background: rgba(31, 58, 43, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.rtl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.rtl-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.rtl-badge-positive { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.rtl-badge-negative { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.rtl-badge-milk { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.rtl-badge-meat { background: #fffbeb; color: #b45309; border-color: #fde68a; }

.rtl-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  color: var(--rtl-text-main);
}
.rtl-card-meta {
  font-size: 0.82rem;
  color: var(--rtl-text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.rtl-meta-ref { font-weight: 700; color: #0f172a; }

.rtl-card-status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  align-self: flex-start;
  border: 1px solid transparent;
}
.rtl-status-active { background: var(--rtl-status-active-bg); color: var(--rtl-status-active-text); border-color: var(--rtl-status-active-border); }
.rtl-status-meal { background: var(--rtl-status-meal-bg); color: var(--rtl-status-meal-text); border-color: var(--rtl-status-meal-border); }
.rtl-status-fulfilled { background: var(--rtl-status-fulfilled-bg); color: var(--rtl-status-fulfilled-text); border-color: var(--rtl-status-fulfilled-border); }
.rtl-status-civil { background: var(--rtl-status-civil-bg); color: var(--rtl-status-civil-text); border-color: var(--rtl-status-civil-border); }
.rtl-status-suspended { background: var(--rtl-status-suspended-bg); color: var(--rtl-status-suspended-text); border-color: var(--rtl-status-suspended-border); }
.rtl-status-pagan { background: var(--rtl-status-pagan-bg); color: var(--rtl-status-pagan-text); border-color: var(--rtl-status-pagan-border); }

.rtl-card-quote {
  font-size: 0.88rem;
  font-style: italic;
  color: #334155;
  background: var(--rtl-bg-light);
  border-left: 3px solid var(--rtl-brand-green);
  padding: 0.65rem 0.85rem;
  border-radius: 0 6px 6px 0;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.rtl-card-details-btn {
  background: none;
  border: 1px solid #cbd5e1;
  color: var(--rtl-brand-green);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  align-self: flex-start;
  transition: all 0.15s ease;
}
.rtl-card-details-btn:hover {
  background: var(--rtl-brand-green);
  color: #ffffff;
  border-color: var(--rtl-brand-green);
}

.rtl-card-drawer {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rtl-border);
  font-size: 0.85rem;
}
.rtl-card-drawer.open { display: block; }
.rtl-drawer-item { margin-bottom: 0.75rem; }
.rtl-drawer-label { font-weight: 700; color: #475569; display: block; margin-bottom: 0.15rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.rtl-drawer-hebrew { font-family: "SBL Hebrew", "Times New Roman", serif; direction: rtl; text-align: right; font-size: 1.1rem; color: #0f172a; padding: 0.35rem 0; }

/* Table View */
.rtl-results-view-table {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 2.5rem;
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rtl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.rtl-table th {
  background: #f1f5f9;
  padding: 0.75rem 0.85rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 2px solid var(--rtl-border);
  white-space: nowrap;
  font-size: 0.84rem;
}
.rtl-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--rtl-border);
  vertical-align: middle;
  font-size: 0.86rem;
}
.rtl-table-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.rtl-table-row:hover {
  background-color: #f8fafc;
}
.rtl-table-row.rtl-expanded-row {
  background-color: #f0fdf4;
  border-left: 3px solid var(--rtl-brand-green);
}
.rtl-td-num {
  font-weight: 800;
  color: var(--rtl-brand-green);
  white-space: nowrap;
  width: 45px;
  text-align: center;
}
.rtl-td-type {
  white-space: nowrap;
  width: 75px;
  text-align: center;
}
.rtl-td-title {
  min-width: 220px;
}
.rtl-title-text {
  font-weight: 600;
  color: var(--rtl-text-main);
  line-height: 1.35;
}
.rtl-meta-mobile {
  display: none;
  font-size: 0.75rem;
  color: var(--rtl-text-muted);
  margin-top: 0.25rem;
}
.rtl-td-ref {
  white-space: nowrap;
  width: 115px;
}
.rtl-td-ref code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #0f172a;
  white-space: nowrap;
}
.rtl-td-status {
  white-space: nowrap;
  width: 175px;
}
.rtl-td-demo {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--rtl-text-muted);
  width: 100px;
}
.rtl-td-stage {
  white-space: nowrap;
  width: 110px;
}
.rtl-td-action {
  width: 80px;
  text-align: center;
  white-space: nowrap;
}
.rtl-toggle-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--rtl-brand-green);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.rtl-table-row:hover .rtl-toggle-btn {
  border-color: var(--rtl-brand-green);
  background: var(--rtl-brand-green);
  color: #ffffff;
}
.rtl-table-row.rtl-expanded-row .rtl-toggle-btn {
  background: var(--rtl-brand-green);
  color: #ffffff;
  border-color: var(--rtl-brand-green);
}

/* Row Drawer */
.rtl-row-drawer td {
  background: #fdfdfd;
  padding: 0 !important;
  border-bottom: 2px solid var(--rtl-border);
}
.rtl-drawer-inner {
  padding: 1.5rem;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-left: 4px solid var(--rtl-brand-green);
}
.rtl-drawer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}
.rtl-drawer-tag {
  background: var(--rtl-brand-green);
  color: #ffffff;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.rtl-drawer-category, .rtl-drawer-parashah {
  color: var(--rtl-text-muted);
}
.rtl-drawer-category strong, .rtl-drawer-parashah strong {
  color: var(--rtl-text-main);
}
.rtl-drawer-quote {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.rtl-drawer-quote blockquote {
  margin: 0.4rem 0 0.6rem 0;
  font-size: 0.95rem;
  font-style: italic;
  color: #1e293b;
  line-height: 1.55;
}
.rtl-drawer-hebrew {
  font-family: "SBL Hebrew", "Times New Roman", serif;
  font-size: 1.15rem;
  color: #0f172a;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rtl-border);
  line-height: 1.6;
}
.rtl-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.rtl-drawer-card {
  background: #ffffff;
  border: 1px solid var(--rtl-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.rtl-drawer-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--rtl-text-main);
}
.rtl-drawer-field-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rtl-text-muted);
  margin-bottom: 0.4rem;
}
.rtl-drawer-nt {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
}
.rtl-drawer-nt p {
  margin: 0;
  font-size: 0.85rem;
}
.rtl-drawer-nt code {
  color: #166534;
  font-weight: 600;
}

.rtl-preset-nt {
  border-color: #7dd3fc;
  color: #0369a1;
  background: #f0f9ff;
}
.rtl-preset-nt:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}
.rtl-preset-btn.rtl-preset-nt.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.rtl-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}
.rtl-toggle-nt-btn {
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  color: #0369a1;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.rtl-toggle-nt-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}
.rtl-toggle-nt-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.35);
}

.rtl-active-tag-nt {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.rtl-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.rtl-badge-nt {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* NT Drawer Spotlight */
.rtl-drawer-nt-spotlight {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.15rem;
}
.rtl-drawer-nt-spotlight .rtl-drawer-field-title {
  color: #0369a1;
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.rtl-nt-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.rtl-nt-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.8rem;
}
.rtl-nt-pill {
  background: #0284c7;
  color: #ffffff;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  font-weight: 600;
}
.rtl-nt-paired {
  color: #0369a1;
  font-weight: 600;
  background: #ffffff;
  padding: 0.15rem 0.5rem;
  border: 1px solid #bae6fd;
  border-radius: 4px;
}
.rtl-nt-title {
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.4;
}
.rtl-nt-exposition {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
}

/* Pagination / Page Status Controls */
.rtl-pagination-container {
  text-align: center;
  max-width: 850px;
  margin: 1.5rem auto 2rem auto;
}
.rtl-load-more-btn {
  background: var(--rtl-brand-green);
  color: #ffffff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.rtl-load-more-btn:hover {
  background: var(--rtl-brand-green-hover);
  transform: translateY(-1px);
}
.rtl-page-info {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--rtl-text-muted);
}
.rtl-back-to-top {
  color: var(--rtl-brand-green);
  margin-left: 0.5rem;
  text-decoration: underline;
  font-weight: 600;
}
.rtl-back-to-top:hover {
  color: var(--rtl-brand-green-hover);
}

.rtl-loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--rtl-text-muted);
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .rtl-td-ref, .rtl-td-demo, .rtl-td-stage, .rtl-th-ref, .rtl-th-demo, .rtl-th-stage {
    display: none;
  }
  .rtl-meta-mobile {
    display: block;
  }
}
@media (max-width: 768px) {
  .page-id-626 .entry-content,
  .page-id-626 .entry-content.alignwide,
  .page-id-626 .wp-block-post-content,
  .post-626 .entry-content,
  .post-626 .entry-content.alignwide,
  .post-626 .wp-block-post-content,
  .entry-content:has(.rtl-app-container),
  .wp-block-post-content:has(.rtl-app-container),
  .wp-block-group:has(.rtl-app-container) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .rtl-app-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1rem 0.5rem 2rem;
    box-sizing: border-box !important;
  }
  .rtl-hero {
    padding: 1.5rem 1rem;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .rtl-kpi-grid,
  .rtl-presets-section,
  .rtl-controls-card,
  .rtl-status-bar,
  #rtl-results-container {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .rtl-controls-card {
    padding: 1rem 0.75rem;
  }
  .rtl-hero-title { font-size: 1.8rem; }
  .rtl-search-row { flex-direction: column; }
  .rtl-filter-row {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
  }
  .rtl-filter-row > * {
    min-width: 0;
    max-width: 100%;
  }
  .rtl-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
  }
  .rtl-filter-actions button {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
  .rtl-hermeneutic-grid { grid-template-columns: 1fr; }
  .rtl-clarity-panel { grid-template-columns: 1fr; }
  .rtl-results-view-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    contain: paint;
  }
}
@media (max-width: 600px) {
  .rtl-td-status, .rtl-th-status {
    display: none;
  }
  .rtl-table {
    table-layout: fixed;
    width: 100%;
    box-sizing: border-box;
  }
  .rtl-table th, .rtl-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
  }
  .rtl-th-num, .rtl-td-num {
    width: 2.2rem;
  }
  .rtl-th-type, .rtl-td-type {
    width: 3.8rem;
  }
  .rtl-th-action, .rtl-td-action {
    width: 4rem;
  }
  .rtl-toggle-btn {
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
    white-space: normal;
  }
}
