/* Search */
.search-container {
  position: relative;
  max-width: 560px;
}
.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  font-family: var(--font-ar);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  direction: rtl;
  text-align: right;
  outline: none;
}
.search-input:focus {
  border-color: var(--color-accent);
}
.search-container .search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0; left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg); }
.search-result-name { font-weight: 600; display: block; }
.search-result-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: block;
}
.search-no-results {
  padding: var(--space-md);
  color: var(--color-text-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Person card (homepage) */
.person-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-md);
  gap: var(--space-sm);
}
.person-card:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.person-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}
.person-card-info {
  text-align: center;
  margin-top: 0.5rem;
}
.person-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
}
.person-card-role {
  font-size: 0.80rem;
  color: var(--text-secondary, #666);
  margin-top: 0.25rem;
  line-height: 1.3;
}
.person-card-role-en {
  font-style: italic;
  direction: ltr;
  text-align: center;
}

/* Person profile — header */
.person-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.person-avatar-large {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Person avatar image */
.person-avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Person card image */
.person-card-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto;
}

.person-card-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 auto;
}
.person-header-info {
  flex: 1;
  min-width: 0;
}
.person-name-ar {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}
.person-name-en {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
  font-style: italic;
  direction: ltr;
  display: inline-block;
}
.person-role {
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}
/* Formal name (full Arabic name under canonical) */
.person-formal-name {
  font-size: 0.90rem;
  color: var(--text-secondary, #666);
  margin: 0.15rem 0 0.25rem 0;
  font-weight: 400;
  letter-spacing: 0.01em;
  direction: rtl;
}

.ar-text {
  direction: rtl;
  unicode-bidi: embed;
}


/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.5rem;
}
.breadcrumb a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-accent);
}

/* Profile sections */
.profile-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.profile-section:last-child {
  border-bottom: none;
}

