/* ==========================================================================
   Pressure layer
   --------------------------------------------------------------------------
   Styles for the parts of the product that carry real state: support
   thresholds, outward actions and the response tracker.
   Everything is expressed with the tokens from common.css so dark mode is
   inherited rather than reimplemented.
   ========================================================================== */

/* ------------------------------------------------------- homepage summary */

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}

.home-stats span {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.home-stats strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ------------------------------------------------------- response tracker */

.pressure-ledger-section {
  margin-bottom: 2rem;
}

.pressure-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pressure-ledger-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.pressure-ledger-item.is-overdue {
  border-left-color: var(--danger);
}

.pressure-ledger-item.is-waiting {
  border-left-color: var(--accent);
}

.pressure-ledger-item.is-answered {
  border-left-color: var(--success);
}

.ledger-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: min(100%, 22rem);
  flex: 1;
}

.ledger-main a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--fs-md);
  line-height: 1.35;
}

.ledger-main a:hover {
  color: var(--secondary);
}

.ledger-institution,
.ledger-registration {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.ledger-institution i {
  margin-right: 0.35rem;
  color: var(--text-muted);
}

.ledger-response {
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  background: var(--bg-hover);
  border-radius: var(--radius-md);
}

.ledger-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.ledger-badge {
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}

.is-overdue .ledger-badge {
  color: #fff;
  background: var(--danger);
}

.is-waiting .ledger-badge {
  color: #78350f;
  background: #fef3c7;
}

.is-answered .ledger-badge {
  color: #fff;
  background: var(--success);
}

.ledger-doc {
  font-size: var(--fs-sm);
  color: var(--secondary);
  text-decoration: none;
  white-space: nowrap;
}

.ledger-doc:hover {
  text-decoration: underline;
}

/* Shown when nothing has been transmitted yet: explains the mechanism instead
   of filling the space with invented activity. */
.empty-pressure-state {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
}

.empty-pressure-state p {
  margin: 0 0 0.6rem;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-secondary);
}

.empty-pressure-state p:last-of-type {
  margin-bottom: 0;
}

.empty-pressure-state strong {
  color: var(--text-primary);
}

.empty-pressure-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}

.empty-pressure-cta:hover {
  gap: 0.6rem;
}

/* ------------------------------------------------------- threshold sidebar */

