/* The example reads as a single receipt, with one row for each onchain event. */
.hedge-story,
.hedge-close {
  --editorial-ink: #f1ead8;
  --editorial-muted: #bebcac;
  --editorial-brass: #d3b783;
  --editorial-line: #bfab7e38;
  --editorial-serif: Georgia, "Times New Roman", serif;
  --editorial-sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--editorial-ink);
  font-family: var(--editorial-sans);
}

.hedge-story {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-block: 1px solid var(--editorial-line);
  background: #151b14;
  scroll-margin-top: 88px;
}

.hedge-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 46%, #bda26b20, transparent 57%),
    linear-gradient(90deg, #151b14 1%, #151b14d9 39%, #151b14a8 72%, #151b14 100%),
    url("/assets/hedge-desk-collateral-print.jpg") 72% 62% / cover no-repeat;
}

.hedge-story-inner {
  width: min(1230px, calc(100% - 104px));
  margin-inline: auto;
}

.hedge-story-inner {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(345px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 7.5vw, 106px);
  padding-block: clamp(64px, 9vw, 135px);
}

.hedge-story-text h2 {
  margin: 0;
  color: var(--editorial-ink);
  font: 400 clamp(2.75rem, 5.7vw, 5.8rem)/.97 var(--editorial-serif);
  letter-spacing: -.058em;
}

.hedge-story-text h2 em {
  color: var(--editorial-brass);
  font-weight: 400;
}

.hedge-story-text > p:not(.hedge-hero-kicker) {
  max-width: 39ch;
  margin: 18px 0 0;
  color: var(--editorial-muted);
  font-size: 1.05rem;
  line-height: 1.58;
}

.hedge-story-link,
.hedge-close a {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #d3b783b0;
  border-radius: 5px;
  color: #171a13;
  background: #e6d4b0;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}

.hedge-story-link { margin-top: 24px; }
.hedge-story-link:hover,
.hedge-close a:hover { background: #f1e4c4; }

.hedge-story-link:focus-visible,
.hedge-close a:focus-visible {
  outline: 2px solid var(--editorial-brass);
  outline-offset: 5px;
}

.hedge-ledger {
  position: relative;
  margin: 0;
  padding: clamp(17px, 3vw, 32px);
  isolation: isolate;
  border: 1px solid #ae956776;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 73% 5%, #8c754b27, transparent 63%),
    linear-gradient(152deg, #2b2d22, #181e16 76%);
  box-shadow: inset 0 0 0 5px #12181079, inset 0 0 0 6px #cab48626, 0 16px 50px #080d08aa;
}

.hedge-ledger::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9px;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #fff9dc08 3px 4px);
  opacity: .37;
}

.hedge-ledger figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--editorial-line);
  color: var(--editorial-muted);
  font-size: .78rem;
}

.hedge-ledger figcaption span:first-child {
  color: var(--editorial-brass);
  font: 400 1.35rem/1.2 var(--editorial-serif);
}

.hedge-ledger-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(86px, .6fr);
  align-items: center;
  gap: 10px;
  padding: 13px 4px 13px 21px;
  border-bottom: 1px solid var(--editorial-line);
}

.hedge-ledger-item::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 5px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--editorial-brass);
  transform: rotate(45deg);
  background: #9d814d;
  box-shadow: 0 0 8px #d2ad6940;
}

.hedge-ledger-item > div:last-child { text-align: right; }

.hedge-ledger-item strong {
  display: block;
  font-size: .96rem;
  font-weight: 550;
  line-height: 1.32;
}

.hedge-ledger-item b,
.hedge-ledger-total strong {
  display: block;
  font: 400 clamp(1.25rem, 2.1vw, 1.68rem)/1.15 var(--editorial-serif);
  font-variant-numeric: tabular-nums;
}

.hedge-ledger-item small {
  display: block;
  margin-top: 3px;
  color: var(--editorial-muted);
  font-size: .75rem;
  line-height: 1.28;
}

.hedge-ledger-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 10px;
  background: #b8c48b16;
  border: 1px solid #b8c48b60;
  border-radius: 3px;
  color: #e0e8c9;
  font-size: .86rem;
}

.hedge-ledger-total strong { white-space: nowrap; }

.hedge-story-in-view .hedge-ledger-item,
.hedge-story-in-view .hedge-ledger-total {
  animation: hedge-ledger-reveal .62s cubic-bezier(.19, .74, .24, 1) both;
}

.hedge-story-in-view .hedge-ledger-item:nth-of-type(2) { animation-delay: .13s; }
.hedge-story-in-view .hedge-ledger-item:nth-of-type(3) { animation-delay: .26s; }
.hedge-story-in-view .hedge-ledger-total { animation-delay: .4s; }

@keyframes hedge-ledger-reveal {
  from { opacity: .46; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

/* Keep the retired marketing sections out of the layout after hydration. */
body:has(> .hedge-hero) main > #hedge-settlement ~ section,
body:has(> .hedge-hero) main > section[data-v2-theme="light"],
body:has(> .hedge-hero) main > section:has(.map-field),
body:has(> .hedge-hero) main > section[class~="py-18"][class~="v2-tablet-lg:py-v2-section"],
body:has(> .hedge-hero) section[aria-labelledby="s7-heading"] {
  display: none !important;
}

.hedge-close {
  background: #1a2118;
  border-block: 1px solid var(--editorial-line);
}

.hedge-close-inner {
  width: min(1230px, calc(100% - 104px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-inline: auto;
  padding-block: clamp(20px, 4vw, 34px);
}

.hedge-close p {
  margin: 0;
  color: var(--editorial-ink);
  font: 400 clamp(1.26rem, 2.6vw, 1.7rem)/1.27 var(--editorial-serif);
}

@media (max-width: 850px) {
  .hedge-story-inner,
  .hedge-close-inner { width: calc(100% - 54px); }

  .hedge-story-inner {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr);
    gap: 24px;
  }
}

@media (max-width: 610px) {
  .hedge-story-inner,
  .hedge-close-inner { width: calc(100% - 36px); }

  .hedge-story-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hedge-story-in-view .hedge-ledger-item,
  .hedge-story-in-view .hedge-ledger-total { animation: none; }
}
