:root {
  --bg: #050810;
  --panel: #0d1428;
  --panel-2: #111827;
  --border: rgba(120, 141, 255, .2);
  --border-bright: rgba(0, 240, 255, .34);
  --text: #e4e8ff;
  --muted: #8899ac;
  --dim: #556070;
  --cyan: #00f0ff;
  --gold: #ffd869;
  --green: #39ff14;
  --pink: #ff2d95;
  --purple: #b026ff;
  --shadow-card: 0 4px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; min-width: 0; }
html, body {
  min-height: 100%;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: anywhere;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }

.proposal-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 34px 20px 80px;
  width: 100%;
}
.proposal-hero {
  border-bottom: 1px solid var(--border);
  background: #0a0f1e;
  padding: 42px 20px 32px;
  width: 100%;
}
.proposal-hero-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
.proposal-eyebrow {
  color: var(--gold);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.proposal-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}
.proposal-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}
.proposal-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pill-link,
.proposal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(0, 240, 255, .28);
  border-radius: 8px;
  background: rgba(0, 240, 255, .08);
  color: var(--text);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pill-link.secondary,
.proposal-btn.secondary {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}
.proposal-btn.danger { border-color: rgba(255, 45, 149, .4); color: #ffd7eb; }
.proposal-btn:disabled { opacity: .55; cursor: not-allowed; }

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
@media (max-width: 980px) {
  .span-8, .span-6, .span-4, .span-3 { grid-column: span 12; }
}

.proposal-panel,
.proposal-card,
.profile-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  min-width: 0;
}
.proposal-panel.alt { background: var(--panel-2); }
.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.panel-title {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}
.panel-kicker {
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }

.step-list {
  display: grid;
  gap: 12px;
}
.flow-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(120, 141, 255, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}
.flow-step.active {
  border-color: rgba(0, 240, 255, .5);
  background: rgba(0, 240, 255, .07);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .12);
}
@media (max-width: 520px) {
  .proposal-shell { padding: 24px 14px 64px; }
  .proposal-hero { padding: 34px 14px 26px; }
  .flow-step {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .proposal-panel,
  .proposal-card,
  .profile-card {
    padding: 14px;
  }
}
.step-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  color: #050810;
  font-size: .92rem;
  font-weight: 1000;
  line-height: 1;
}
@media (max-width: 520px) {
  .step-num {
    width: 34px;
    height: 34px;
  }
}
.flow-step h2,
.flow-step h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
}
.flow-step p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}
.flow-step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.submit-activation {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(0, 240, 255, .28);
  border-radius: 8px;
  background: rgba(0, 240, 255, .06);
  color: var(--text);
}
.submit-activation[hidden] { display: none; }
.submit-activation strong { color: #fff; }
.submit-activation p {
  margin: 0;
  font-size: .82rem;
}

.profile-form {
  display: grid;
  gap: 12px;
}
.form-row {
  display: grid;
  gap: 6px;
}
.form-row label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid rgba(120, 141, 255, .22);
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  padding: 11px 12px;
}
.form-row textarea { min-height: 86px; resize: vertical; }
.status-line {
  min-height: 20px;
  color: var(--muted);
  font-size: .84rem;
}
.status-line.success { color: var(--green); }
.status-line.error { color: var(--pink); }

