:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #101418;
  --muted: #687280;
  --faint: #9aa4b2;
  --line: #e7ebf0;
  --line-strong: #d5dbe4;
  --yellow: #f0b90b;
  --yellow-soft: #fff6d5;
  --yellow-pale: #fffbeb;
  --green: #16a36a;
  --red: #df5d52;
  --blue: #3868d8;
  --shadow: 0 22px 70px rgba(30, 41, 59, .09);
  --shadow-soft: 0 10px 26px rgba(30, 41, 59, .06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0, rgba(240, 185, 11, .16), transparent 280px),
    linear-gradient(180deg, #fffdf5 0, var(--bg) 420px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 13px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: 780;
}

button:hover:not(:disabled) {
  border-color: #c6ceda;
  background: #fafbfc;
}

button:disabled {
  cursor: not-allowed;
  opacity: .44;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

input {
  height: 39px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

input[type="file"] {
  height: auto;
  padding: 8px;
  color: var(--muted);
  background: var(--paper);
}

input::placeholder,
textarea::placeholder {
  color: #a2acba;
}

input:focus,
textarea:focus,
button:focus-visible {
  border-color: rgba(240, 185, 11, .9);
  outline: 3px solid rgba(240, 185, 11, .16);
  outline-offset: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(231, 235, 240, .76);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 900;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--yellow);
  box-shadow: 0 8px 18px rgba(240, 185, 11, .28);
  transform: rotate(45deg);
}

.header-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.social-button:hover {
  border-color: #c6ceda;
  background: #fafbfc;
}

.social-button span:first-child {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 4px;
  background: #101418;
  color: #fff;
  font-size: 11px;
}

.network-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(240, 185, 11, .42);
  border-radius: 7px;
  padding: 0 9px;
  background: var(--yellow-pale);
  color: #7a5b00;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.primary-button {
  border-color: #e0ad09;
  background: var(--yellow);
  color: #171205;
}

.primary-button:hover:not(:disabled) {
  border-color: #d9a707;
  background: #ffd45b;
}

.danger-button {
  border-color: rgba(223, 93, 82, .36);
  color: #a83329;
  background: #fff5f3;
}

.danger-button:hover:not(:disabled) {
  background: #ffebe8;
}

.icon-button {
  width: 38px;
  padding: 0;
  color: var(--muted);
}

main {
  display: grid;
  gap: 18px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(460px, 1.2fr);
  gap: 24px;
  align-items: end;
  padding: 22px 0 10px;
}

.stage-copy {
  display: grid;
  gap: 9px;
}

.eyebrow {
  color: #a57400;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}

.stage h1 {
  max-width: 520px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: .96;
  letter-spacing: 0;
}

.stage p {
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.stage-ledger {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-soft);
}

.ledger-item {
  display: grid;
  gap: 8px;
  min-height: 94px;
  align-content: center;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.ledger-item:last-child {
  border-right: 0;
}

.ledger-item span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 860;
}

.ledger-item strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.funding-strip {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  padding: 14px 16px;
  border: 1px solid rgba(240, 185, 11, .36);
  border-radius: var(--radius);
  background: rgba(255, 246, 213, .68);
}

.funding-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8a6400;
  font-size: 12px;
  font-weight: 850;
}

.funding-copy strong {
  color: var(--ink);
}

.funding-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.funding-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
  transition: width .25s ease;
}

.funding-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.ca-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(213, 219, 228, .9);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.ca-strip span {
  color: #7a5b00;
  font-size: 12px;
  font-weight: 900;
}

.ca-strip strong {
  min-width: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.timeline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding-top: 14px;
}

.timeline-step {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 10px 0 0;
  border-top: 2px solid var(--line-strong);
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
}

.timeline-step.active,
.timeline-step.done {
  border-top-color: var(--yellow);
}

.timeline-step.active::before,
.timeline-step.done::before {
  border-color: var(--yellow);
  background: var(--yellow);
}

.timeline-step b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-step small {
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .74);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-width: 94px;
  border-color: transparent;
  background: transparent;
}

.tab.active {
  border-color: rgba(240, 185, 11, .55);
  background: var(--yellow-soft);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.vote-shell,
.story-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.story-shell {
  grid-template-columns: 380px minmax(0, 1fr);
}

.workspace {
  display: grid;
  gap: 18px;
}

.board-panel,
.tool-panel,
.event-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.board-panel {
  background: rgba(255, 255, 255, .94);
}

.side-rail {
  display: grid;
  gap: 18px;
}

.compact-panel,
.event-panel {
  position: sticky;
  top: 82px;
}

.event-panel {
  position: static;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 16px;
  line-height: 1.18;
}

.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.pill {
  flex: 0 0 auto;
  border: 1px solid rgba(56, 104, 216, .2);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--blue);
  background: #f2f6ff;
  font-size: 11px;
  font-weight: 860;
  white-space: nowrap;
}

