/* fund/raise fund area: the raise page, the fund page and the fund components in
   src/fund (fund cards, the funding panel, the contribution form, fee classes, tables,
   claim/refund and redemption), which the explore, home, dashboard and decision pages
   also render. Tokens and shared components come from brand.css. Red stays a sparse
   accent: the objective rule, the current journey step and an error marker. */

/* ---- Fund card (explore, home, dashboard) ----------------------------------------- */

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.16s ease;
}
.project-card:hover {
  border-color: var(--line-strong);
}
/* The fund's plate (fundArt), full-bleed at the top of the card, as the reference. */
.project-image {
  display: block;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border-bottom: var(--border);
}
.project-image:focus-visible {
  outline-offset: -3px;
}
.project-image .art {
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.project-image:hover .art {
  transform: scale(1.025);
}
.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--space-5) var(--space-5) var(--space-5);
}
.card-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.card-asset {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.bookmark {
  margin: -8px -10px -8px auto;
}
.bookmark .icon {
  width: 18px;
  height: 18px;
}
.bookmark.saved {
  background: var(--black);
}
.bookmark.saved .icon {
  filter: invert(1);
}
.project-name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.project-name h3 {
  font-size: 28px;
  letter-spacing: var(--tracking-display);
}
.project-name .icon {
  margin-top: 6px;
  transition: transform 0.2s var(--ease);
}
.project-name:hover .icon {
  transform: translate(2px, -2px);
}
.project-body > p {
  display: -webkit-box;
  margin-top: var(--space-2);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.funding-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  margin-top: auto;
  padding-top: var(--space-6);
  font-variant-numeric: tabular-nums;
}
.funding-numbers strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
}
.funding-numbers span {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.funding-numbers b {
  margin-left: auto;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.project-card .progress {
  height: 8px;
  margin: var(--space-3) 0 var(--space-4);
}
.card-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Topline and heading (raise and fund pages) ----------------------------------- */

.raise-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-top: var(--space-6);
}
.raise-topline .back-link {
  margin-top: 0;
}
.raise-heading-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.raise-heading-actions .button .icon {
  width: 16px;
  height: 16px;
}

.prospectus-heading,
.fund-heading {
  padding: var(--space-8) 0 var(--space-7);
}
.prospectus-heading h1,
.fund-heading h1 {
  max-width: none;
  overflow-wrap: anywhere;
}
/* The ticker beside the name: small Inter, not part of the display line. */
.prospectus-heading h1 span,
.fund-heading h1 span {
  display: inline-block;
  margin-left: 0.5em;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--muted);
  vertical-align: 0.35em;
}
.heading-text .prospectus-tagline {
  color: var(--ink);
}
.heading-text .prospectus-deck {
  margin-top: var(--space-3);
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* The eyebrow: "RAISE / NETWORK ASSETS / BUYS SOL". */
.raise-metadata {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--muted);
}
.raise-metadata span + span::before {
  content: "/" / "";
  margin: 0 0.6em;
}
/* The Example tag opens the eyebrow: a gap, no slash. */
.raise-metadata .example-tag {
  align-self: center;
  margin-right: var(--space-3);
}
.raise-metadata .example-tag + span::before {
  content: none;
}

.fund-title {
  margin-top: var(--space-4);
}

/* The fund's plate beside the fund page heading (the reference heading-art). */
.fund-plate {
  width: clamp(240px, 28vw, 400px);
  align-self: end;
}
.fund-plate .art {
  max-height: none;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

/* The raise page plate above the tabs (the reference prospectus-plate). */
.prospectus-plate {
  margin-bottom: var(--space-6);
}
.prospectus-plate .art {
  height: 355px;
  object-fit: cover;
  border-radius: var(--radius);
}
.prospectus-plate figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--muted);
}
/* The brand is always written lowercase: "fund/raise". */
.prospectus-plate figcaption .brand-name {
  text-transform: none;
}

/* ---- Raise page: story column and the funding panel ------------------------------- */

.prospectus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  align-items: start;
  gap: var(--space-8);
}
.prospectus-story {
  min-width: 0;
}
.prospectus-story .detail-tabs {
  margin-top: 0;
}