.profile-card {
  display: grid;
  gap: 12px;
}
.profile-name {
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  line-height: 1.05;
  font-weight: 1000;
  color: #fff;
}
.return-stake-key {
  padding: 10px 12px;
  border: 1px solid rgba(120, 141, 255, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.profile-meta,
.card-meta,
.proposal-card-footer,
.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.meta-chip,
.stage-chip,
.count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.stage-chip.draft,
.stage-chip.discussion { color: var(--gold); border-color: rgba(255, 216, 105, .32); }
.stage-chip.anchor,
.stage-chip.poll,
.stage-chip.sentiment { color: var(--purple); border-color: rgba(176, 38, 255, .28); }
.stage-chip.voting,
.stage-chip.submit-ready { color: var(--cyan); border-color: rgba(0, 240, 255, .3); }
.stage-chip.enacted,
.stage-chip.ratified { color: var(--green); border-color: rgba(57, 255, 20, .28); }
.stage-chip.expired,
.stage-chip.failed { color: var(--pink); border-color: rgba(255, 45, 149, .28); }

.proposal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) { .proposal-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .proposal-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.profile-scroll-area {
  max-height: min(62vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  min-width: 0;
}
.profile-scroll-area::-webkit-scrollbar,
.spo-pool-list::-webkit-scrollbar { width: 7px; }
.profile-scroll-area::-webkit-scrollbar-thumb,
.spo-pool-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}
.profile-scroll-area .proposal-card-grid,
.profile-scroll-area .drep-vote-card-grid,
.profile-scroll-area .spo-pool-list { padding-bottom: 2px; }
.proposal-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(0,240,255,0.09), transparent 36%),
    linear-gradient(145deg, rgba(13,20,40,0.98), rgba(5,8,16,0.96));
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.proposal-card:hover,
.proposal-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  outline: none;
}
.proposal-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}
.proposal-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}
.proposal-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.proposal-card-actions .proposal-btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: .7rem;
  flex: 1 1 92px;
}
.rating-select {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  padding: 6px 8px;
  font-size: .76rem;
  max-width: 100%;
  min-width: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-width: 0;
}
.tab-btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  flex: 1 1 118px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tab-btn.active {
  color: #fff;
  border-color: var(--border-bright);
  background: rgba(0, 240, 255, .09);
}