.threshold-box .threshold-state {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.threshold-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.threshold-count {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.threshold-bar {
  height: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  background: var(--bg-hover);
  border-radius: 999px;
}

/* The fill keeps a minimum width so a single-digit percentage still reads as a
   started bar rather than an empty track. */
.threshold-bar span {
  display: block;
  height: 100%;
  min-width: 12px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 999px;
  transition: width var(--transition-normal);
}

.threshold-bar span.is-empty {
  min-width: 0;
}

.threshold-detail {
  margin: 0 0 0.85rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.threshold-transmission {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 0.9rem;
  padding: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.threshold-transmission > i {
  flex-shrink: 0;
  width: 1rem;
  margin-top: 0.15rem;
  color: #3b82f6;
  text-align: center;
}

.threshold-transmission span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.threshold-transmission strong {
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-primary);
}

.threshold-transmission small {
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-secondary);
}

.threshold-transmission.is-ready {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.threshold-transmission.is-ready > i {
  color: #d97706;
}

.threshold-transmission.is-sent {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.threshold-transmission.is-sent > i {
  color: #059669;
}

html.dark .threshold-transmission.is-sent {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}

/* ---------------------------------------------------- support toggle button */

.threshold-box .support-btn {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.threshold-box .support-btn i {
  font-size: var(--fs-sm);
}

.threshold-box .support-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -6px rgba(59, 130, 246, 0.5);
}

.threshold-box .support-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.threshold-box .support-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Already supporting: a settled, confirmed state. Hovering shifts it to the
   withdrawal colour so the destructive half of the toggle is never a surprise. */
/* The withdrawal label is long enough to wrap in a 280px rail, so this state
   aligns left around the tick instead of centring a ragged two-line block. */
.threshold-box .support-btn.supported {
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  font-size: var(--fs-sm);
  text-align: left;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: none;
}

.threshold-box .support-btn.supported:hover {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  transform: none;
  box-shadow: none;
}

.threshold-box .support-btn.supported:active {
  transform: none;
  box-shadow: none;
}

html.dark .threshold-box .support-btn.supported {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
}

html.dark .threshold-box .support-btn.supported:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
}

.threshold-box .support-btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.threshold-box .support-btn:disabled i {
  animation: threshold-support-pulse 0.9s ease-in-out infinite;
}

@keyframes threshold-support-pulse {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .threshold-box .support-btn,
  .threshold-box .support-btn:hover,
  .threshold-box .support-btn:active {
    transform: none;
  }

  .threshold-box .support-btn:disabled i {
    animation: none;
  }
}

/* ----------------------------------------------- follow / favorite row */

.threshold-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.threshold-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.threshold-secondary-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color, var(--border-light));
}

.threshold-secondary-btn.is-active {
  color: var(--secondary, #3b82f6);
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
}

.threshold-secondary-btn[data-reform-favorite].is-active {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.threshold-secondary-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ------------------------------------------------------- public signature */

.threshold-sign {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast);
}

.threshold-sign:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

.threshold-sign:has(input:checked) {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.4);
}

/* A real checkbox, restyled: it keeps keyboard focus and the accessibility
   tree, only the browser's default box is replaced. */
.threshold-sign input[type="checkbox"] {
  position: relative;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.1rem 0 0;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.threshold-sign input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.threshold-sign input[type="checkbox"]:hover {
  border-color: #3b82f6;
}

.threshold-sign input[type="checkbox"]:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.threshold-sign input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.threshold-sign input[type="checkbox"]:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* -------------------------------------------------------------- poll cards */

.voteaza-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.poll-option-row {
  margin-bottom: 0.85rem;
}

.poll-option-head {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.poll-option-head strong {
  font-size: var(--fs-sm);
  color: var(--text-primary);
}

.poll-option-row small {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.poll-total {
  padding-top: 0.6rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
}

.poll-vote-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}

.poll-vote-link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------- propose modal */

.proposal-modal-content {
  max-width: 560px;
  padding: 1.6rem 1.75rem 1.75rem;
}

.proposal-modal-content h2 {
  margin: 0 0 0.3rem;
  font-family: "Poppins", sans-serif;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}

.proposal-modal-intro {
  margin: 0 0 1.3rem;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.proposal-modal-content form { gap: 1rem; }

.proposal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.proposal-modal-content .form-group label {
  margin-bottom: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.proposal-modal-content .form-group input,
.proposal-modal-content .form-group textarea,
.proposal-modal-content .form-group select {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-card);
  font-size: var(--fs-sm);
}

.proposal-modal-content .form-group select { min-height: 44px; cursor: pointer; }
.proposal-modal-content .form-group textarea { min-height: 88px; }

.proposal-optional {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0.9rem 0.9rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.proposal-optional legend {
  padding: 0 0.4rem;
  margin-left: -0.4rem;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.proposal-optional legend small {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.form-group label small {
  font-weight: 400;
  color: var(--text-muted);
}

.proposal-count {
  float: right;
  font-weight: 500;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .proposal-field-grid { grid-template-columns: 1fr; }
}

.proposal-error {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: var(--fs-sm);
  color: #7f1d1d;
  background: #fee2e2;
  border-radius: var(--radius-md);
}

html.dark .proposal-error {
  color: #fecaca;
  background: rgba(153, 27, 27, 0.35);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 640px) {
  .pressure-ledger-item {
    flex-direction: column;
  }

  .ledger-state {
    align-items: flex-start;
  }

  .home-stats {
    gap: 0.35rem 1rem;
  }

  .home-stats span {
    font-size: var(--fs-xs);
  }
}

/* ----------------------------------------------------------- OTV poll cards */
/* Results are read-only here; voting stays on OTV so one question keeps one
   official count. */

.polls-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.poll-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.poll-card.is-closed {
  opacity: 0.75;
}

.poll-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.poll-card-head h2 {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.35;
  color: var(--text-primary);
}

.poll-state {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
}

.poll-card:not(.is-closed) .poll-state {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.poll-description {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.poll-option-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-primary);
}

.poll-option-label strong {
  font-variant-numeric: tabular-nums;
}

.poll-bar {
  height: 6px;
  margin: 0.3rem 0 0.2rem;
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: 999px;
}

.poll-bar span {
  display: block;
  height: 100%;
  background: var(--text-muted);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.poll-option.is-leading .poll-bar span {
  background: var(--secondary);
}

.poll-option small {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.poll-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

.poll-card-foot a {
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}

.poll-card-foot a:hover {
  text-decoration: underline;
}

/* Votable poll options.
   Each option becomes a button while the poll is open; the member's own choice
   is marked so a changed vote is always visible. */

.poll-option-vote {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  font: inherit;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.poll-option-vote:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.poll-option-vote:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 1px;
}

.poll-option.is-mine .poll-option-vote {
  background: var(--bg-hover);
  border-color: var(--secondary);
}

.poll-option.is-mine .poll-bar span {
  background: var(--secondary);
}

.poll-option-tick {
  margin-left: 0.35rem;
  color: var(--secondary);
  font-size: 0.8em;
}

/* Disable interaction while a vote is in flight, without shifting layout. */
.poll-card.is-voting .poll-options {
  opacity: 0.6;
  pointer-events: none;
}

.poll-voted {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--secondary);
}

.poll-hint {
  font-style: italic;
}

.poll-signin-hint {
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--secondary);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.poll-signin-hint:hover {
  text-decoration: underline;
}

/* Newsletter signup result */

/* Keeps the result under the form instead of beside it, so the surrounding
   two-column layout does not reflow when a message appears. */
.newsletter-action {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.newsletter-feedback {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.newsletter-feedback.is-success {
  color: #10b981;
}

.newsletter-feedback.is-error {
  color: #ef4444;
}

/* ------------------------------------------------------------------ debate box

   The invitation to argue a measure one to one. Deliberately quieter than the
   support button beside it: supporting is the primary act on this page, debating
   is the escalation for people who want to do more than click. */

.debate-box .debate-box-intro,
.debate-box .debate-box-note {
  margin: 0 0 0.75rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

.debate-box .debate-box-note strong {
  color: var(--text-primary);
}

.debate-box .debate-box-note.is-quiet {
  margin: 0.75rem 0 0;
  font-size: var(--fs-xs);
  color: var(--text-tertiary, var(--text-secondary));
}

.debate-box .debate-box-loading {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.debate-box-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.debate-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 10px);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}

.debate-side i {
  font-size: var(--fs-xs);
}

.debate-side.is-pro:hover {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.debate-side.is-contra:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.debate-side:disabled {
  opacity: 0.6;
  cursor: default;
}

.debate-box-anon-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-secondary);
  cursor: pointer;
}

.debate-box-anon-toggle input {
  margin-top: 0.15rem;
  accent-color: #6366f1;
}

.debate-box-primary,
.debate-box-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast);
}

.debate-box-primary {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.debate-box-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

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

.debate-box-secondary:hover {
  color: var(--text-primary);
}

.debate-box-anon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: var(--fs-xs);
  color: #6366f1;
}

.debate-box-queue {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ---------------------------------------------------------- advocate box */

/* A violet card with a white button, so the way to ask OTV AI stands out from
   the plain white sidebar boxes around it. */
.advocate-box {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #a78bfa 0%, #7c3aed 45%, #4c1d95 100%);
  box-shadow: none;
}

.advocate-box::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.advocate-box h3 {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.advocate-box h3 i { color: #ddd6fe; }

.advocate-box-intro {
  margin: 0 0 0.85rem;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.advocate-box-primary {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #5b21b6;
  border: 1px solid transparent;
  border-radius: var(--radius-lg, 10px);
  background: #fff;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.advocate-box-primary:hover {
  background: #f5f3ff;
}

.advocate-box-primary:disabled {
  opacity: 0.65;
  cursor: default;
}

/* ------------------------------------------------------- contents box

   Each entry carries its section's icon; the open section is filled blue and
   the bar under the heading shows how far the reader has scrolled. */

.mr-toc { display: flex; flex-direction: column; padding: 1.125rem 0.75rem 0.625rem; }
.mr-toc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.375rem 0.625rem; }
.mr-toc .mr-toc-head h3 { margin: 0; padding: 0; border: 0; }
.mr-toc .mr-toc-count { font-size: 0.6875rem !important; font-weight: 700; color: var(--text-muted); background: var(--bg-hover); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mr-toc-progress { flex: none; height: 4px; margin: 0 0.375rem 0.625rem; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.mr-toc-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #3b82f6); transition: width 0.12s linear; }
.mr-toc .toc-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.mr-toc .toc-list li { margin-bottom: 2px; }
.mr-toc .toc-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.375rem;
  border-left: 0;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}
.mr-toc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.mr-toc .mr-toc-icon i { font-size: 0.75rem !important; }
.mr-toc .toc-list a:hover { background: var(--bg-hover); color: var(--text-primary); border-left-color: transparent; }
.mr-toc .toc-list a.active { background: color-mix(in srgb, var(--secondary) 10%, var(--bg-card)); color: var(--text-primary); font-weight: 700; }
.mr-toc .toc-list a.active .mr-toc-icon { background: var(--secondary); color: #fff; }

/* ---------------------------------------------------- section blocks

   The blocks the measure text is built from (router.js measure*Block): used
   inside the article on the measure page and inside the cards of the /nou
   preview. Selectors carry a parent class so .measure-article-content p does
   not override their margins and colours. Font sizes re-point
   --measure-type-body, which the page forces on every element. */

.mr-benefits, .mr-args, .mr-questions { list-style: none; margin: 0; padding: 0; }
.mr-benefits, .mr-args, .mr-examples, .mr-questions, .mr-law {
  --tone-soft: color-mix(in srgb, var(--tone) 10%, var(--bg-card));
  --tone-line: color-mix(in srgb, var(--tone) 28%, var(--bg-card));
}

/* benefits */
.mr-benefits {
  --tone: #10b981;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.mr-benefits li {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0.875rem;
  border-radius: var(--radius-lg);
  background: var(--tone-soft);
  border: 1px solid transparent;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.mr-benefits li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mr-benefits li:hover { border-color: var(--tone-line); transform: translateY(-1px); }
.mr-benefit-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #047857;
  color: #fff;
}
.mr-benefits .mr-benefit-icon i { --measure-type-body: 0.875rem; color: #fff; }
.mr-benefits b { --measure-type-body: 0.9375rem; display: block; color: var(--text-primary); line-height: 1.3; }
.mr-benefits li p { --measure-type-body: 0.8438rem; margin: 4px 0 0; color: var(--text-secondary); line-height: 1.45; }

/* household numbers */
.mr-calc-block .mr-calc-title { --measure-type-body: 1rem; margin: 0 0 0.875rem; font-weight: 700; color: var(--text-primary); }
.mr-calc {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}
.mr-calc-diff {
  padding: 1rem 1.125rem;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, #10b981 10%, var(--bg-card));
  text-align: center;
}
.mr-calc-diff b { --measure-type-body: 1.875rem; display: block; font-weight: 800; color: #10b981; line-height: 1; white-space: nowrap; }
.mr-calc-diff span { --measure-type-body: 0.75rem; display: block; margin-top: 6px; font-weight: 600; color: var(--text-secondary); max-width: 130px; line-height: 1.3; }
.mr-bar + .mr-bar { margin-top: 0.875rem; }
.mr-bar-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.375rem; }
.mr-bar-head span { color: var(--text-secondary); font-weight: 600; }
.mr-bar-head b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mr-bar-track { height: 14px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.mr-bar-track span { display: block; height: 100%; border-radius: inherit; }
.mr-bar.is-before .mr-bar-track span { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.mr-bar.is-after .mr-bar-track span { background: linear-gradient(90deg, #6ee7b7, #10b981); }

/* arguments */
.mr-args { --tone: #3b82f6; display: grid; }
.mr-args li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.25rem;
  margin: 0;
  padding: 0.875rem 0;
}
.mr-args li + li { border-top: 1px solid var(--border-light); }
.mr-args li:first-child { padding-top: 0; }
.mr-args li:last-child { padding-bottom: 0; }
.mr-args .mr-arg-num { --measure-type-body: 1.625rem; margin-top: 2px; font-weight: 800; line-height: 1; color: var(--tone-line); letter-spacing: -0.03em; }
.mr-args b { --measure-type-body: 1rem; display: block; color: var(--text-primary); line-height: 1.35; }
.mr-args li p { margin: 4px 0 0; color: var(--text-secondary); line-height: 1.55; }

/* objections */
.mr-debate { display: grid; gap: 1rem; }
.mr-debate-pair { display: grid; gap: 0.375rem; }
.mr-debate .mr-say, .mr-debate .mr-answer {
  position: relative;
  margin: 0;
  padding: 0.75rem 0.95rem;
  line-height: 1.5;
  border-radius: 14px;
}
.mr-debate .mr-say {
  justify-self: start;
  max-width: 85%;
  background: color-mix(in srgb, #ef4444 9%, var(--bg-card));
  color: color-mix(in srgb, #ef4444 70%, var(--text-primary));
  font-weight: 700;
  border-bottom-left-radius: 4px;
}
.mr-debate .mr-answer {
  justify-self: end;
  max-width: 92%;
  background: color-mix(in srgb, #10b981 9%, var(--bg-card));
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}
.mr-debate .mr-say span, .mr-debate .mr-answer span {
  --measure-type-body: 0.625rem;
  display: block;
  margin-bottom: 2px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.mr-debate .mr-answer span { color: #059669; }

/* examples */
.mr-examples { --tone: #0d9488; display: grid; gap: 0.75rem; }
.mr-example {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--tone-soft);
}
.mr-example-flag {
  flex: none;
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}
.mr-example-flag.is-empty { display: grid; place-items: center; background: var(--bg-card); color: var(--tone); }
.mr-example b { --measure-type-body: 1.0625rem; display: block; color: var(--text-primary); }
.mr-example p { margin: 2px 0 0; color: var(--text-secondary); line-height: 1.5; }

/* questions */
.mr-questions {
  --tone: #8b5cf6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.mr-questions li {
  position: relative;
  margin: 0;
  padding: 2.5rem 0.95rem 0.95rem;
  border-radius: var(--radius-lg);
  background: var(--tone-soft);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}
.mr-questions li::before {
  content: "?";
  position: absolute;
  top: 0.75rem;
  left: 0.95rem;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tone);
  color: #fff;
  font-weight: 800;
  font-size: 0.8125rem !important;
}

/* campaign line */
.mr-quote {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 120% at 0% 0%, #1e3a8a 0%, #0f172a 55%);
  color: #fff;
  overflow: hidden;
}
.mr-quote::after {
  content: "\201D";
  position: absolute;
  right: 1rem;
  top: -0.5rem;
  font-family: Georgia, serif;
  font-size: 7rem !important;
  line-height: 1;
  color: rgba(250, 204, 21, 0.22);
  pointer-events: none;
}
.mr-quote blockquote { margin: 0; padding: 0; border: 0; background: none; }
.mr-quote blockquote p {
  --measure-type-body: 1.375rem;
  position: relative;
  margin: 0;
  padding-right: 2.5rem;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.mr-quote .mr-kicker + blockquote p { margin-top: 0.625rem; }
.mr-quote blockquote cite { --measure-type-body: 0.875rem; display: block; margin-top: 0.875rem; font-style: normal; font-weight: 600; color: #cbd5e1; }

/* law text */
p.mr-law-title { --measure-type-body: 1rem; margin: 0 0 0.75rem; font-weight: 700; color: var(--text-primary); }
.mr-law {
  --tone: #475569;
  display: grid;
  gap: 0.75rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #f59e0b 5%, var(--bg-card));
  border: 1px solid var(--border-light);
}
.mr-law p { --measure-type-body: 0.9688rem; margin: 0; color: var(--text-primary); font-family: Georgia, "Times New Roman", serif; line-height: 1.65; }
.mr-law .mr-law-num { font-family: Inter, sans-serif; font-weight: 800; color: var(--tone); margin-right: 0.375rem; }

@media (max-width: 560px) {
  .mr-quote { padding: 1.25rem 1rem; }
  .mr-benefits { grid-template-columns: 1fr; }
  .mr-calc { grid-template-columns: 1fr; }
  .mr-calc-diff span { max-width: none; }
  .mr-debate .mr-say, .mr-debate .mr-answer { max-width: 100%; }
}

/* ------------------------------------------------ measure typography scale

   A measure page uses one deliberate scale. The scoped baseline also
   neutralises older component-specific values, so adding a card or sidebar
   control cannot silently introduce another text size.

   Steps stay near a 1.15 ratio. Wider jumps made every description read as a
   footnote under its own title: weight, colour and spacing already separate
   the tiers, so size only has to confirm the order, not shout it. */
.measure-page-layout {
  --measure-type-caption: 0.75rem;
  --measure-type-body: 0.8125rem;
  --measure-type-lead: 0.9375rem;
  --measure-type-heading: 1rem;
  --measure-type-section: 1.25rem;
  --measure-type-title: 1.375rem;
  font-size: var(--measure-type-body) !important;
}

.measure-page-preview {
  --measure-type-caption: 0.6875rem;
  --measure-type-body: 0.9375rem;
  --measure-type-heading: 1.0625rem;
  --measure-type-lead: var(--measure-type-heading);
}

.measure-page-layout * {
  font-size: var(--measure-type-body) !important;
}

.measure-page-layout .measure-detail-title,
.measure-page-layout .measure-detail-title-text,
.measure-page-layout .threshold-count {
  font-size: var(--measure-type-title) !important;
}

.measure-page-layout :is(
  .measure-article-content h3,
  .measure-article-content h4,
  .sidebar-box h3,
  .related-measures h2,
  .related-measures .measure-title
) {
  font-size: var(--measure-type-heading) !important;
}

.measure-page-layout .measure-article-content h2,
.measure-page-layout .nova-context-heading strong {
  font-size: var(--measure-type-section) !important;
  font-weight: 700;
}

.measure-page-layout .nova-context-heading strong { font-family: inherit; }

.measure-page-layout .measure-article-content h2 > * {
  font-size: inherit !important;
}

.measure-page-layout :is(
  .measure-impact-badge,
  .threshold-label,
  .threshold-transmission small,
  .nova-task-copy small,
  .nova-task-meta,
  .nova-context-heading b,
  .nova-context-card-copy small,
  .nova-context-more summary span,
  .civic-history-item span,
  .related-measures .tag,
  .related-measures .impact-badge-card
) {
  font-size: var(--measure-type-caption) !important;
}

/* The subtitle answers the title, so it stays one step below it instead of
   dropping to the compact size the surrounding controls use. */
.measure-page-layout .measure-detail-description {
  font-size: var(--measure-type-lead) !important;
}

/* The article is read, not scanned. Re-pointing the scale here lifts the prose
   and its headings together, so a paragraph sits one step under the heading it
   belongs to rather than two. The sidebar keeps the compact values because it
   stays a control panel rather than a text to read. */
.measure-article-content {
  --measure-type-caption: 0.8125rem;
  --measure-type-body: 0.9375rem;
  --measure-type-heading: 1.0625rem;
}

.measure-page-preview .measure-article-content {
  --measure-type-caption: inherit;
  --measure-type-body: inherit;
  --measure-type-heading: inherit;
}

/* Card titles label a card, they do not open a section. The border, the
   centring and the weight already mark them, so they read at prose size and
   stop dwarfing the summary above them. */
.measure-page-layout .measure-article-content .benefit-item h4 {
  font-size: var(--measure-type-body) !important;
}

/* Icons are visual markers, not typography; keep them legible inside the
   benefit cards without introducing another text size. */
.measure-page-layout .benefit-item i {
  font-size: var(--fs-lg) !important;
}

/* The opening summary is editorial copy, not an AI-style callout. */
.measure-article-content #section-1 > .highlight-box {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin: 1rem 0 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-card) 91%, #10b981);
  box-shadow: var(--shadow-sm);
}

.measure-article-content #section-1 > .highlight-box::before {
  content: "PE SCURT";
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-size: var(--measure-type-caption) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  grid-column: 1;
  grid-row: 1;
}

/* Most summaries run to several paragraphs. Without an explicit column the
   grid would flow them alternately into the badge column and the text column,
   so the second paragraph would sit under the label and stretch it. Pinning
   the badge and keeping every child in column two lets the summary grow to any
   length and still read as one block beside the label. */
.measure-article-content #section-1 > .highlight-box > * {
  grid-column: 2;
}

.measure-article-content #section-1 > .highlight-box > p {
  margin: 0;
  line-height: 1.7;
}

html.dark .measure-article-content #section-1 > .highlight-box {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.09);
}

html.dark .measure-article-content #section-1 > .highlight-box::before {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

@media (max-width: 520px) {
  .measure-article-content #section-1 > .highlight-box {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .measure-article-content #section-1 > .highlight-box::before {
    justify-self: start;
  }

  /* One column now, so the label stacks above the text instead of sitting
     beside it and nothing may be pushed into a second, implicit column. */
  .measure-article-content #section-1 > .highlight-box > * {
    grid-column: 1;
  }
}

/* Keep the attribution visually close to the bottom of the quote card. */
.measure-page-layout .quote {
  padding-bottom: 1.75rem;
}

/* ------------------------------------------------------ section cards

   Each section of the measure text is its own card (the /nou preview and,
   through upgradeMeasureArticle, the measure page): icon tile, kicker and
   title on top, one colour per section. Kept at the end of the file so it
   wins over the older article rules of the same weight. */

.mr-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mr-tone-green  { --tone: #10b981; }
.mr-tone-amber  { --tone: #f59e0b; }
.mr-tone-blue   { --tone: #3b82f6; }
.mr-tone-red    { --tone: #ef4444; }
.mr-tone-teal   { --tone: #0d9488; }
.mr-tone-violet { --tone: #8b5cf6; }
.mr-tone-slate  { --tone: #475569; }
.mr-card, .mr-hero, .mr-quote {
  --tone-soft: color-mix(in srgb, var(--tone, #10b981) 10%, var(--bg-card));
  --tone-line: color-mix(in srgb, var(--tone, #10b981) 28%, var(--bg-card));
  --tone-ink: color-mix(in srgb, var(--tone, #10b981) 78%, var(--text-primary));
}

.mr-kicker {
  --measure-type-body: 0.6875rem;
  display: block;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.mr-quote .mr-kicker { color: #facc15; }

.mr-card {
  position: relative;
  padding: 1.375rem 1.375rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 20px -12px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.mr-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}
.mr-head-icon {
  flex: none;
  display: grid;
  place-items: center;
  background: var(--tone-soft);
  color: var(--tone);
}
.mr-head-icon,
.measure-article-cards .mr-video-section .video-suggestion-content::before {
  width: 39px;
  height: 39px;
  min-width: 39px;
  border-radius: 12px;
}
.measure-article-cards .mr-video-section .video-suggestion-content::before { font-size: 0.9375rem; }
.mr-head .mr-head-icon i { --measure-type-body: 0.9375rem; color: var(--tone); }
html.dark .mr-tone-slate .mr-head-icon { background: var(--bg-hover); }
html.dark .mr-tone-slate .mr-head-icon i { color: var(--text-secondary); }
.mr-head h2,
.measure-page-layout .measure-article-content .mr-head h2 {
  --measure-type-body: 1.25rem;
  --measure-type-section: 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* On the measure page the article stops being one white box: its sections
   are the cards, spaced like the preview. */
.measure-page-layout .measure-article-content.measure-article-cards {
  display: grid;
  gap: 1.75rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.measure-page-layout .measure-article-cards > .article-section { margin: 0; }
.measure-article-cards .mr-video-section > .video-suggestion { margin: 0; }
.measure-page-layout .measure-article-cards + * { margin-top: 1.75rem; }

@media (max-width: 560px) {
  .mr-card { padding: 1.125rem 1rem 1.25rem; }
}

/* The opening card: what the measure means, then one person's numbers. */
.mr-hero {
  --tone: #10b981;
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, #10b981 22%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, #10b981 9%, var(--bg-card)), var(--bg-card) 70%);
  border: 1px solid var(--tone-line);
  box-shadow: 0 10px 30px -18px rgba(16, 185, 129, 0.55);
}
.mr-hero .mr-lede {
  --measure-type-body: 1.1875rem;
  margin: 0.5rem 0 0;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.mr-case {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.mr-case-portrait {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--tone-line);
}
.mr-case-text { flex: 1; min-width: 0; }
.mr-case .mr-case-label { --measure-type-body: 0.6875rem; display: block; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.mr-case-text b { --measure-type-body: 1rem; display: block; margin-top: 1px; color: var(--text-primary); }
.mr-case-text p { --measure-type-body: 0.8438rem; margin: 3px 0 0; color: var(--text-secondary); line-height: 1.45; }
.mr-case-amount { flex: none; text-align: center; padding-left: 1rem; border-left: 1px solid var(--border-light); max-width: 120px; }
.mr-case-amount b { --measure-type-body: 2.125rem; display: block; font-weight: 800; line-height: 1; color: var(--tone); white-space: nowrap; letter-spacing: -0.02em; }
.mr-case-amount span { --measure-type-body: 0.75rem; display: block; margin-top: 4px; font-weight: 600; color: var(--tone-ink); line-height: 1.25; }

@media (max-width: 560px) {
  .mr-hero { padding: 1.25rem 1rem; }
}

/* The worked example lays out by the width of its own card, not the screen:
   below about 540px of room the portrait goes and +750 moves under the story, so the
   text never ends up squeezed into a narrow column. */
.mr-hero { container: mr-hero / inline-size; }
@container mr-hero (max-width: 540px) {
  .mr-case { flex-wrap: wrap; }
  .mr-case-portrait { display: none; }
  .mr-case-text b { margin-top: 0.375rem; }
  .mr-case-text p { margin-top: 0.5rem; }
  .mr-case-amount {
    flex-basis: 100%;
    max-width: none;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.75rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--border-light);
    text-align: left;
  }
}

.measure-page-layout.measure-page-preview .measure-page-sidebar {
  --measure-sidebar-row-gap: 1.25rem;
  row-gap: var(--measure-sidebar-row-gap);
}

.measure-page-preview .measure-page-sidebar .measure-preview-actions {
  row-gap: var(--measure-sidebar-row-gap);
}

/* Susțin and Distribuie: taller buttons, the yellow one lifted by its shadow. */
.measure-page-layout .measure-preview-actions > button {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
}
.measure-page-layout .measure-preview-actions > .otv-primary-btn {
  box-shadow: 0 8px 18px -10px rgba(234, 179, 8, 0.9);
}

/* ------------------------------------------------ measure type sizes

   The measure page uses four sizes, by importance:
     title (22px)  the page title and key figures;
     tabs  (20px)  the Măsura / Dezbateri / Surse navigation;
     lead  (17px)  the subtitle, card titles, the opening text, the campaign
                   line and the sidebar box titles;
     body  (15px)  everything that is read: text, item titles and buttons;
     label (12px)  tags and badges, kickers, captions, notes.
   Older rules size elements in many ways (some with !important), so this
   block repeats the layout class to outrank all of them. Icons keep their
   own sizes; they are glyphs, not text. */

.measure-page-layout {
  --type-title: 1.375rem;
  --type-lead: 1.0625rem;
  --type-body: 0.9375rem;
  --type-label: 0.75rem;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout *:not(i, .fa, .fas, .far, .fab) {
  font-size: var(--type-body) !important;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-detail-title,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-detail-title-text,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-case-amount b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-calc-diff b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-arg-num {
  font-size: var(--type-title) !important;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-preview-tabs a,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-preview-tabs a * {
  font-size: 1.1875rem !important;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-detail-description,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-head h2,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-benefits li b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-args li b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-debate .mr-say,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-example b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-case-text b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-calc-title,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-law-title,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-hero .mr-lede,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-quote blockquote p,
html body .measure-page-layout.measure-page-layout.measure-page-layout .sidebar-box h3,
html body .measure-page-layout.measure-page-layout.measure-page-layout .video-suggestion h3,
html body .measure-page-layout.measure-page-layout.measure-page-layout .related-measures h2,
html body .measure-page-layout.measure-page-layout.measure-page-layout .nova-context-heading strong,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-forum-topics strong,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-forum h2 {
  font-size: var(--type-lead) !important;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout .category-tag,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-impact-badge,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-kicker,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-case-label,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-case-amount span,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-calc-diff span,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-debate .mr-say span,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-debate .mr-answer span,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-toc-count,
html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-quote blockquote cite,
html body .measure-page-layout.measure-page-layout.measure-page-layout .nova-context-heading b,
html body .measure-page-layout.measure-page-layout.measure-page-layout .nova-context-card-copy small,
html body .measure-page-layout.measure-page-layout.measure-page-layout .related-measures .tag,
html body .measure-page-layout.measure-page-layout.measure-page-layout .related-measures .impact-badge-card,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-forum-topics span,
html body .measure-page-layout.measure-page-layout.measure-page-layout .measure-act-text small {
  font-size: var(--type-label) !important;
}

html body .measure-page-layout.measure-page-layout.measure-page-layout .mr-questions li::before {
  font-size: var(--type-label) !important;
}

/* "Filmează-te" and "Copiază textul": text only, side by side, with the
   height and corners of Susțin / Distribuie. */
.measure-page-layout .measure-reading-actions > button {
  min-height: 40px;
  padding: 0 0.5rem;
  border-radius: 10px;
}

/* ------------------------------------------------ measure page on phones

   The text comes first, starting with "Pe scurt"; one "Susține măsura" card
   (Susțin, then Distribuie, Filmează-te, Copiază textul, OTV AI) closes it.
   The subtitle is hidden: "Pe scurt" says the same thing a few lines lower. */

.measure-mobile-act { display: none; }

@media (max-width: 1100px) {
  .measure-mobile-act {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  .measure-mobile-act .measure-preview-mobile-share { margin: 0; }
}

@media (max-width: 900px) {
  .measure-page-preview .measure-detail-description { display: none; }

  .measure-page-layout .measure-article-cards { gap: 1.25rem; }
  .measure-page-layout .measure-article-cards + * { margin-top: 1.25rem; }
}

@container measure-main (max-width: 520px) {
  .mr-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .mr-head { gap: 0.625rem; margin-bottom: 0.875rem; }
  .mr-head-icon,
  .measure-article-cards .mr-video-section .video-suggestion-content::before {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
  }
  .mr-args li { grid-template-columns: 36px minmax(0, 1fr); }
  .mr-benefits li { padding: 0.75rem; }
  .mr-questions { grid-template-columns: 1fr; }
  .mr-questions li { padding: 0.875rem 0.95rem 0.875rem 3rem; }
  .mr-questions li::before { top: 50%; transform: translateY(-50%); }
}

/* The closing card on phones: Susțin, then the other actions as rows. */
.measure-act-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #facc15;
  color: #111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(234, 179, 8, 0.9);
}
.measure-act-primary[aria-pressed="true"] {
  background: color-mix(in srgb, #10b981 12%, var(--bg-card));
  color: #059669;
  box-shadow: none;
}
.measure-act-list { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--border-light); }
.measure-act-list li { margin: 0; }
.measure-act-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  background: none;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.measure-act-list li:last-child .measure-act-row { border-bottom: 0; padding-bottom: 0; }
.measure-act-row:disabled { opacity: 0.6; }
.measure-act-row.is-blue { --act: #3b82f6; }
.measure-act-row.is-red { --act: #ef4444; }
.measure-act-row.is-slate { --act: #475569; }
.measure-act-row.is-violet { --act: #8b5cf6; }
.measure-act-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--act) 12%, var(--bg-card));
  color: var(--act);
}
.measure-act-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.measure-act-text b { font-weight: 700; }
.measure-act-text small { color: var(--text-secondary); }
.measure-act-chevron { color: var(--text-muted); }

/* The same card in the desktop sidebar, tightened for the narrow column. */
.measure-page-sidebar .measure-act-card.is-side { flex-shrink: 0; padding: 1rem 1rem 0.75rem; }
.measure-act-card.is-side .mr-head { margin-bottom: 0.75rem; gap: 0.625rem; }
.measure-act-card.is-side .mr-head-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; }
.measure-act-card.is-side .measure-act-primary { min-height: 44px; }
.measure-act-card.is-side .measure-act-list { margin-top: 0.75rem; }
.measure-act-card.is-side .measure-act-row { padding: 0.55rem 0; gap: 0.625rem; }
.measure-act-card.is-side .measure-act-list li:last-child .measure-act-row { padding-bottom: 0.25rem; }
.measure-act-card.is-side .measure-act-icon { width: 32px; height: 32px; border-radius: 9px; }

/* ------------------------------------------- Următoarele reforme page

   Same four sizes as the measure page: title 22, lead 17, body 15, label 12.
   The vote is a yellow "Susțin" button, like Susțin on a measure, so it reads
   as something to press; once pressed it turns green. */

.backlog-page-header .page-title { font-size: 1.375rem; }
.backlog-page-header .page-description { font-size: 0.9375rem; }
/* The position in the list: a small circle at the top, level with the
   category badge, rather than a number floating in the card's middle. */
.backlog-rank {
  align-self: start;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1;
}

/* The number sits close to the card's left edge, and the text close to it. */
.backlog-item {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  padding-left: 1rem;
}
.backlog-rank { justify-self: start; }
@media (max-width: 700px) {
  .backlog-item { grid-template-columns: 26px minmax(0, 1fr); }
}
.backlog-title { font-size: 1.0625rem; }
.backlog-note { font-size: 0.9375rem; }
.backlog-votes { font-size: 0.75rem; }

/* The vote count sits in the card's top-right corner, on the category row;
   the Susțin button stays at the bottom right. */
.backlog-item { position: relative; }
.backlog-item .backlog-votes {
  position: absolute;
  top: 1.15rem;
  right: 1.35rem;
  display: flex;
  align-items: center;
  height: 1.5rem;
}
@media (max-width: 700px) {
  .backlog-actions { justify-content: flex-end; }
}
.backlog-list .pulse-category { font-size: 0.75rem; }

.backlog-vote-btn {
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.125rem;
  border: 0;
  border-radius: 12px;
  background: #facc15;
  color: #111;
  font-size: 0.9375rem;
  font-weight: 700;
  box-shadow: 0 8px 18px -10px rgba(234, 179, 8, 0.9);
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.backlog-vote-btn i { font-size: 0.875rem; }
.backlog-vote-btn:hover {
  background: #eab308;
  border-color: transparent;
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(234, 179, 8, 1);
}
.backlog-vote-btn:active { transform: translateY(0); }
.backlog-vote-btn:focus-visible { outline: 3px solid color-mix(in srgb, #facc15 55%, transparent); outline-offset: 2px; }
.backlog-vote-btn.voted {
  background: color-mix(in srgb, #10b981 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, #10b981 35%, var(--bg-card));
  color: #059669;
  box-shadow: none;
}
.backlog-vote-btn.voted:hover {
  background: color-mix(in srgb, #10b981 18%, var(--bg-card));
  color: #047857;
  transform: none;
}
