:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070a0f;
  color: #eef2f8;
  --panel: #10151e;
  --line: #222a37;
  --muted: #8d99aa;
  --green: #3ee58b;
  --red: #ff5d73;
  --purple: #9674ff;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% -20%, #35216c 0, transparent 34%), #070a0f;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.busy button {
  pointer-events: none;
  opacity: 0.55;
}

.topbar {
  height: 68px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  gap: 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.86);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  color: white;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  border-radius: 10px;
  color: #090b10;
  background: var(--green);
}
nav {
  display: flex;
  gap: 8px;
  flex: 1;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 14px;
}
nav a:hover,
nav a.active {
  color: white;
  background: #171d28;
}
.network {
  font-size: 12px;
  color: #aab4c2;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.network i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.shell,
.vote-shell {
  width: min(1220px, 92vw);
  margin: 0 auto;
  padding: 55px 0 90px;
}
.vote-shell {
  width: min(920px, 92vw);
}
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.hero h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.045em;
}
.hero p,
.hint {
  color: var(--muted);
  line-height: 1.55;
}
.hero p {
  max-width: 410px;
  margin: 0;
  text-align: right;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.14em;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  gap: 20px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 20px;
}
.panel {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(19, 25, 35, 0.97), rgba(11, 15, 22, 0.97));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}
.panel h1,
.panel h2 {
  margin-top: 0;
  letter-spacing: -0.025em;
}
.panel h2 {
  font-size: 18px;
  margin-bottom: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.panel-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #241d3b;
  color: #bba7ff;
  font-size: 11px;
  font-weight: 800;
}
.pill {
  border: 1px solid #315d48;
  color: var(--green);
  background: #10271c;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.pill.muted {
  color: #aab4c2;
  border-color: var(--line);
  background: #151a23;
}
.pill[data-status="closed"],
.pill[data-status="proposed"] {
  color: #ffc75c;
  border-color: #5f4d27;
  background: #271f10;
}
.pill[data-status="finalized"] {
  color: #d4c9ff;
  border-color: #51427e;
  background: #211938;
}

.form-grid,
.resolution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.wide {
  grid-column: 1 / -1;
}
label {
  display: grid;
  gap: 8px;
  color: #bec7d4;
  font-size: 12px;
  font-weight: 650;
}
input,
select {
  width: 100%;
  color: white;
  background: #090d13;
  border: 1px solid #293241;
  border-radius: 9px;
  padding: 12px 13px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(150, 116, 255, 0.12);
}
button,
.link-button {
  border: 1px solid #303947;
  color: #e9edf4;
  background: #191f29;
  border-radius: 9px;
  padding: 11px 14px;
  font-weight: 700;
  transition: 0.15s ease;
}
button:hover,
.link-button:hover {
  border-color: #536072;
  transform: translateY(-1px);
}
.primary {
  color: #0a0c10;
  border-color: var(--green);
  background: var(--green);
}
.primary:hover {
  border-color: #8dffc0;
  background: #65efa0;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.proposal {
  margin-top: 16px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #090d13;
  font-size: 12px;
}
.proposal b {
  color: #ffc75c;
}
.market-card h2 {
  margin: 10px 0 20px;
  font-size: 24px;
  line-height: 1.25;
}
.pool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.pool div {
  padding: 15px;
  border-radius: 10px;
  background: #090d13;
}
.pool span,
.pool strong {
  display: block;
}
.pool span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}
.pool strong {
  font-size: 17px;
}
.link-button {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 14px;
}
code {
  display: block;
  color: #778498;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fee-list {
  display: grid;
  gap: 9px;
}
.fee-list > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-transform: capitalize;
}
.fee-list > div:last-child {
  border: 0;
}
.fee-list small {
  display: block;
  color: #687486;
  font-family: monospace;
  text-transform: none;
}
.fee-list button {
  padding: 7px 9px;
  font-size: 11px;
}
.audit ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}
.audit li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #aab4c2;
  font-size: 11px;
}
.audit li code {
  flex: none;
}
.audit .panel-head button {
  padding: 5px 8px;
  font-size: 10px;
}
.notice {
  position: fixed;
  top: 82px;
  right: 4vw;
  z-index: 20;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 10px;
  background: #163623;
  border: 1px solid #2a7b4b;
  box-shadow: 0 12px 40px #0008;
  font-size: 13px;
}
.notice.error {
  background: #3b151b;
  border-color: #9c3342;
}
.notice.hidden {
  display: none;
}

.workflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 16, 23, 0.78);
}
.workflow > div {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: #718096;
}
.workflow > div b,
.voter-steps b {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #1c2330;
  font-size: 11px;
}
.workflow > div span {
  font-size: 12px;
  font-weight: 750;
}
.workflow > div small {
  display: block;
  margin-top: 3px;
  color: #657184;
  font-size: 10px;
  font-weight: 500;
}
.workflow > div.active {
  color: white;
  background: #1d1930;
  box-shadow: inset 0 0 0 1px #4e3d7d;
}
.workflow > div.active b {
  color: #090b10;
  background: var(--green);
}
.workflow > div.complete {
  color: var(--green);
}
.workflow > div.complete b {
  color: #0a0c10;
  background: var(--green);
}
.workflow > i {
  color: #455064;
  font-style: normal;
}
.guidance {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border-left: 3px solid var(--green);
  border-radius: 7px;
  color: var(--muted);
  background: #0a1015;
  font-size: 12px;
  line-height: 1.45;
}
.guidance b {
  color: white;
  font-size: 13px;
}
.guidance span {
  display: block;
}
.voter-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.voter-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #aab4c2;
  background: rgba(16, 21, 30, 0.82);
  font-size: 11px;
}

