:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #1d2433;
  --muted: #677085;
  --line: #d9deea;
  --accent: #0f766e;
  --accent-soft: #e4f5f2;
  --accent-line: #99d7cc;
  --warn: #9a3412;
  --warn-soft: #fff3e8;
  --error: #b91c1c;
  --error-soft: #fdecec;
  --shadow: 0 1px 2px rgb(17 24 39 / 8%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

main {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 720;
}

h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

h3 {
  margin: 14px 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 640px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: #eef1f6;
  padding: 1px 4px;
  border-radius: 4px;
}

.banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
}

.banner.error {
  border-color: #f3b4b4;
  background: var(--error-soft);
  color: var(--error);
}

.banner.warn {
  border-color: #f0cba8;
  background: var(--warn-soft);
  color: var(--warn);
}

.deploy-status {
  max-width: none;
  margin-top: 16px;
  padding: 14px 16px;
  border: 2px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
}

.deploy-status[hidden] {
  display: none;
}

.deploy-status.pending {
  border-color: #5eead4;
  background: #ecfdf9;
  color: #0f766e;
}

.deploy-status.success {
  border-color: #86d7a2;
  background: #ecfdf3;
  color: #166534;
}

.deploy-status.warning {
  border-color: #f0cba8;
  background: var(--warn-soft);
  color: var(--warn);
}

.deploy-status.error {
  border-color: #f3b4b4;
  background: var(--error-soft);
  color: var(--error);
}

.deploy-dots {
  display: inline-block;
  width: 1.5em;
  font-variant-numeric: tabular-nums;
}

.deploy-status-detail {
  display: block;
  margin-top: 4px;
  color: currentcolor;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.88;
}

.stepper {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.stepper li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
}

.stepper li.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.stepper li.done {
  color: var(--accent);
}

.step {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 14px;
}

.extension-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  min-width: 0;
  height: auto;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 450;
  cursor: pointer;
}

.card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.card span {
  color: var(--muted);
  line-height: 1.45;
}

.card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.card[hidden] {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px 16px;
}

.form-grid label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.form-grid label > span em {
  font-style: normal;
  font-weight: 450;
}

.form-grid label > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font: inherit;
}

.duration {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}

.allocation-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.allocation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.allocation-heading h3 {
  margin: 0 0 4px;
  color: var(--text);
}

.allocation-heading p {
  max-width: 720px;
  font-size: 12.5px;
  line-height: 1.45;
}

.allocation-heading button {
  flex: 0 0 auto;
}

.allocation-columns,
.allocation-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) 110px minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
}

.allocation-columns {
  padding: 0 2px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.allocation-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.allocation-row select,
.allocation-row input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font: inherit;
}

.allocation-share {
  position: relative;
}

.allocation-share input {
  padding-right: 28px;
  font-variant-numeric: tabular-nums;
}

.allocation-share span {
  position: absolute;
  top: 9px;
  right: 10px;
  color: var(--muted);
}

.allocation-value {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.allocation-value strong,
.allocation-value span {
  display: block;
}

.allocation-value span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.remove-allocation {
  min-width: 72px;
  color: var(--error);
}

.allocation-total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.allocation-total-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}

.allocation-total-copy strong {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.allocation-meter {
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e6e9f0;
}

.allocation-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--warn);
  transition: width 120ms ease;
}

.allocation-total.valid .allocation-meter i {
  background: var(--accent);
}

.allocation-total p {
  max-width: none;
  color: var(--warn);
  font-size: 12px;
}

.allocation-total.valid p,
.allocation-total.valid .allocation-total-copy strong {
  color: var(--accent);
}

.allocation-review {
  margin-bottom: 12px;
}

button,
.button-link {
  min-width: 92px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 550;
}

.launch-next-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.launch-next-actions[hidden] {
  display: none;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

table.kv {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

table.kv th {
  width: 240px;
  padding: 7px 10px 7px 0;
  text-align: left;
  vertical-align: top;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.kv td {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.raw {
  margin-top: 12px;
}

.raw summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.raw pre {
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  font-size: 12px;
}

.manage-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: start;
}

.actions {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.actions h3 {
  margin-top: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.action-row input,
.action-row select {
  flex: 1 1 120px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.action-row button {
  flex: 0 0 auto;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: none;
}

table.holders {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.holders th,
table.holders td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.holders th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.holders th.num,
table.holders td.num {
  text-align: right;
}

.holder-category {
  display: block;
  margin-top: 3px;
}

.holder-issue-error {
  color: var(--error);
  font-size: 12px;
}

.soft {
  color: var(--muted);
  font-weight: 450;
  font-size: 12.5px;
}

.computed {
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  max-width: none;
}

table.fns {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

table.fns th,
table.fns td {
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

table.fns th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.fns td.result {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.fns button:disabled {
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 550;
  border-color: var(--line);
  background: #f0f2f7;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

.previous {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.footnote {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  max-width: 900px;
}

@media (max-width: 900px) {
  .manage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  main {
    padding: 18px 14px 40px;
  }

  .topbar,
  .allocation-heading {
    display: block;
  }

  .allocation-heading button {
    width: 100%;
    margin-top: 12px;
  }

  .allocation-columns {
    display: none;
  }

  .allocation-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .allocation-row select,
  .allocation-value {
    grid-column: 1 / -1;
  }

  .allocation-row .remove-allocation {
    grid-column: 2;
    grid-row: 2;
  }

  .step {
    padding: 14px;
  }

  table.holders,
  table.fns,
  table.kv {
    display: block;
    overflow-x: auto;
  }
}