.pill.warning {
  border-color: rgba(240, 185, 11, .4);
  color: #8a6400;
  background: var(--yellow-soft);
}

.pill.success {
  border-color: rgba(22, 163, 106, .24);
  color: var(--green);
  background: #effbf6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.reward-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 235, .58);
}

.story-reward-strip {
  background: rgba(242, 246, 255, .62);
}

.reward-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-left: 2px solid rgba(240, 185, 11, .52);
  padding-left: 10px;
}

.reward-item span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.reward-item strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.1;
}

.reward-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  gap: 12px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.kol-list,
.story-list,
.event-log {
  display: grid;
}

.kol-list,
.story-list {
  padding: 6px;
}

.kol-card,
.story-card {
  display: grid;
  gap: 10px;
  border-radius: 7px;
  padding: 18px;
  background: transparent;
}

.kol-card + .kol-card,
.story-card + .story-card {
  border-top: 1px solid var(--line);
}

.kol-card.leader,
.story-card.leader {
  background: linear-gradient(90deg, var(--yellow-pale), rgba(255, 255, 255, 0));
}

.card-top,
.story-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.candidate-identity {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.kol-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--yellow-soft);
  color: #8a6400;
  font-size: 20px;
  font-weight: 900;
}

.kol-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title strong,
.story-top strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.18;
}

.card-title small,
.story-top small,
.meta-line,
.story-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.card-title small {
  display: block;
  margin-top: 5px;
}

.meta-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vote-box,
.story-score {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 118px;
}

.vote-box strong,
.story-score strong {
  color: #a87800;
  font-size: 30px;
  line-height: .92;
  font-variant-numeric: tabular-nums;
}

.event-log {
  gap: 0;
  padding: 8px 18px 16px;
}

.event {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.event:last-child {
  border-bottom: 0;
}

.event.good {
  color: #126c48;
}

.event.warn {
  color: #8a6400;
}

.event.bad {
  color: #a83329;
}

.launch-grid,
.vault-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  padding: 18px;
}

.launch-card,
.reveal-panel,
.flow-row,
.allocation-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.launch-card {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.launch-card span,
.flow-row span,
.allocation-row span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.launch-card strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.22;
}

.launch-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.reveal-panel {
  display: grid;
  gap: 12px;
  margin: 0 18px 18px;
  padding: 14px;
}

.reveal-panel.locked {
  background: #fbfcfe;
}

.reveal-panel.revealed {
  border-color: rgba(240, 185, 11, .44);
  background: var(--yellow-pale);
}

.reveal-panel span,
.reveal-grid span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.reveal-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.reveal-panel p,
.reveal-panel small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.reveal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reveal-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--yellow-soft);
  color: #8a6400;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.reveal-grid div {
  min-width: 0;
  border: 1px solid rgba(240, 185, 11, .28);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, .72);
}

.allocation {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.allocation-row {
  display: grid;
  grid-template-columns: 160px minmax(120px, 1fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.allocation-row strong {
  font-variant-numeric: tabular-nums;
}

.allocation-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.allocation-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
}

.vault-grid {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.vault-meter {
  display: grid;
  gap: 8px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  transition: width .25s ease;
}

.release-rules {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 4px;
}

.release-rules div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}

.release-rules span,
.release-rules small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.release-rules strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.release-note {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.story-card.locked {
  opacity: .64;
}

.story-card.voted {
  background: linear-gradient(90deg, #f2f6ff, rgba(255, 255, 255, 0));
}

.flow-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  padding: 18px;
}

.risk-summary,
.account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 18px 18px 0;
}

.risk-stat,
.account-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--paper);
}

.risk-stat span,
.account-card span,
.ledger-head span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
}

.risk-stat strong,
.account-card strong {
  font-size: 18px;
  line-height: 1.12;
}

.risk-stat small,
.account-card small,
.risk-rule span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.risk-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px 18px;
}

.risk-rule {
  display: grid;
  gap: 5px;
  border-left: 2px solid rgba(240, 185, 11, .52);
  padding-left: 10px;
}

.risk-rule strong {
  font-size: 13px;
}

.account-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  padding: 12px 18px;
}

.account-step {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
  background: #fbfcfe;
}

.account-step.done {
  border-color: rgba(22, 163, 106, .22);
  background: #f7fdf9;
}