.empty-state {
  padding: 24px;
  border: 1px dashed rgba(120, 141, 255, .24);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.table-wrap { overflow-x: auto; }
.drep-template-shell {
  display: grid;
  gap: 18px;
}
.drep-template-shell .profile-card,
.drep-template-shell .proposal-panel {
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.drep-profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  gap: 18px;
  align-items: start;
}
.drep-profile-left-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.drep-profile-summary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.drep-profile-about {
  min-width: 0;
}
.drep-profile-summary .drep-profile-link-row {
  grid-column: 2;
}
.drep-profile-sidebar {
  display: grid;
  gap: 14px;
}
.drep-profile-statements {
  min-width: 0;
}
.drep-template-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: stretch;
}
.drep-template-hero,
.drep-template-facts {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}
.drep-template-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.drep-template-pfp {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cyan);
  background: #0a1020;
}
.drep-template-name {
  margin: 4px 0 10px;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.drep-profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.drep-template-facts {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 16px;
}
.drep-fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(120, 141, 255, .12);
}
.drep-fact-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.drep-fact-row .fact-label,
.drep-fact-row .fact-value {
  grid-column: 1;
}
.fact-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.fact-value {
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.copy-mini {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 240, 255, .28);
  border-radius: 8px;
  background: rgba(0, 240, 255, .07);
  color: var(--cyan);
  font-size: .7rem;
  font-weight: 900;
  cursor: pointer;
}
.drep-template-shell .drep-field-card {
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.drep-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.drep-statement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.drep-field-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100%;
}
.drep-field-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  display: flex;
  gap: 8px;
  align-items: center;
}
.drep-field-card h3 i { color: var(--gold); }
.drep-field-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}
.drep-reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.drep-reference-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.drep-reference-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(0, 240, 255, .07);
  color: var(--cyan);
  font-size: 1rem;
}
.drep-reference-icon:hover,
.drep-reference-icon:focus-visible {
  border-color: var(--border-bright);
  color: #fff;
  text-decoration: none;
  outline: none;
}
@media (max-width: 980px) {
  .drep-profile-overview,
  .drep-profile-left-stack,
  .drep-profile-summary,
  .drep-template-head,
  .drep-template-hero,
  .drep-field-grid,
  .drep-statement-grid {
    grid-template-columns: 1fr;
  }
  .drep-template-pfp {
    width: 96px;
    height: 96px;
  }
  .drep-profile-summary .drep-profile-link-row {
    grid-column: auto;
  }
}
.drep-profile-main {
  display: grid;
  gap: 18px;
}
.drep-vote-panel [data-drep-history-cards] {
  max-height: min(62vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}
.drep-vote-panel [data-drep-history-cards]::-webkit-scrollbar { width: 7px; }
.drep-vote-panel [data-drep-history-cards]::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}
.drep-vote-panel .table-wrap {
  max-height: min(58vh, 560px);
  overflow: auto;
  border: 1px solid rgba(120, 141, 255, .12);
  border-radius: 8px;
}
.spo-pool-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}
.spo-pool-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at 10% 10%, rgba(0,240,255,0.09), transparent 38%),
    linear-gradient(145deg, rgba(13,20,40,0.96), rgba(5,8,16,0.96));
}
.spo-pool-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.spo-pool-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.spo-pool-title h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.spo-pool-id {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.spo-pool-card .proposal-card-actions {
  justify-content: flex-end;
}
.spo-pool-card .proposal-card-actions .proposal-btn,
.spo-pool-card .proposal-card-actions .pill-link {
  flex: 0 1 auto;
}
.spo-pool-card .drep-template-facts {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 141, 255, .12);
  background: rgba(255,255,255,0.025);
}
.spo-pool-card .drep-fact-row {
  grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr) auto;
  align-items: center;
}
.spo-pool-card .drep-fact-row .fact-label {
  grid-column: 1;
}
.spo-pool-card .drep-fact-row .fact-value {
  grid-column: 2;
}
.spo-pool-card .copy-mini {
  grid-column: 3;
  grid-row: 1;
}
.drep-history-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.drep-vote-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  gap: 8px;
}
.drep-vote-totals div {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 141, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.drep-vote-totals strong {
  color: #fff;
  font-size: 1rem;
}
.drep-vote-totals span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}
.drep-vote-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.drep-vote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(13,20,40,0.96), rgba(5,8,16,0.96)),
    rgba(255,255,255,0.025);
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.drep-vote-card:hover,
.drep-vote-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  outline: none;
}
.drep-vote-art {
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background:
    radial-gradient(circle at 15% 20%, rgba(0,240,255,0.18), transparent 42%),
    radial-gradient(circle at 86% 16%, rgba(255,216,105,0.14), transparent 44%),
    linear-gradient(135deg, rgba(0,240,255,0.08), rgba(255,45,149,0.05));
}
.drep-vote-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(0,240,255,0.09);
  border: 1px solid rgba(0,240,255,0.2);
  flex-shrink: 0;
}
.drep-vote-metric {
  display: grid;
  gap: 2px;
  text-align: right;
  min-width: 0;
}
.drep-vote-metric strong {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .95rem;
  color: #fff;
  line-height: 1.1;
}
.drep-vote-metric span {
  color: var(--dim);
  font-size: .62rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.drep-vote-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  min-width: 0;
}
.drep-vote-head {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.drep-vote-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  color: var(--text);
  overflow-wrap: anywhere;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.drep-vote-summary {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.drep-vote-meta,
.drep-vote-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.drep-vote-footer {
  margin-top: auto;
}
.hash-pill,
.meta-pill,
.status-chip,
.vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
  white-space: normal;
}
.hash-pill,
.meta-pill {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255,216,105,0.07);
  border: 1px solid rgba(255,216,105,0.18);
  padding: 5px 9px;
}
.status-chip,
.vote-chip {
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  background: rgba(255,255,255,0.045);
}
.status-chip.passed,
.status-chip.enacted,
.status-chip.ratified,
.status-chip.yes,
.vote-chip.yes {
  color: var(--green);
  border-color: rgba(57,255,20,0.22);
  background: rgba(57,255,20,0.07);
}
.status-chip.failed,
.status-chip.no,
.vote-chip.no {
  color: var(--pink);
  border-color: rgba(255,45,149,0.22);
  background: rgba(255,45,149,0.07);
}
.status-chip.expired,
.vote-chip.abs {
  color: var(--gold);
  border-color: rgba(255,216,105,0.2);
  background: rgba(255,216,105,0.07);
}
.status-chip.active {
  color: var(--cyan);
  border-color: rgba(0,240,255,0.22);
  background: rgba(0,240,255,0.07);
}
.proposal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(0,240,255,0.22);
  border-radius: 8px;
  background: rgba(0,240,255,0.07);
  color: var(--text);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.proposal-action.secondary {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}