/* Biography */
.biography-section {
  padding: 1.25rem 1.5rem;
  background: var(--surface-subtle, #f8f8f6);
  border-radius: 6px;
  border-right: 3px solid var(--color-accent, #2c5f8a);
}
.biography-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text, #1a1a1a);
  margin: 0;
  max-width: 680px;
}

/* Identity facts */
.identity-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.fact-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border, #e8e8e4);
}
.fact-row:last-child { border-bottom: none; }
.fact-row dt {
  min-width: 130px;
  font-size: 0.85rem;
  color: var(--color-text-muted, #666);
  font-weight: 500;
}
.fact-row dd {
  font-size: 0.95rem;
  color: var(--color-text, #1a1a1a);
  margin: 0;
}

/* Position rows */
.position-list {
  list-style: none;
}
.position-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border, #e8e8e4);
}
.position-row:last-child { border-bottom: none; }
.position-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
}
.position-title-en {
  font-style: italic;
  direction: ltr;
  display: inline-block;
}
.position-dates {
  font-size: 0.85rem;
  color: var(--color-text-muted, #666);
  white-space: nowrap;
  margin-right: 1rem;
}

/* Elections table */
.elections-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  direction: rtl;
}
.elections-table th {
  text-align: right;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted, #666);
  border-bottom: 2px solid var(--color-border, #e8e8e4);
}
.elections-table td {
  text-align: right;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border, #e8e8e4);
  color: var(--color-text, #1a1a1a);
}
.election-year { font-weight: 600; }
.election-votes,
.election-rank,
.election-year {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}
.election-result {
  text-align: center;
}
.result-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
}
.result-badge.won {
  background: #e8f5e9;
  color: #2e7d32;
}
.result-badge.lost {
  background: #fafafa;
  color: #999;
}
.result-badge.withdrew {
  background: #fff8e1;
  color: #f57f17;
}
.result-badge.disqualified {
  background: #fce4ec;
  color: #c62828;
}
.election-row.result-won td:first-child {
  border-right: 3px solid #2e7d32;
}
.election-row.result-lost td:first-child {
  border-right: 3px solid #ccc;
}

/* External links */
.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.external-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border, #e8e8e4);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--color-text-muted, #666);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.external-link:hover {
  border-color: var(--color-accent, #2c5f8a);
  color: var(--color-accent, #2c5f8a);
}

/* Mapping links */
.mapping-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Timeline career display */
.timeline-role {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border, #e8e8e4);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.timeline-role:last-child { border-bottom: none; }
.role-header { flex: 1; }
.role-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  display: block;
}
.tier-1 .role-title,
.tier-2 .role-title,
.tier-3 .role-title {
  color: var(--accent, #2c5f8a);
}
.role-dates {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  white-space: nowrap;
  direction: ltr;
  text-align: left;
}
.role-terms {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}
.role-term {
  font-size: 0.82rem;
  color: var(--text-secondary, #666);
  direction: ltr;
}
.no-date { color: var(--border, #ccc); }


/* Related persons section */
.related-section {
  margin-top: 2rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.75rem;
  border: 1px solid var(--color-border, #e8e8e4);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  gap: 0.5rem;
}
.related-card:hover {
  border-color: #2c5f8a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.related-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2c5f8a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.related-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.related-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.related-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  line-height: 1.3;
}
.related-role {
  font-size: 0.75rem;
  color: var(--color-text-muted, #666);
  line-height: 1.3;
}

/* Canonical social links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border, #e8e8e4);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--color-text, #1a1a1a);
  transition: border-color 0.15s, background 0.15s;
}
.social-link:hover {
  border-color: #2c5f8a;
  background: rgba(44, 95, 138, 0.04);
}
.social-handle {
  color: var(--color-text-muted, #888);
  font-size: 0.8rem;
}
.social-ext-icon {
  font-size: 0.75rem;
  color: var(--color-text-muted, #888);
}


/* Parliamentary record section */
.parliamentary-section { margin-top: 2rem; }
.section-count {
  font-size: 0.8rem; font-weight: 400; color: var(--color-text-muted, #888);
  margin-right: 0.5rem; background: #f5f5f3; padding: 0.1rem 0.5rem; border-radius: 10px;
}
.parliamentary-term { margin-bottom: 1.5rem; }
.term-heading {
  font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted, #666);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--color-border, #e8e8e4); padding-bottom: 0.25rem;
}
.term-year { font-weight: 400; font-size: 0.8rem; }
.parliamentary-actions { display: flex; flex-direction: column; gap: 0.4rem; }
.parliamentary-action {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem;
  padding: 0.3rem 0; border-bottom: 1px solid #f0f0ee; flex-wrap: wrap;
}
.parliamentary-action:last-child { border-bottom: none; }
.action-badge {
  font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem;
  border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.action-badge--voted-for { background: #e8f5e9; color: #2e7d32; }
.action-badge--voted-against { background: #ffebee; color: #c62828; }
.action-badge--abstained { background: #f5f5f5; color: #616161; }
.action-badge--absent, .action-badge--did-not-vote { background: #fafafa; color: #9e9e9e; border: 1px solid #e0e0e0; }
.action-badge--submitted { background: #e3f2fd; color: #1565c0; }
.action-title { flex: 1; color: var(--color-text, #1a1a1a); min-width: 0; }
.issue-type-tag {
  font-size: 0.8rem; color: var(--color-text-muted, #888); background: #f5f5f3;
  padding: 0.1rem 0.4rem; border-radius: 3px; white-space: nowrap;
}


/* Issue page */
.issue-page { padding-bottom: 2rem; }
.issue-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border, #e8e8e4); }
.issue-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.issue-term { font-size: 0.9rem; color: var(--color-text-muted, #666); margin-bottom: 0.5rem; }
.issue-type-badge { font-size: 0.8rem; background: #f5f5f3; padding: 0.2rem 0.6rem; border-radius: 4px; color: #666; }
.issue-source { margin-bottom: 1.5rem; }
.issue-source a { color: #2c5f8a; text-decoration: none; font-size: 0.85rem; }
.issue-source a:hover { text-decoration: underline; }

/* Vote summary bar */
.vote-summary-section { margin-bottom: 1.5rem; }
.vote-summary-bar { display: flex; border-radius: 6px; overflow: hidden; min-height: 48px; }
.vote-bar-segment {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.3rem 0.4rem; min-width: 60px; flex-shrink: 0; transition: flex 0.3s;
}
.vote-bar-count { font-weight: 700; font-size: 0.95rem; color: #fff; }
.vote-bar-label { font-size: 0.7rem; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 0.2rem; }
.vote-bar--for { background: #4caf50; }
.vote-bar--against { background: #f44336; }
.vote-bar--abstained { background: #9e9e9e; }
.vote-bar--absent { background: #bdbdbd; }
.vote-bar--didnotvote { background: #e0e0e0; }
.vote-bar--didnotvote .vote-bar-count, .vote-bar--didnotvote .vote-bar-label { color: #666; }

/* Roll call */
.roll-call-section { margin-top: 1.5rem; }
.roll-call-group { margin-bottom: 1.5rem; }
.roll-call-group-heading {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
  padding-bottom: 0.25rem; border-bottom: 1px solid var(--color-border, #e8e8e4);
}
.roll-call-group-count { font-size: 0.8rem; color: var(--color-text-muted, #888); }
.roll-call-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem;
}
.roll-call-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0.6rem 0.4rem; border: 1px solid var(--color-border, #e8e8e4); border-radius: 6px;
  text-decoration: none; color: inherit; transition: border-color 0.15s; gap: 0.3rem;
}
.roll-call-card:hover { border-color: #2c5f8a; }
.roll-call-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #2c5f8a; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.roll-call-avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center top; }
.roll-call-name { font-size: 0.78rem; font-weight: 600; line-height: 1.2; color: var(--color-text, #1a1a1a); }


/* Document pages */
.doc-page { padding-bottom: 2rem; }
.doc-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--color-border, #e8e8e4); margin-bottom: 2rem; }
.doc-type-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem; }
.doc-type-badge--interpellation { background: #fff3e0; color: #e65100; }
.doc-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text, #1a1a1a); line-height: 1.4; margin-bottom: 0.75rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: var(--color-text-muted, #666); }
.doc-section { margin-bottom: 2rem; }
.doc-persons-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; }
.doc-person-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; text-decoration: none; color: inherit; min-width: 200px; transition: border-color 0.15s; }
.doc-person-card:hover { border-color: #2c5f8a; }
.doc-person-avatar { width: 56px; height: 56px; border-radius: 50%; background: #2c5f8a; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.doc-person-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center top; }
.doc-person-name { font-size: 0.9rem; font-weight: 600; display: block; }
.doc-person-role { font-size: 0.82rem; color: var(--color-text-muted, #666); display: block; margin-top: 0.1rem; }
.doc-summary { font-size: 0.9rem; line-height: 1.7; color: var(--color-text, #1a1a1a); white-space: pre-line; }
.related-issue-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 1px solid var(--color-border, #e8e8e4); border-radius: 6px; text-decoration: none; color: #2c5f8a; font-size: 0.9rem; transition: background 0.15s; }
.related-issue-link:hover { background: rgba(44, 95, 138, 0.04); }
.doc-section--source { background: #f9f9f7; padding: 1.25rem; border-radius: 8px; border: 1px solid var(--color-border, #e8e8e4); }
.source-note { font-size: 0.85rem; color: var(--color-text-muted, #666); margin-bottom: 0.75rem; }
.kna-source-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; background: #2c5f8a; color: white; border-radius: 6px; text-decoration: none; font-size: 0.875rem; font-weight: 600; transition: opacity 0.15s; }
.kna-source-link:hover { opacity: 0.9; }


/* Parliamentary subsections */
.parl-subsection { margin-bottom: 1.5rem; }
.parl-subsection + .parl-subsection { border-top: 1px solid var(--color-border, #e8e8e4); padding-top: 1.25rem; margin-top: 0.25rem; }
.parl-subsection-title { font-size: 0.85rem; font-weight: 700; color: var(--color-text-muted, #888); letter-spacing: 0.05em; margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid #2c5f8a; display: inline-block; }

/* Submitted documents */
.submitted-docs-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.submitted-doc-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--color-border, #e8e8e4); border-radius: 6px; text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s; }
.submitted-doc-item:hover { border-color: #2c5f8a; background: rgba(44, 95, 138, 0.02); }
.doc-type-pill { font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 3px; white-space: nowrap; flex-shrink: 0; margin-top: 0.1rem; }
.doc-type-pill--interpellation { background: #fff3e0; color: #e65100; }
.doc-type-pill--question { background: #e8f5e9; color: #2e7d32; }
.doc-type-pill--proposal { background: #e3f2fd; color: #1565c0; }
.doc-type-pill--law { background: #f3e5f5; color: #6a1b9a; }
.submitted-doc-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.submitted-doc-minister { font-size: 0.8rem; color: var(--color-text-muted, #888); }
.submitted-doc-title { font-size: 0.875rem; font-weight: 600; color: var(--color-text, #1a1a1a); line-height: 1.3; }
.submitted-doc-date { font-size: 0.78rem; color: #aaa; direction: ltr; display: inline-block; }
.submitted-doc-arrow { color: #2c5f8a; font-size: 0.9rem; flex-shrink: 0; margin-top: 0.15rem; }

/* Linked action title */
.action-title--linked { color: #2c5f8a; text-decoration: none; font-weight: 600; flex: 1; }
.action-title--linked:hover { text-decoration: underline; text-decoration-style: dotted; }

/* Show more button */
.show-more-btn { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; padding: 0.5rem; margin-top: 0.25rem; background: none; border: 1px dashed var(--color-border, #e0e0dc); border-radius: 6px; color: #2c5f8a; font-size: 0.82rem; cursor: pointer; font-family: inherit; transition: background 0.15s, border-color 0.15s; }
.show-more-btn:hover { background: rgba(44,95,138,0.04); border-color: #2c5f8a; }
.show-more-btn:disabled { opacity: 0.6; cursor: wait; }

/* Questions browse page */
.page-header { padding: 2rem 0 1rem; border-bottom: 1px solid var(--color-border, #e8e8e4); margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.page-subtitle { color: var(--color-text-muted, #888); font-size: 0.9rem; }
.questions-filter-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; padding: 1rem; background: #f9f9f7; border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; margin-bottom: 1.5rem; }
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-group--search { flex: 1; min-width: 200px; }
.filter-label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted, #888); }
.filter-select, .filter-input { padding: 0.4rem 0.6rem; border: 1px solid #e0e0dc; border-radius: 5px; font-size: 0.875rem; background: white; font-family: inherit; color: var(--color-text, #1a1a1a); min-width: 140px; }
.filter-submit { padding: 0.4rem 1rem; background: #2c5f8a; color: white; border: none; border-radius: 5px; font-size: 0.875rem; cursor: pointer; font-family: inherit; }
.filter-clear { align-self: flex-end; font-size: 0.8rem; color: var(--color-text-muted, #888); text-decoration: none; padding: 0.4rem 0; }
.filter-clear:hover { color: #333; }
.questions-list { display: flex; flex-direction: column; border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; overflow: hidden; }
.question-row { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid #f0f0ee; transition: background 0.1s; }
.question-row:last-child { border-bottom: none; }
.question-row:hover { background: #f9f9f7; }
.question-row-main { display: flex; flex-direction: column; gap: 0.2rem; }
.question-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text, #1a1a1a); line-height: 1.4; }
.question-minister { font-size: 0.8rem; color: var(--color-text-muted, #666); }
.question-row-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.78rem; color: var(--color-text-muted, #888); }
.question-mp-link { color: #2c5f8a; text-decoration: none; font-weight: 500; }
.question-mp-link:hover { text-decoration: underline; }
.question-reply-status { font-size: 0.8rem; padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 600; }
.question-reply-status--yes { background: #e8f5e9; color: #2e7d32; }
.question-reply-status--no { background: #fafafa; color: #9e9e9e; border: 1px solid #e0e0e0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem 0; }
.pagination-btn { padding: 0.4rem 1rem; border: 1px solid #e0e0dc; border-radius: 5px; text-decoration: none; color: #2c5f8a; font-size: 0.875rem; }
.pagination-btn:hover { background: rgba(44,95,138,0.05); }
.pagination-info { font-size: 0.85rem; color: var(--color-text-muted, #888); }
.empty-state { padding: 3rem; text-align: center; color: var(--color-text-muted, #888); }

.doc-type-badge--question { background: #e8f5e9; color: #2e7d32; }
.doc-type-badge--reply { background: #f5f5f5; color: #616161; }

.doc-seq-number { font-weight: 400; font-size: 0.9em; opacity: 0.8; margin-right: 0.25rem; }
.kna-source-block { display: flex; flex-direction: column; gap: 1rem; }
.kna-source-statement { font-size: 0.875rem; color: var(--color-text, #1a1a1a); line-height: 1.6; margin: 0; }
.kna-search-guidance { background: var(--color-surface, #f9f9f7); border: 1px solid var(--color-border, #e8e8e4); border-radius: 6px; padding: 1rem; }
.kna-guidance-label { font-size: 0.82rem; color: var(--color-text-muted, #666); margin: 0 0 0.5rem; font-weight: 500; }
.kna-guidance-steps { margin: 0; padding-right: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.kna-guidance-steps li { font-size: 0.85rem; color: var(--color-text, #333); line-height: 1.5; }
.kna-inline-link { color: var(--color-accent, #2c5f8a); text-decoration: none; font-weight: 500; }
.kna-inline-link:hover { text-decoration: underline; }
.kna-session-note { font-size: 0.78rem; color: #aaa; margin: 0; font-style: italic; }
.minister-person-link { color: #2c5f8a; text-decoration: none; font-weight: 500; }
.minister-person-link:hover { text-decoration: underline; }

/* Person stats bar */
.person-stats-bar {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border, #e8e8e4);
  border-bottom: 1px solid var(--color-border, #e8e8e4);
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 60px;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent, #2c5f8a);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted, #888);
  font-weight: 500;
}

/* Issues browse */
.issues-browse-list { display: flex; flex-direction: column; border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; overflow: hidden; }
.issue-browse-row { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.85rem 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); transition: background 0.1s; }
.issue-browse-row:last-child { border-bottom: none; }
.issue-browse-row:hover { background: var(--color-surface, #f9f9f7); }
.issue-browse-main { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.issue-type-badge { font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.issue-type-badge--vote { background: #e3f2fd; color: #1565c0; }
.issue-type-badge--interpellation_vote { background: #fff3e0; color: #e65100; }
.issue-type-badge--confidence_vote { background: #fce4ec; color: #b71c1c; }
.issue-type-badge--bloc, .issue-type-badge--withdrawal { background: #f5f5f5; color: #616161; }
.issue-browse-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text, #1a1a1a); flex: 1; }
.issue-browse-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.78rem; color: var(--color-text-muted, #999); padding-right: 0.1rem; }
.issue-browse-term { color: var(--color-text-muted, #aaa); }
.issue-browse-count { color: var(--color-text-muted, #aaa); }

/* Term badges */
.term-badge { font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 3px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.term-badge--20, .term-badge--19, .term-badge--18 { background: #e0f2f1; color: #00695c; }
.term-badge--17, .term-badge--16, .term-badge--15 { background: #e3f2fd; color: #1565c0; }
.term-badge--14, .term-badge--13, .term-badge--12, .term-badge--11, .term-badge--10 { background: #f5f5f5; color: #616161; }
.question-minister { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.reply-dot { font-size: 0.65rem; flex-shrink: 0; }
.reply-dot--yes { color: #4caf50; }
.reply-dot--no { color: #bdbdbd; }

/* Leaderboard */
.archive-totals-bar { display: flex; gap: 2rem; padding: 1.25rem 1.5rem; background: var(--color-surface, #f9f9f7); border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; margin-bottom: 2rem; flex-wrap: wrap; justify-content: space-around; }
.archive-total-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.archive-total-value { font-size: 1.6rem; font-weight: 700; color: var(--color-accent, #2c5f8a); line-height: 1; }
.archive-total-label { font-size: 0.75rem; color: var(--color-text-muted, #888); font-weight: 500; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.leaderboard-panel { border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; overflow: hidden; }
.leaderboard-title { font-size: 0.9rem; font-weight: 700; padding: 0.75rem 1rem; background: var(--color-surface, #f9f9f7); border-bottom: 1px solid var(--color-border, #e8e8e4); margin: 0; color: var(--color-text, #1a1a1a); }
.leaderboard-list { list-style: none; margin: 0; padding: 0; }
.leaderboard-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); transition: background 0.1s; }
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item:hover { background: var(--color-surface, #f9f9f7); }
.leaderboard-rank { font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted, #bbb); width: 16px; text-align: center; flex-shrink: 0; }
.leaderboard-item:nth-child(1) .leaderboard-rank { color: #f59e0b; }
.leaderboard-item:nth-child(2) .leaderboard-rank { color: #9ca3af; }
.leaderboard-item:nth-child(3) .leaderboard-rank { color: #b45309; }
.leaderboard-person { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; flex: 1; min-width: 0; }
.leaderboard-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent, #2c5f8a); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.leaderboard-img { width: 36px; height: 36px; object-fit: cover; object-position: center top; }
.leaderboard-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-count { font-size: 0.82rem; font-weight: 700; color: var(--color-accent, #2c5f8a); flex-shrink: 0; min-width: 28px; text-align: left; }

/* Homepage parliamentary */
.home-section { margin: 2.5rem 0; }
.home-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.home-section-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.home-section-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--color-text-muted, #888); }
.home-parl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.home-parl-panel { border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.home-panel-title { font-size: 0.85rem; font-weight: 700; color: var(--color-text-muted, #888); padding: 0.65rem 1rem; background: var(--color-surface, #f9f9f7); border-bottom: 1px solid var(--color-border, #e8e8e4); margin: 0; }
.home-question-item { display: flex; flex-direction: column; gap: 0.15rem; padding: 0 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); transition: background 0.1s; height: 64px; min-height: 64px; justify-content: center; box-sizing: border-box; }
.home-question-item:hover { background: var(--color-surface, #f9f9f7); }
.home-question-title { font-size: 0.9rem; font-weight: 500; color: var(--color-text, #1a1a1a); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }
.home-question-meta { font-size: 0.75rem; color: var(--color-text-muted, #aaa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.home-mp-item { display: flex; align-items: center; gap: 0.6rem; padding: 0 1rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); transition: background 0.1s; height: 64px; min-height: 64px; box-sizing: border-box; }
.home-mp-item:hover { background: var(--color-surface, #f9f9f7); }
.home-mp-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent, #2c5f8a); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.home-mp-img { width: 36px; height: 36px; object-fit: cover; object-position: center top; }
.home-mp-name { flex: 1; font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-mp-count { font-size: 0.82rem; color: var(--color-accent, #2c5f8a); font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.home-panel-more { display: block; padding: 0.65rem 1rem; font-size: 0.82rem; color: var(--color-accent, #2c5f8a); text-decoration: none; text-align: center; background: var(--color-surface, #f9f9f7); border-top: 1px solid var(--color-border, #e8e8e4); margin-top: auto; }
.home-panel-more:hover { text-decoration: underline; }
.minister-unresolved { color: var(--color-text, #1a1a1a); }
.minister-unresolved::after { content: " ◦"; color: var(--color-text-muted, #ccc); font-size: 0.7em; }

/* Submitter unresolved */
.submitter-unresolved { font-size: 0.9rem; font-weight: 500; color: var(--color-text, #1a1a1a); }
.submitter-unresolved::after { content: ' ◦'; color: var(--color-text-muted, #ccc); font-size: 0.7em; }

/* Coverage note */
.coverage-note { font-size: 0.78rem; color: var(--color-text-muted, #888); margin-top: 0.5rem; font-style: italic; }

/* Vote result on document page */
.doc-section--vote { background: var(--color-surface, #f9f9f7); border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; padding: 1.25rem; }
.vote-result-summary { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.vr-item { font-size: 0.875rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 4px; }
.vr-for { background: #e8f5e9; color: #2e7d32; }
.vr-against { background: #ffebee; color: #c62828; }
.vr-abstained { background: #f5f5f5; color: #616161; }
.vr-absent { background: #fafafa; color: #9e9e9e; border: 1px solid #e0e0e0; }
.vote-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vote-detail-link { font-size: 0.875rem; color: var(--color-accent, #2c5f8a); text-decoration: none; font-weight: 500; }
.vote-detail-link:hover { text-decoration: underline; }
.vote-citation { font-size: 0.78rem; color: var(--color-text-muted, #888); }
.citation-link { color: var(--color-text-muted, #888); text-decoration: underline; text-decoration-style: dotted; }
.citation-link:hover { color: var(--color-accent, #2c5f8a); }

/* Profile last updated */
.profile-last-updated { font-size: 0.75rem; color: var(--color-text-muted, #aaa); margin: 0 0 1rem; direction: rtl; }

/* Parliament stats */
.stats-disclaimer { background: #fff8e1; border: 1px solid #ffe082; border-right: 4px solid #f59e0b; border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.85rem; color: #5d4037; line-height: 1.7; }
.stats-disclaimer p { margin: 0 0 0.5rem; }
.stats-disclaimer p:last-child { margin-bottom: 0; font-size: 0.78rem; color: #795548; }
.stats-disclaimer strong { font-weight: 700; }
.stats-section { margin-bottom: 2.5rem; }
.stats-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.stats-section-note { font-size: 0.78rem; color: var(--color-text-muted, #888); margin-bottom: 0.75rem; }
.stats-table-wrapper { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.stats-table th { text-align: right; padding: 0.6rem 0.75rem; background: var(--color-surface, #f9f9f7); border-bottom: 2px solid var(--color-border, #e8e8e4); font-weight: 600; font-size: 0.82rem; color: var(--color-text-muted, #666); white-space: nowrap; }
.stats-table td { font-size: 0.9rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); vertical-align: middle; }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover td { background: var(--color-surface, #f9f9f7); }
.stats-rank { font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted, #bbb); text-align: center; width: 24px; }
.stats-table tr:nth-child(1) .stats-rank { color: #f59e0b; }
.stats-table tr:nth-child(2) .stats-rank { color: #9ca3af; }
.stats-table tr:nth-child(3) .stats-rank { color: #b45309; }
.stats-person-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; font-weight: 500; }
.stats-person-link:hover { color: var(--color-accent, #2c5f8a); }
.stats-person-plain { font-weight: 500; }
.stats-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center top; flex-shrink: 0; }
.stats-avatar--initial { background: var(--color-accent, #2c5f8a); color: white; display: inline-flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; }
.stats-score { font-weight: 700; color: var(--color-accent, #2c5f8a); }
.stats-years { font-size: 0.8rem; color: var(--color-text-muted, #888); direction: ltr; text-align: left; }
.stats-term-link { color: var(--color-accent, #2c5f8a); text-decoration: none; font-weight: 500; }
.stats-term-link:hover { text-decoration: underline; }

/* Action vote result button */
.action-vote-result-btn { font-size: 0.8rem; font-weight: 600; color: var(--color-accent, #2c5f8a); background: transparent; border: 1px solid #d0e4f5; border-radius: 4px; padding: 0.15rem 0.5rem; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.action-vote-result-btn:hover { background: #d0e4f5; }
.action-doc-hint { font-size: 0.68rem; color: var(--color-text-muted, #aaa); margin-right: 0.25rem; }

/* Proposals browse */
.proposals-filters { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; padding: 1rem; background: var(--color-surface, #f9f9f7); border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; }
.filter-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-pill { font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 20px; border: 1px solid var(--color-border, #e8e8e4); text-decoration: none; color: var(--color-text-muted, #666); background: white; transition: all 0.1s; }
.filter-pill:hover { border-color: var(--color-accent, #2c5f8a); color: var(--color-accent, #2c5f8a); }
.filter-pill--active { background: var(--color-accent, #2c5f8a); border-color: var(--color-accent, #2c5f8a); color: white; }
.proposals-list { display: flex; flex-direction: column; }
.proposal-row { padding: 0.85rem 0; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); display: flex; flex-direction: column; gap: 0.3rem; }
.proposal-row:last-child { border-bottom: none; }
.proposal-type-badge { font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 3px; display: inline-block; width: fit-content; }
.proposal-type-badge--law { background: #e3f2fd; color: #1565c0; }
.proposal-type-badge--wish { background: #f3e5f5; color: #6a1b9a; }
.proposal-title { font-size: 0.9rem; font-weight: 500; color: var(--color-text, #1a1a1a); text-decoration: none; line-height: 1.4; }
.proposal-title:hover { color: var(--color-accent, #2c5f8a); }
.proposal-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--color-text-muted, #888); }
.proposal-submitter-link { color: var(--color-accent, #2c5f8a); text-decoration: none; font-weight: 500; }
.proposal-submitter-link:hover { text-decoration: underline; }
.proposal-submitter-plain { color: var(--color-text-muted, #888); }
.unresolved-dot { font-size: 0.6rem; color: var(--color-text-muted, #ccc); }
.proposal-term { font-size: 0.8rem; background: var(--color-surface, #f0f0ee); padding: 0.1rem 0.35rem; border-radius: 3px; color: var(--color-text-muted, #666); }
.proposal-date { color: var(--color-text-muted, #aaa); }

/* Empty state */
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--color-text-muted, #888); border: 1px dashed var(--color-border, #e8e8e4); border-radius: 8px; margin: 1.5rem 0; }
.empty-state-message { font-size: 0.9rem; margin-bottom: 0.4rem; }
.empty-state-sub { font-size: 0.78rem; color: var(--color-text-muted, #aaa); margin: 0; }

/* Linked documents on issue page */
.issue-section--docs { background: var(--color-surface, #f9f9f7); border: 1px solid var(--color-border, #e8e8e4); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.linked-doc-item { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); }
.linked-doc-item:last-child { border-bottom: none; padding-bottom: 0; }
.linked-doc-type { font-size: 0.72rem; font-weight: 700; background: #fff3e0; color: #e65100; padding: 0.1rem 0.4rem; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.linked-doc-title { font-size: 0.9rem; font-weight: 500; color: var(--color-accent, #2c5f8a); text-decoration: none; flex: 1; }
.linked-doc-title:hover { text-decoration: underline; }
.linked-doc-meta { font-size: 0.78rem; color: var(--color-text-muted, #888); white-space: nowrap; }
.linked-doc-person { color: var(--color-accent, #2c5f8a); text-decoration: none; }
.linked-doc-person:hover { text-decoration: underline; }
.linked-doc-person-plain { color: var(--color-text-muted, #888); }

/* Accordion */
.accordion-header { width: 100%; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; background: transparent; border: none; border-bottom: 1px solid var(--color-border-subtle, #f0f0ee); cursor: pointer; text-align: right; direction: rtl; font-family: inherit; font-size: 0.875rem; font-weight: 600; color: var(--color-text, #1a1a1a); transition: background 0.1s; }
.accordion-header:hover { background: var(--color-surface, #f9f9f7); }
.accordion-header[aria-expanded="true"] { color: var(--color-accent, #2c5f8a); background: transparent; border-bottom-color: var(--color-accent, #2c5f8a); }
.accordion-header:focus { outline: none; background: var(--color-surface, #f9f9f7); }
.accordion-header:focus-visible { outline: 2px solid var(--color-accent, #2c5f8a); outline-offset: -2px; }
.accordion-title { flex: 1; text-align: right; }
.accordion-count { font-size: 0.72rem; font-weight: 500; color: var(--color-text-muted, #999); background: var(--color-surface, #f0f0ee); padding: 0.15rem 0.5rem; border-radius: 10px; flex-shrink: 0; }
.accordion-icon { font-size: 0.6rem; color: var(--color-text-muted, #bbb); flex-shrink: 0; display: inline-block; }
.accordion-header[aria-expanded="true"] .accordion-icon { color: var(--color-accent, #2c5f8a); }
.accordion-body[hidden] { display: none; }

/* ── Position / statement mode summary ── */
.position-summary-section { margin-bottom: 1.5rem; }
.position-summary {
  display: flex;
  gap: 18px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--color-bg-card, #f7f5f0);
  border: 1px solid var(--color-border-subtle, #e5e5e0);
  border-radius: 8px;
  font-size: 0.95rem;
}
.position-total {
  font-weight: 700;
  color: var(--color-text-primary, #2a2a2a);
}
.position-group-count {
  color: var(--color-text-muted, #777);
}
.action-badge--participated { background: #e8f5e9; color: #2e7d32; }

/* ── Issue description block ── */
.issue-description {
  background: var(--color-bg-card, #f7f5f0);
  border: 1px solid var(--color-border-subtle, #e5e5e0);
  border-right: 3px solid var(--color-primary, #2c5f8a);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--color-text-primary, #2a2a2a);
  line-height: 1.7;
}
.issue-description p { margin: 0; }
.issue-example-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-primary, #2c5f8a);
  text-decoration: none;
  direction: ltr;
}
.issue-example-link:hover { text-decoration: underline; }

/* Same-family shade variants for adjacent same-base segments */
.vote-bar--for-alt1      { background: #2e7d32; }   /* darker green */
.vote-bar--for-alt2      { background: #66bb6a; }   /* lighter green */
.vote-bar--against-alt1  { background: #b71c1c; }   /* darker red */
.vote-bar--abstained-alt1{ background: #757575; }   /* darker gray */
.vote-bar--absent-alt1   { background: #9e9e9e; }   /* darker absent gray */
.vote-bar--didnotvote-alt1 { background: #bdbdbd; color: #555; }


/* ── Contribution system ───────────────────────────────── */
.contribute-trigger-wrap {
  margin: 40px 0 20px;
  text-align: center;
}
.contribute-trigger-btn {
  background: none;
  border: 1px dashed var(--color-border-subtle, #d8d4cc);
  border-radius: 8px;
  padding: 10px 24px;
  color: var(--color-text-muted, #777);
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
}
.contribute-trigger-btn:hover {
  border-color: var(--color-primary, #2c5f8a);
  color: var(--color-primary, #2c5f8a);
  background: var(--color-bg-card, #f7f5f0);
}
.contribute-icon { margin-left: 6px; }

/* Modal overlay */
.contribute-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.contribute-modal-overlay.open { display: flex; }
.contribute-modal-box {
  background: var(--color-bg-page, #ffffff);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  direction: rtl;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text-muted, #777);
  padding: 4px 8px;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--color-text-primary, #2a2a2a);
}

/* Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border-subtle, #e5e5e0);
  padding-bottom: 12px;
}
.modal-tab {
  background: none;
  border: 1px solid var(--color-border-subtle, #e5e5e0);
  border-radius: 6px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted, #777);
  font-family: inherit;
}
.modal-tab.active {
  background: var(--color-primary, #2c5f8a);
  color: #fff;
  border-color: var(--color-primary, #2c5f8a);
}
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

/* Form */
.contribute-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary, #2a2a2a);
}
.contribute-form input[type=text],
.contribute-form input[type=file],
.contribute-form textarea,
.contribute-form select {
  border: 1px solid var(--color-border-subtle, #e5e5e0);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
  background: var(--color-bg-card, #f7f5f0);
  color: var(--color-text-primary, #2a2a2a);
  width: 100%;
  box-sizing: border-box;
  direction: rtl;
  font-family: inherit;
}
.contribute-form input:focus,
.contribute-form textarea:focus,
.contribute-form select:focus {
  outline: none;
  border-color: var(--color-primary, #2c5f8a);
}
.checkbox-label {
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-weight: 400 !important;
}
.checkbox-label input {
  width: auto !important;
  margin-top: 3px;
  flex-shrink: 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.req { color: #c00; margin-right: 2px; }
.form-actions { margin-top: 20px; }
.btn-submit {
  background: var(--color-primary, #2c5f8a);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}
.form-msg:not(:empty) { display: block; }
.form-msg.success { background: #e6f4ea; color: #1a7a3a; }
.form-msg.error { background: #fce8e6; color: #a50e0e; }
.photo-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
  object-fit: cover;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