.detail-content {
  padding-top: var(--space-7);
}
.detail-content > * + * {
  margin-top: var(--space-4);
}
.detail-content > h2 {
  font-size: clamp(28px, 2.8vw, 40px);
  max-width: 22ch;
}
.detail-content > h3 {
  margin-top: var(--space-8);
}
.detail-content > h2 + *,
.detail-content > h3 + * {
  margin-top: var(--space-4);
}
.detail-content p {
  max-width: 68ch;
}
.detail-content > .lead {
  margin-top: var(--space-5);
}
.detail-content > .detail-split,
.detail-content > .disclosure {
  margin: var(--space-6) 0 0;
}
.detail-content > p + :is(.deal-grid, .unlock-table, .team-list),
.detail-content > .lead + :is(.deal-grid, .unlock-table, .team-list) {
  margin-top: var(--space-6);
}
/* Long values (the oversubscription rule) get the room, labels keep theirs. */
.detail-content > .summary-list dt {
  flex: 0 1 38%;
}
.detail-content > details {
  margin-top: 0;
}
.detail-content > details:first-of-type {
  border-top: var(--border);
}

/* An objective or milestone: one thin red rule. */
.raise-milestone {
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  border-left: 2px solid var(--red);
  background: var(--gray);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.raise-milestone > span {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.raise-milestone h3 {
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.25;
}

/* Cards in a row: venues, accepted tokens, fee classes, target-protocol actions. */
.venue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.fee-list,
.action-list {
  grid-template-columns: minmax(0, 1fr);
}
.venue-list > div {
  min-width: 0;
  padding: var(--space-5);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
}
.venue-list h3,
.venue-list h4 {
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: var(--tracking-heading);
  line-height: 1.25;
}
.venue-list p {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.venue-list p + p,
.venue-list p + .summary-list,
.venue-list .summary-list + p,
.venue-list .summary-list + .summary-list {
  margin-top: var(--space-3);
}
.venue-list .summary-list {
  margin-top: var(--space-3);
}
.fee-list > div,
.action-list > div {
  padding: var(--space-6);
}

/* Segmented bars: fee splits and where the capital goes. Neutral greys only. */
.allocation-bar {
  display: flex;
  height: 36px;
  margin: var(--space-4) 0;
  overflow: hidden;
  background: var(--gray);
  border-radius: var(--radius-sm);
  font-size: var(--fs-label);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.allocation-bar > span {
  display: block;
  min-width: 0;
  padding: 0 var(--space-2);
  overflow: hidden;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--black);
  color: var(--white);
}
.allocation-bar > span + span {
  box-shadow: inset 1px 0 0 var(--white);
}
.allocation-bar > span:nth-child(2) {
  background: #4d4d4d; /* white text 8.4:1 */
}
.allocation-bar > span:nth-child(3) {
  background: #a6a6a6; /* black text 8.3:1 */
  color: var(--black);
}
.allocation-bar > span:nth-child(n + 4) {
  background: #d4d4d4;
  color: var(--black);
}
.capital-bar {
  height: 44px;
}
.capital-bar > span {
  line-height: 44px;
}

.deal-grid,
.funding-facts,
.allocation-preview,
.fund-stats {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: var(--border);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}
.deal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.deal-grid > div,
.fund-stats > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-5);
  background: var(--white);
}
.deal-grid span,
.fund-stats span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.deal-grid strong,
.fund-stats strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  overflow-wrap: anywhere;
}
.deal-grid small {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.money-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.money-flow > div {
  padding: var(--space-5);
  background: var(--gray);
  border-radius: var(--radius);
}
.money-flow strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  font-variant-numeric: tabular-nums;
}
.money-flow p {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.team-list {
  display: grid;
  gap: var(--space-3);
}
.team-list article {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border: var(--border);
  border-radius: var(--radius);
}
.team-list article > div:last-child {
  min-width: 0;
}
.team-list h3 {
  font-size: 20px;
}
.team-list p {
  margin-top: var(--space-1);
  font-size: 15px;
}
.team-list span {
  display: block;
  margin-top: var(--space-1);
  font-size: 13px;
  color: var(--muted);
}

/* Wind-down steps: numbered rows. */
.winddown-steps {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  border-top: var(--border);
}
.winddown-steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: var(--border);
}
.winddown-steps li > span {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.winddown-steps h3 {
  font-size: 18px;
}
.winddown-steps p {
  margin-top: var(--space-1);
  font-size: 15px;
  color: var(--muted);
}

.update {
  padding: var(--space-5) 0;
  border-bottom: var(--border);
}
.detail-content > .update {
  margin-top: 0;
}
.detail-content > h2 + .update {
  margin-top: var(--space-5);
  border-top: var(--border);
}
.update > span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.update h3 {
  margin-top: var(--space-1);
  font-size: 18px;
}
.update p {
  margin-top: var(--space-1);
  font-size: 15px;
  color: var(--muted);
}

/* The funding panel (aside#raise-funding): the campaign card. */
.funding-panel {
  min-width: 0;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
}
.funding-overview,
.funding-action {
  padding: var(--space-6);
}
.funding-action {
  border-top: var(--border);
}
.panel-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.funding-title {
  margin-top: var(--space-6);
  font-size: 28px;
  line-height: 1.1;
}
.raise-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.raise-total span {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--muted);
}
.funding-progress-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-5);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.funding-progress-label strong {
  font-weight: 600;
}
.funding-progress-label span {
  color: var(--muted);
}
.funding-panel .progress {
  height: 10px;
}
.funding-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--space-5) 0;
}
.funding-facts > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-3) var(--space-3);
  background: var(--white);
}
.funding-facts strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.funding-facts span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.panel-plan {
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: var(--gray);
  border-radius: var(--radius);
}
.panel-plan > span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.panel-plan p {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.panel-plan strong {
  font-weight: 600;
}
.panel-plan .text-link {
  font-size: var(--fs-sm);
}
.raise-resolved {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border);
  font-size: var(--fs-sm);
}
.raise-resolved span {
  color: var(--muted);
}
.raise-resolved strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* State actions inside the panel, the activity section and redemption. */
.raise-state-action > * + * {
  margin-top: var(--space-3);
}
.raise-state-action h3 {
  font-size: 22px;
}
.raise-state-action p {
  font-size: 15px;
  color: var(--muted);
}
.raise-state-action .button + p {
  font-size: 13px;
}
.funding-footnote {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.funding-footnote .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  opacity: 0.7;
}
.your-position {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--gray);
  border-top: var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.your-position span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.your-position strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ---- Contribution form, review modal, redemption ------------------------------------ */

