/* Part V flow */
.partv-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
}

.partv-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-bottom: none;
}

.partv-row:first-child {
  border-radius: 8px 8px 0 0;
}

.partv-row:last-child {
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0 0 8px 8px;
}

.partv-row.highlight {
  background: #fffbeb;
  border-color: #f59e0b;
  border-bottom: none;
}

.partv-row.highlight.danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.partv-row.highlight+.partv-row {
  border-top: 1px solid #f59e0b;
}

.partv-row.highlight.danger+.partv-row {
  border-top: 1px solid #fca5a5;
}

.partv-row.highlight:last-child {
  border-bottom: 1px solid #f59e0b;
}

.partv-row.highlight.danger:last-child {
  border-bottom: 1px solid #fca5a5;
}

.partv-line {
  min-width: 80px;
  padding: 12px 10px;
  background: #0f2442;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.3;
}

.partv-row.highlight .partv-line {
  background: #c8a84b;
  color: #1a1100;
}

.partv-row.highlight.danger .partv-line {
  background: #dc2626;
  color: #fff;
}

.partv-body {
  padding: 12px 16px;
  flex: 1;
}

.partv-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.partv-desc {
  font-size: 0.80rem;
  color: #6b7280;
  line-height: 1.5;
}

.partv-currency {
  min-width: 64px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Math box */
.math-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0f2442;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

.math-box .line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px dashed #e2e8f0;
  gap: 1rem;
}

.math-box .line:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding-top: 10px;
}

.math-box .label {
  color: #374151;
}

.math-box .val {
  font-weight: 700;
  font-family: monospace;
  white-space: nowrap;
}

.math-box .val.green {
  color: #16a34a;
}

.math-box .val.red {
  color: #dc2626;
}

.math-box .val.blue {
  color: #2563eb;
}

.math-box .val.gold {
  color: #b45309;
}

.math-box .section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  padding: 10px 0 2px;
  border-bottom: none;
}

/* Gap explanation visual */
.gap-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.gap-card {
  border-radius: 10px;
  padding: 1.25rem;
}

.gap-card.wrong {
  background: #fef2f2;
  border: 2px solid #fca5a5;
}

.gap-card.right {
  background: #f0fdf4;
  border: 2px solid #86efac;
}

.gap-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.gap-card.wrong .gap-card__label {
  color: #b91c1c;
}

.gap-card.right .gap-card__label {
  color: #15803d;
}

.gap-card__title {
  font-weight: 800;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.gap-card__body {
  font-size: 0.83rem;
  line-height: 1.7;
}

/* Currency chain */
.currency-chain {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.25rem 0;
}

.cc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.cc-row:last-child {
  margin-bottom: 0;
}

/* Pill / Tag styles */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
  white-space: nowrap;
}

.pill--navy {
  background: #0f2442;
  color: #fff;
}

.pill--gold {
  background: #c8a84b;
  color: #1a1100;
}

.pill--danger {
  background: #dc2626;
  color: #fff;
}

.pill--success {
  background: #16a34a;
  color: #fff;
}

.cc-tag {
  background: #0f2442;
  color: #fff;
  font-weight: 800;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

.cc-tag.gold {
  background: #c8a84b;
  color: #1a1100;
}

.cc-tag.red {
  background: #dc2626;
}

.cc-tag.green {
  background: #16a34a;
}

.cc-cur {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 44px;
}

.cc-cur.foreign {
  color: #2563eb;
}

.cc-cur.usd {
  color: #16a34a;
}

.cc-arrow {
  font-size: 1rem;
  color: #9ca3af;
  margin: 2px 0;
  padding-left: 78px;
}

/* Election routing table custom */
.bypass-yes {
  color: #b91c1c;
  font-weight: 700;
}

.bypass-no {
  color: #15803d;
  font-weight: 700;
}

/* User case box */
.user-case {
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  border-left: 5px solid #0284c7;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.user-case__meta {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #0369a1;
  margin-bottom: 6px;
}

.user-case__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.user-case__body {
  font-size: 0.85rem;
  line-height: 1.75;
  color: #374151;
}

@media (max-width: 620px) {
  .gap-visual {
    grid-template-columns: 1fr;
  }
}