.vote-card {
  padding: 30px;
}
.vote-card > h1 {
  max-width: 720px;
  margin: 20px 0 8px;
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.15;
}
.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.outcome {
  padding: 23px;
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  background: #0b1017;
}
.outcome span {
  font-size: 22px;
}
.outcome strong {
  font-size: 15px;
}
.outcome small {
  grid-column: 2;
  color: var(--muted);
}
.outcome.yes.selected {
  border-color: var(--green);
  background: #10271c;
  box-shadow: 0 0 0 3px rgba(62, 229, 139, 0.09);
}
.outcome.no.selected {
  border-color: var(--red);
  background: #2d1419;
  box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.08);
}
.amount > span {
  display: flex;
  align-items: center;
  background: #090d13;
  border: 1px solid #293241;
  border-radius: 10px;
}
.amount input {
  border: 0;
  font-size: 20px;
}
.amount b {
  padding-right: 14px;
  color: var(--muted);
}
.cost-row {
  display: flex;
  justify-content: space-between;
  margin: 12px 2px 18px;
  color: var(--muted);
  font-size: 12px;
}
.cost-row strong {
  color: white;
}
.big {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  margin-bottom: 14px;
}
.voter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.voter-grid .audit {
  grid-column: 1 / -1;
}
.balance {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.position {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.position span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}
.position b {
  display: block;
  margin-top: 4px;
  color: white;
  font-size: 13px;
}

.explorer-shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 55px 0 90px;
}
.explorer-hero {
  margin-bottom: 24px;
}
.explorer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.explorer-stats .panel {
  display: grid;
  gap: 7px;
  padding: 17px 19px;
}
.explorer-stats span,
.explorer-contracts span,
.tx-hash span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.explorer-stats strong {
  font-size: 20px;
}
.explorer-contracts {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 18px;
  padding: 17px 19px;
}
.explorer-contracts > div {
  min-width: 0;
}
.explorer-contracts code {
  margin-top: 7px;
  color: #bdc7d5;
}
.explorer-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 34px 2px 14px;
}
.explorer-heading h2,
.explorer-heading p {
  margin: 0;
}
.explorer-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.live-pulse {
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
}
.live-pulse i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.explorer-transactions {
  display: grid;
  gap: 11px;
}
.transaction {
  padding: 17px 19px;
  transition: border-color 0.2s ease;
}
.transaction.highlighted {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(150, 116, 255, 0.12);
}
.transaction-top,
.tx-hash,
.tx-meta,
.chain-events,
.chain-event {
  display: flex;
  align-items: center;
}
.transaction-top {
  justify-content: space-between;
  margin-bottom: 12px;
}
.tx-method {
  font-size: 16px;
  font-weight: 800;
}
.tx-status {
  padding: 4px 8px;
  border: 1px solid #315d48;
  border-radius: 999px;
  color: var(--green);
  background: #10271c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tx-status.reverted {
  color: var(--red);
  border-color: #74303a;
  background: #2d1419;
}
.tx-hash {
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #090d13;
}
.tx-hash code {
  color: #b8c3d2;
}
.tx-meta {
  display: grid;
  grid-template-columns: 0.55fr 1fr 1fr 0.55fr;
  gap: 12px;
  padding: 13px 2px;
  color: var(--muted);
  font-size: 10px;
}
.tx-meta b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #e3e8ef;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chain-events {
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.chain-event {
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid #293241;
  border-radius: 7px;
  background: #0b1017;
  font-size: 9px;
}
.chain-event b {
  color: #c8baff;
  font-size: 10px;
}
.chain-event span {
  color: var(--muted);
}
.chain-event code {
  display: inline;
  color: #b8c3d2;
}
.chain-event.empty {
  color: #647185;
}
.audit a {
  text-decoration: none;
}
.audit a code:hover {
  color: var(--purple);
}

@media (max-width: 850px) {
  .topbar {
    padding: 0 18px;
    gap: 14px;
  }
  .brand {
    font-size: 0;
  }
  .brand-mark {
    margin: 0;
    font-size: 14px;
  }
  .network {
    display: none;
  }
  nav {
    justify-content: flex-end;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .hero {
    align-items: start;
    flex-direction: column;
  }
  .hero p {
    text-align: left;
  }
  .workflow {
    grid-template-columns: 1fr 1fr;
  }
  .workflow > i {
    display: none;
  }
  .voter-steps {
    grid-template-columns: 1fr 1fr;
  }
  .explorer-stats,
  .explorer-contracts {
    grid-template-columns: 1fr;
  }
  .tx-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  nav a {
    padding: 8px;
    font-size: 11px;
  }
  .shell,
  .vote-shell {
    width: min(94vw, 920px);
    padding-top: 30px;
  }
  .form-grid,
  .resolution-grid,
  .voter-grid {
    grid-template-columns: 1fr;
  }
  .wide,
  .voter-grid .audit {
    grid-column: auto;
  }
  .outcome-grid {
    gap: 8px;
  }
  .outcome {
    padding: 16px;
  }
}