#commit-form > * + * {
  margin-top: var(--space-4);
}
.token-choice {
  display: grid;
  gap: var(--space-2);
}
.token-choice button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border: var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  text-align: left;
}
.token-choice button:hover:not(:disabled) {
  border-color: var(--black);
}
.token-choice button.selected {
  border-color: var(--black);
  box-shadow: inset 0 0 0 1px var(--black);
}
.token-choice button:disabled {
  background: var(--gray);
  border-color: var(--line);
  color: var(--muted);
}
.token-choice button > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-1);
  min-width: 0;
}
.token-choice .icon {
  width: 14px;
  height: 14px;
}
.token-choice strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#commit-form > p.muted,
.estimate-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.commit-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  font-size: var(--fs-sm);
}
#commit-form > .commit-label {
  margin-top: var(--space-6);
}
.commit-label label {
  font-weight: 600;
}
.commit-label > span {
  font-size: 13px;
  color: var(--muted);
}
.amount-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 64px;
  margin-top: var(--space-2);
  padding: 0 var(--space-2) 0 var(--space-4);
  background: var(--white);
  border: var(--border-strong);
  border-radius: var(--radius-sm);
}
.commit-label + .amount-input {
  margin-top: var(--space-2);
}
.amount-input:hover,
.amount-input:focus-within {
  border-color: var(--black);
}
.amount-input:focus-within {
  outline: var(--focus);
  outline-offset: 1px;
}
.amount-input > span {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--muted);
}
.amount-input input {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.amount-input input:focus-visible {
  outline: none;
}
.amount-input input::placeholder {
  color: var(--muted);
}
.amount-input input:disabled {
  color: var(--muted);
}
.amount-input:has(input[aria-invalid="true"]) {
  border-left: 3px solid var(--red);
}
.max-amount {
  padding: 6px 10px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
}
.max-amount:hover:not(:disabled) {
  border-color: var(--black);
}
.max-amount:disabled {
  color: var(--muted);
}
.amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
#commit-form > .amount-presets {
  margin-top: var(--space-3);
}
.amount-presets button {
  min-height: 36px;
  padding: 6px 14px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.amount-presets button:hover:not(:disabled) {
  border-color: var(--black);
}
.amount-presets button.chosen {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
/* A form error: black text with a small red marker. */
#commit-form [role="alert"],
.redemption [role="alert"] {
  padding-left: var(--space-3);
  border-left: 2px solid var(--red);
  font-size: 13px;
  color: var(--ink);
}
.commit-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  font-size: var(--fs-sm);
}
.commit-balance span {
  color: var(--muted);
}
.commit-balance strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.allocation-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.allocation-preview > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--gray);
}
.allocation-preview span {
  font-size: 12px;
  color: var(--muted);
}
.allocation-preview strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.allocation-preview small {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
#commit-form > .commit-button {
  margin-top: var(--space-5);
}
#commit-form > .commit-button + p.muted {
  margin-top: var(--space-2);
}
.commit-terms {
  padding: var(--space-4) 0;
  border-top: var(--border);
}
#commit-form > .commit-terms {
  margin-top: var(--space-5);
}
.commit-terms summary {
  font-size: var(--fs-sm);
}
.commit-terms p {
  font-size: var(--fs-sm);
}
.commit-terms a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.commit-terms a .icon {
  width: 14px;
  height: 14px;
}