@media (min-width: 1180px) {
  .drep-vote-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .drep-history-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .profile-scroll-area,
  .drep-vote-panel [data-drep-history-cards],
  .spo-pool-list {
    max-height: min(58vh, 520px);
    padding-right: 4px;
  }
  .spo-pool-head {
    grid-template-columns: 1fr;
  }
  .spo-pool-card .proposal-card-actions {
    justify-content: stretch;
  }
  .spo-pool-card .proposal-card-actions .proposal-btn,
  .spo-pool-card .proposal-card-actions .pill-link {
    flex: 1 1 130px;
  }
  .spo-pool-card .drep-fact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .spo-pool-card .drep-fact-row .fact-label,
  .spo-pool-card .drep-fact-row .fact-value {
    grid-column: 1;
  }
  .spo-pool-card .copy-mini {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .drep-history-controls {
    grid-template-columns: 1fr;
  }
  .drep-vote-panel .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .drep-vote-totals {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .drep-vote-totals div {
    min-height: 44px;
    padding: 6px 5px;
  }
  .drep-vote-totals strong {
    font-size: .82rem;
    line-height: 1.05;
  }
  .drep-vote-totals span {
    font-size: .53rem;
    letter-spacing: .5px;
    overflow-wrap: anywhere;
  }
  .drep-vote-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .proposal-card,
  .drep-vote-card {
    border-radius: 12px;
  }
  .proposal-card {
    padding: 11px;
    gap: 9px;
  }
  .proposal-card h3 {
    font-size: .82rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .proposal-card p {
    display: none;
  }
  .proposal-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }
  .proposal-card-actions .pill-link,
  .proposal-card-actions .proposal-btn,
  .proposal-card-actions .rating-select {
    width: 100%;
  }
  .proposal-card-actions .action-submit,
  .proposal-card-actions .action-primary,
  .proposal-card-actions .action-profile,
  .proposal-card-actions .action-review,
  .proposal-card-actions .action-rate {
    grid-column: 1 / -1;
  }
  .proposal-card-actions .proposal-btn {
    min-height: 30px;
    padding: 6px 7px;
    font-size: .58rem;
  }
  .proposal-card-actions .pill-link,
  .proposal-card-actions .rating-select {
    min-height: 30px;
    padding: 6px 7px;
    font-size: .58rem;
  }
  .proposal-card-actions .action-social {
    min-width: 0;
  }
  .drep-vote-card {
    min-height: 302px;
  }
  .drep-vote-art {
    min-height: 78px;
    padding: 10px;
    gap: 8px;
  }
  .drep-vote-emblem {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .drep-vote-metric strong {
    font-size: .82rem;
  }
  .drep-vote-metric span {
    font-size: .52rem;
    letter-spacing: .8px;
  }
  .drep-vote-body {
    padding: 11px;
    gap: 9px;
  }
  .drep-vote-head {
    gap: 7px;
  }
  .drep-vote-title {
    font-size: .82rem;
    line-height: 1.28;
    -webkit-line-clamp: 4;
  }
  .drep-vote-summary {
    display: none;
  }
  .drep-vote-meta,
  .drep-vote-footer {
    gap: 6px;
  }
  .hash-pill,
  .meta-pill,
  .status-chip,
  .vote-chip {
    font-size: .56rem;
    padding: 4px 6px;
    letter-spacing: .4px;
  }
  .proposal-action {
    min-height: 30px;
    padding: 6px 7px;
    font-size: .58rem;
  }
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.history-table th,
.history-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(120, 141, 255, .12);
  text-align: left;
  vertical-align: top;
}
.history-table th {
  color: var(--cyan);
  font-size: .72rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
.history-table td {
  color: var(--text);
  font-size: .84rem;
}

.drep-chat-widget {
  display: grid;
  gap: 12px;
}
.drep-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.drep-chat-online {
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}
.drep-chat-messages {
  height: clamp(260px, 34vh, 380px);
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
}
.drep-chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}
.drep-chat-avatar img,
.drep-chat-avatar span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #050810;
  font-weight: 900;
}
.drep-chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .78rem;
}
.drep-chat-meta strong { color: #fff; }
.drep-chat-text {
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.drep-chat-gate,
.drep-chat-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}
.drep-chat-gate {
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
}
.drep-chat-input-wrap { display: none; }
.drep-chat-input-wrap.active { display: flex; }
.drep-chat-input-wrap textarea {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: 150px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .25);
  color: #fff;
  padding: 10px 12px;
  min-width: 0;
}
.drep-chat-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #031018;
  font-weight: 900;
  cursor: pointer;
}
.drep-chat-button:disabled {
  opacity: .6;
  cursor: wait;
}
.drep-chat-system {
  color: var(--gold);
  font-size: .86rem;
  text-align: center;
}
@media (max-width: 620px) {
  .drep-chat-head,
  .drep-chat-gate,
  .drep-chat-input-wrap.active {
    align-items: stretch;
  }
  .drep-chat-input-wrap.active {
    flex-direction: column;
  }
  .drep-chat-button {
    width: 100%;
  }
}