.account-step b,
.account-step span,
.account-step em {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.account-step b {
  font-size: 13px;
}

.account-step span {
  color: var(--muted);
  font-size: 12px;
}

.account-step em {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--yellow-soft);
  color: #8a6400;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

.account-step.done em {
  background: #effbf6;
  color: var(--green);
}

.account-ledger .ledger-head,
.account-ledger .ledger-row {
  grid-template-columns: minmax(100px, .75fr) minmax(180px, 1.4fr) minmax(96px, .7fr) minmax(120px, .9fr);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.ledger-table {
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
}

.ledger-head,
.ledger-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 1.2fr) 96px minmax(90px, .8fr) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

.ledger-head {
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  padding: 10px 12px;
  background: #fbfcfe;
}

.ledger-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 11px 12px;
  background: var(--paper);
}

.ledger-row:last-child {
  border-radius: 0 0 7px 7px;
}

.ledger-row span,
.ledger-row strong,
.ledger-row em {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.ledger-row strong {
  font-variant-numeric: tabular-nums;
}

.ledger-row em {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #effbf6;
  color: var(--green);
  font-style: normal;
  font-weight: 820;
}

.ledger-status {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tx-link {
  color: var(--blue);
  font-size: 11px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.tx-link:hover {
  text-decoration: underline;
}

.ledger-row.watch em {
  background: var(--yellow-soft);
  color: #8a6400;
}

.ledger-row.review em {
  background: #f2f6ff;
  color: var(--blue);
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 13px;
}

.flow-row strong {
  font-size: 14px;
}

.flow-row p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.disclaimer {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(213, 219, 228, .9);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-soft);
}

.disclaimer h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.disclaimer p {
  color: var(--muted);
  line-height: 1.6;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.disclaimer-grid p {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fbfcfe;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 32px));
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(240, 185, 11, .44);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1040px) {
  .stage,
  .vote-shell,
  .story-shell,
  .launch-grid,
  .flow-table,
  .risk-summary,
  .risk-rules,
  .account-summary,
  .account-steps {
    grid-template-columns: 1fr;
  }

  .stage-ledger {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .ledger-item:nth-child(2),
  .ledger-item:nth-child(4) {
    border-right: 0;
  }

  .ledger-item:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .side-rail,
  .compact-panel {
    position: static;
  }

  .ledger-head,
  .ledger-row,
  .account-ledger .ledger-head,
  .account-ledger .ledger-row {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
  }

  .ledger-head span:nth-child(3),
  .ledger-head span:nth-child(4),
  .ledger-row strong,
  .ledger-row span:nth-child(4),
  .account-ledger .ledger-head span:nth-child(3),
  .account-ledger .ledger-row strong {
    display: none;
  }

  .account-ledger .ledger-head,
  .account-ledger .ledger-row {
    grid-template-columns: minmax(70px, .8fr) minmax(92px, 1.1fr) minmax(84px, .9fr);
  }

  .account-ledger .ledger-head span:nth-child(4) {
    display: inline;
  }

  .account-ledger .ledger-row .ledger-status {
    display: flex;
  }

  .story-shell .tool-panel {
    order: 2;
  }
}

@media (max-width: 700px) {
  .app-header {
    align-items: stretch;
    padding: 13px 14px;
  }

  .header-actions {
    justify-content: space-between;
  }

  .primary-button,
  .header-actions .primary-button {
    min-width: 0;
  }

  main {
    width: min(100vw - 18px, 1180px);
    gap: 13px;
    padding: 18px 0 24px;
  }

  .stage {
    gap: 16px;
    padding-top: 8px;
  }

  .stage h1 {
    font-size: 38px;
  }

  .stage-ledger {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-item {
    min-height: 78px;
    padding: 12px;
  }

  .ledger-item strong {
    font-size: 24px;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 4px;
  }

  .timeline-step {
    border-top: 0;
    border-left: 2px solid var(--line-strong);
    padding: 0 0 0 16px;
  }

  .timeline-step::before {
    top: 1px;
    left: -6px;
  }

  .timeline-step.active,
  .timeline-step.done {
    border-left-color: var(--yellow);
    border-top-color: transparent;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1 0 auto;
    min-width: 84px;
  }

  .panel-head,
  .card-top,
  .story-top,
  .allocation-row,
  .reward-strip,
  .reveal-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .funding-meta,
  .reveal-head {
    flex-direction: column;
  }

  .vote-box,
  .story-score {
    justify-items: stretch;
  }

  .disclaimer-grid {
    grid-template-columns: 1fr;
  }

  .release-rules {
    grid-template-columns: 1fr 1fr;
  }

  .vote-box strong,
  .story-score strong {
    font-size: 28px;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row button {
    width: 100%;
  }
}