.commit-preview {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: var(--border);
}
.commit-preview .art {
  flex-shrink: 0;
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.commit-preview > div {
  min-width: 0;
}
.commit-preview h3 {
  font-size: 20px;
}
.commit-preview div > span {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.claim-refund > * + *,
.redemption > * + *,
.redemption form > * + * {
  margin-top: var(--space-4);
}
.redemption form .amount-input {
  margin-top: var(--space-2);
}
.redemption form > .commit-label {
  margin-top: var(--space-5);
}
.claim-refund .status {
  margin-right: var(--space-2);
}
.redemption .countdown-block {
  max-width: 420px;
}

/* ---- Tables (role=table grids) ----------------------------------------------------- */

.unlock-table {
  margin: var(--space-4) 0;
  border-top: var(--border);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.unlock-table > [role="row"] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: var(--border);
}
.unlock-table [role="columnheader"] {
  overflow-wrap: anywhere;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--muted);
}
.unlock-table [role="cell"] {
  min-width: 0;
  overflow-wrap: anywhere;
}
.unlock-table small {
  font-size: 12px;
  color: var(--muted);
}
.holdings-table [role="columnheader"]:not(:first-child),
.holdings-table [role="cell"]:not(:first-child) {
  text-align: right;
}
.basket-table > [role="row"] {
  grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
}
.tx-table > [role="row"] {
  grid-template-columns:
    minmax(64px, 0.6fr) minmax(0, 2fr) minmax(0, 1.4fr)
    minmax(0, 0.8fr);
}
/* Six-column tables (basket legs, redemption requests); fold to 3 x 2 on phones. */
.unlock-table.six-col > [role="row"] {
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
}
/* Per-row action buttons (redemption requests) wrap inside narrow cells. */
.unlock-table [role="cell"] .button {
  white-space: normal;
}
.unlock-table + .summary-list,
.unlock-table + p {
  margin-top: var(--space-4);
}

/* ---- Below the prospectus ----------------------------------------------------------- */

.raise-journey,
.raise-activity,
.related-raises {
  margin-top: var(--space-9);
  padding-top: var(--space-7);
  border-top: var(--border);
}
.raise-journey h2,
.raise-activity > div:first-child h2 {
  margin-bottom: var(--space-6);
}
.raise-journey ol {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.raise-journey li {
  padding-top: var(--space-5);
  border-top: 2px solid var(--line);
}
.raise-journey li.complete {
  border-top-color: var(--black);
}
/* The current step: a thin red rule. */
.raise-journey li.current {
  border-top-color: var(--red);
}
.raise-journey li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-4);
  border: var(--border-strong);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}