.roe-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.roe-stat {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(120, 141, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  padding: 14px;
}
.roe-stat.wide { grid-column: span 1; }
.roe-stat span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.roe-stat strong {
  color: #fff;
  font-size: 1.2rem;
}
.roe-room-grid {
  display: grid;
  gap: 16px;
}
.roe-room-card {
  padding: 18px;
}
.roe-room-card.archived {
  opacity: .82;
}
.roe-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.roe-list,
.roe-action-list {
  display: grid;
  gap: 10px;
}
.roe-application,
.roe-selected-expert,
.roe-action,
.roe-inline-form {
  border: 1px solid rgba(120, 141, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  padding: 12px;
}
.roe-application {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.roe-application p,
.roe-action p {
  margin: 6px 0 0;
}
.roe-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto auto;
  gap: 10px;
  align-items: end;
}
.roe-inline-form textarea,
.roe-inline-form input,
.roe-inline-form select {
  width: 100%;
  border: 1px solid rgba(120, 141, 255, .22);
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  padding: 10px 11px;
}
.roe-review-controls {
  display: grid;
  gap: 10px;
}
.roe-review-controls .roe-inline-form {
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) minmax(160px, 240px) auto;
}
.roe-action-details,
.roe-apply-details {
  border: 1px solid rgba(120, 141, 255, .12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .025);
}
.roe-action-details summary,
.roe-apply-details summary {
  cursor: pointer;
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.roe-apply-details .profile-form {
  margin-top: 12px;
}
.roe-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}
.roe-check input {
  margin-top: 3px;
}
.roe-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 16, .76);
  backdrop-filter: blur(12px);
}
.roe-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(0, 240, 255, .3);
  border-radius: 8px;
  background: rgba(13, 20, 40, .98);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .58);
  padding: 18px;
}

@media (max-width: 980px) {
  .roe-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roe-columns { grid-template-columns: 1fr; }
  .roe-inline-form,
  .roe-review-controls .roe-inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .roe-stat-grid { grid-template-columns: 1fr; }
  .roe-application { grid-template-columns: 1fr; }
  .roe-modal { padding: 14px; }
}