.raise-journey li.complete > span {
  background: var(--black);
  border-color: var(--black);
}
.raise-journey li.complete .icon {
  width: 16px;
  height: 16px;
  filter: invert(1);
}
.raise-journey li.current > span {
  border-color: var(--black);
}
.raise-journey h3 {
  font-size: 18px;
}
.raise-journey p {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* The wallet's own activity: rows, then claim and refund. Kept to the story width. */
.raise-activity {
  max-width: calc(100% - 400px - var(--space-8));
}
.raise-activity article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: var(--border);
  border-bottom: var(--border);
}
.raise-activity article + article {
  border-top: 0;
}
.activity-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray);
  border-radius: 50%;
}
.activity-seal .icon {
  width: 18px;
  height: 18px;
}
.raise-activity article > div {
  min-width: 0;
}
.raise-activity article strong {
  display: block;
  font-weight: 600;
}
.raise-activity article span:not(.activity-seal) {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.raise-activity article b {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.raise-activity .claim-refund {
  margin-top: var(--space-5);
}
.activity-empty {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--gray);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.activity-empty .activity-seal {
  flex-shrink: 0;
  background: var(--white);
}

.related-raises > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.related-raises > div:last-child > a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5);
  border: var(--border);
  border-radius: var(--radius-lg);
}
.related-raises > div:last-child > a:hover {
  border-color: var(--black);
}
.related-raises > div:last-child > a span {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.related-raises .art {
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.related-raises h3 {
  margin-top: var(--space-3);
  font-size: 28px;
  letter-spacing: var(--tracking-display);
}
.related-raises p {
  margin-top: var(--space-2);
  font-size: 15px;
  color: var(--muted);
}

/* ---- Fund page ---------------------------------------------------------------------- */

.fund-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fund-stats small {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.fund-alert {
  margin: var(--space-6) 0 0;
  padding: var(--space-6);
}
.fund-alert h2 {
  margin-bottom: var(--space-4);
  font-size: clamp(24px, 2.4vw, 32px);
}
.fund-alert > .text-link {
  margin-top: var(--space-4);
}
.fund-alert .summary-list > div {
  border-bottom-color: #d6d6d6;
}
.fund-alert .countdown > div {
  background: var(--white);
}
.fund-alert > :not(h2) {
  max-width: 720px;
}
/* The wind-down engraving: small, to the right of the redemption. */
.winddown-art {
  float: right;
  width: clamp(140px, 16vw, 220px);
  margin: 0 0 var(--space-4) var(--space-5);
}
.winddown-art .art {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.fund-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: var(--space-8);
  margin-top: var(--space-8);
}
.fund-layout > div {
  min-width: 0;
}
.fund-section + .fund-section {
  margin-top: var(--space-8);
  padding-top: var(--space-7);
  border-top: var(--border);
}
.fund-section > * + * {
  margin-top: var(--space-4);
}
.fund-section > h2,
.fund-section .section-heading h2 {
  font-size: clamp(28px, 2.6vw, 36px);
}
.fund-section .section-heading {
  align-items: baseline;
  margin-bottom: var(--space-5);
}
.fund-section .section-heading > span {
  white-space: nowrap;
}
.fund-section > h2 + * {
  margin-top: var(--space-5);
}
.fund-section > .fund-subhead {
  margin-top: var(--space-7);
}
.fund-section p {
  max-width: 68ch;
}
.fund-split {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--space-4) 0 var(--space-6);
}
.fund-split strong {
  font-size: 22px;
}

.fund-purchases {
  margin-top: var(--space-7);
}
.fund-purchases > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}
.fund-purchases > div:first-child h3 {
  font-size: 20px;
}
.fund-purchases > div:first-child span {
  font-size: 13px;
  color: var(--muted);
}
.fund-purchases article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: var(--border);
}
.fund-purchases article:first-of-type {
  border-top: var(--border);
}
.fund-purchases article strong {
  display: block;
  font-weight: 600;
}
.fund-purchases article > div {
  min-width: 0;
}
.fund-purchases article > div span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.fund-purchases article b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fund-panel {
  padding: var(--space-6);
  border: var(--border);
  border-radius: var(--radius-lg);
}
.fund-panel > * + * {
  margin-top: var(--space-3);
}
.fund-panel h2 {
  font-size: 24px;
}
.fund-panel > .panel-subhead {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: var(--border);
}
.fund-panel p {
  font-size: 15px;
}
.fund-panel .text-link {
  font-size: var(--fs-sm);
}
.fund-proposal {
  display: block;
  padding: var(--space-4);
  background: var(--gray);
  border-radius: var(--radius);
}
.fund-proposal:hover {
  background: #e8e8e8;
}
.fund-proposal > span {
  display: block;
  font-size: var(--fs-label);
  color: var(--muted);
}
.fund-proposal strong {
  display: block;
  margin-top: var(--space-1);
  font-weight: 600;
  line-height: 1.45;
}

/* ---- Responsive --------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .fund-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .prospectus-grid,
  .fund-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }
  .raise-activity {
    max-width: none;
  }
  .raise-journey ol {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  /* Tags plus the basket label can outgrow a phone card: wrap the label, not truncate it. */
  .card-asset {
    white-space: normal;
  }
  .prospectus-heading,
  .fund-heading {
    padding: var(--space-6) 0 var(--space-6);
  }
  .fund-plate {
    width: 100%;
  }
  .prospectus-plate .art {
    height: 240px;
  }
  .related-raises > div:last-child > a {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: var(--space-4);
  }
  .related-raises .art {
    height: 72px;
  }
  .winddown-art {
    float: none;
    width: 160px;
    margin: 0 0 var(--space-4);
  }
  .prospectus-heading h1 span,
  .fund-heading h1 span {
    font-size: 13px;
  }
  .detail-content {
    padding-top: var(--space-6);
  }
  .detail-content > h3 {
    margin-top: var(--space-7);
  }
  .funding-overview,
  .funding-action,
  .fund-panel,
  .fund-alert {
    padding: var(--space-5);
  }
  .your-position {
    padding: var(--space-4) var(--space-5);
  }
  .raise-total {
    font-size: 48px;
  }
  .funding-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .funding-facts > div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .funding-facts span {
    text-align: right;
  }
  .deal-grid,
  .fund-stats,
  .fund-split,
  .related-raises > div:last-child,
  .raise-journey ol {
    grid-template-columns: minmax(0, 1fr);
  }
  .fund-split {
    gap: var(--space-4);
  }
  .unlock-table {
    font-size: 13px;
  }
  .unlock-table > [role="row"] {
    /* Sized so each header word fits down to 360px: Tranche, target, Cumulative, Status. */
    grid-template-columns:
      minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.7fr)
      minmax(0, 1fr);
    column-gap: var(--space-3);
  }
  .basket-table > [role="row"] {
    grid-template-columns: 24px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
  }
  /* Holdings and transactions fold into two columns: header and rows read as 2 x 2. */
  .holdings-table > [role="row"],
  .tx-table > [role="row"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-2);
  }
  .unlock-table.six-col > [role="row"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--space-2);
  }
  .holdings-table [role="columnheader"]:nth-child(3),
  .holdings-table [role="cell"]:nth-child(3) {
    text-align: left;
  }
  .fee-list > div,
  .action-list > div,
  .venue-list > div {
    padding: var(--space-5);
  }
  .raise-milestone {
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  }
  .related-raises > div:last-child > a {
    padding: var(--space-5);
  }
  .raise-journey,
  .raise-activity,
  .related-raises {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
  }
  .fund-section + .fund-section {
    margin-top: var(--space-7);
    padding-top: var(--space-6);
  }
  .amount-input input {
    font-size: 28px;
  }
  /* The rows below the bar name every party; the bar keeps only the percentages. */
  .fee-bar .party {
    display: none;
  }
  .fee-bar > span {
    padding: 0 1px;
    text-align: center;
    text-overflow: clip;
  }
  .prospectus-story .detail-tabs {
    gap: 0 var(--space-5);
  }
  .prospectus-story .detail-tabs button {
    padding: var(--space-3) 0;
  }
  /* The action drops below the text. */
  .raise-activity article {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .raise-activity article b {
    grid-column: 2;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-image .art {
    transition: none;
  }
}

@media (forced-colors: active) {
  .allocation-bar > span {
    border: 1px solid CanvasText;
  }
  .token-choice button.selected,
  .amount-presets button.chosen {
    outline: 2px solid Highlight;
  }
}
