/* Harvest: the homepage for the wider food trade (index.html) */

/* ---------- Hero: one window, four food trades ---------- */
.hv-hero { padding-bottom: var(--space-16); }
.hv-stage { margin-top: var(--space-16); }
/* the big photo, with the trade window sitting over its lower edge */
.hv-photo { aspect-ratio: 16 / 7; }
.hv-photo > img { object-position: 50% 35%; opacity: 0; transition: opacity .9s ease; }
.hv-photo > img.is-on { opacity: 1; }
.hv-over { position: relative; z-index: 2; margin: -220px var(--space-12) 0; }
.hv-over .hv-tab { background: var(--surface); box-shadow: 0 1px 2px rgba(18,18,17,.08); }

.hv-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.hv-tab {
  position: relative; overflow: hidden; height: 38px; padding: 0 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: 500 14px/1 var(--font-sans); letter-spacing: -0.005em; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.hv-tab span { position: relative; z-index: 1; }
.hv-tab:hover { color: var(--ink); border-color: var(--line-strong); }
.hv-tab.is-on { color: var(--ink); border-color: var(--ink); }
/* the time left on the current trade, as a thin line along the bottom */
.hv-tab i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--carmine); }
.hv-tab.is-on.is-timing i { animation: hv-time var(--hv-dwell, 6.5s) linear forwards; }
@keyframes hv-time { to { width: 100%; } }

.hv-win { overflow: hidden; }
.hv-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.hv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: hv-pulse 2.4s ease-out infinite; }
@keyframes hv-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.hv-scenes { display: grid; background: var(--surface-sunk); }
.hv-scene { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1.1fr); align-items: center; padding: var(--space-12) var(--space-12) var(--space-12); min-height: 430px; }
.hv-scene[hidden] { display: grid; visibility: hidden; }   /* keeps the tallest trade's height, so nothing jumps */

.hv-label { display: block; margin-bottom: 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* What comes in */
.hv-msg { max-width: 420px; padding: 16px 18px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(18,18,17,.04); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.hv-msg--wa { border-top-left-radius: 4px; }
.hv-msg__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.hv-msg__head time { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; }
.hv-src { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border-radius: var(--radius-pill); background: var(--surface-sunk); color: var(--ink-2); font-weight: 500; }
.hv-src svg { width: 14px; height: 14px; }
.hv-subj { font-weight: 600; margin-bottom: 4px; }
.hv-sheet { display: grid; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font: 400 13px/1.3 var(--font-mono); }
.hv-sheet > div { display: grid; grid-template-columns: 1fr 1fr .8fr .8fr 1.9fr; }
.hv-sheet span { padding: 8px 9px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-sheet span:first-child { border-left: 0; }
.hv-sheet__h { background: var(--surface-sunk); color: var(--muted); font-size: 11.5px; }
.hv-sheet__h + div { border-top: 1px solid var(--line); }
.hv-wave { display: flex; align-items: center; gap: 3px; height: 34px; margin-bottom: 10px; }
.hv-wave b { width: 30px; height: 30px; flex: none; margin-right: 8px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 10px; }
.hv-wave i { width: 3px; height: var(--h); border-radius: 2px; background: var(--line-strong); }
.hv-wave span { margin-left: 10px; font: 400 11.5px/1 var(--font-mono); color: var(--muted); }
.hv-said { font-style: italic; color: var(--ink-2); }

/* The step in between */
.hv-arrow { position: relative; height: 2px; margin: 0 6px; background: linear-gradient(90deg, var(--line-strong) 50%, transparent 0) 0 0 / 8px 2px repeat-x; }
.hv-arrow .mb-ai__mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 6px var(--surface-sunk); }
.hv-arrow .mb-ai__mark svg { width: 16px; height: 16px; }

/* What makebetter makes of it */
.hv-card { padding: 20px 22px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-float); }
.hv-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hv-card__head b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.hv-card__head .mb-status:not([class*="--"]) { background: var(--surface-sunk); color: var(--ink-2); }
.hv-rows { margin: 0; display: grid; }
.hv-rows > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.hv-rows dt { color: var(--muted); }
.hv-rows dd { margin: 0; color: var(--ink); display: flex; flex-wrap: wrap; gap: 6px; }
.hv-rows em { font-style: normal; font-size: 12.5px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--frost); color: var(--frost-ink); }
.hv-next { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; margin-top: 14px !important; padding: 11px 12px; border-radius: 10px; background: var(--carmine-soft); font-size: 14px; line-height: 1.45; color: var(--ink); }
.hv-next svg { width: 16px; height: 16px; margin-top: 2px; color: var(--carmine); }
.hv-next b { font-weight: 600; }

/* Arriving: the message first, then the card fills in line by line */
.hv-scene.is-playing .hv-msg { animation: hv-in .55s cubic-bezier(.2,.7,.2,1) both; }
.hv-scene.is-playing .hv-arrow .mb-ai__mark { animation: hv-pop .45s .55s cubic-bezier(.3,1.5,.5,1) both; }
.hv-scene.is-playing .hv-card { animation: hv-in .55s .8s cubic-bezier(.2,.7,.2,1) both; }
.hv-scene.is-playing .hv-rows > div, .hv-scene.is-playing .hv-next { animation: hv-row .4s calc(1.2s + var(--d) * .32s) ease both; }
@keyframes hv-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes hv-pop { from { opacity: 0; transform: scale(.5); } }
@keyframes hv-row { from { opacity: 0; transform: translateX(-8px); } }

.hv-gap { padding-top: var(--space-24); }
.hv-gap .statement__grid > p { max-width: 26ch; }

/* ---------- From zero: four steps on one line ---------- */
.hv-path { position: relative; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.hv-path::before { content: ""; position: absolute; left: 0; right: calc(25% - 31px); top: 7px; height: 1px; background: var(--line-strong); }
.hv-path::after { content: ""; position: absolute; left: 0; top: 7px; height: 1px; width: 0; background: var(--carmine); transition: width 2.4s cubic-bezier(.4,0,.2,1); }
.hv-path.is-in::after { width: calc(75% + 31px); }
.hv-step { position: relative; display: grid; gap: var(--space-3); align-content: start; padding-top: var(--space-12); }
.hv-step__dot { position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong); transition: background .3s ease, border-color .3s ease; transition-delay: calc(var(--i) * .6s); }
.hv-path.is-in .hv-step__dot { background: var(--carmine); border-color: var(--carmine); }
.hv-step:last-child .hv-step__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--carmine); opacity: 0; }
.hv-path.is-in .hv-step:last-child .hv-step__dot::after { animation: hv-ring 2.4s 2.4s ease-out infinite; }
@keyframes hv-ring { 0% { opacity: .7; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.5); } }
.hv-step__n { font: 500 12px/1 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.hv-step .title { font-size: 24px; }
.hv-step p { max-width: 30ch; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* ---------- People first ---------- */
.hv-band .mb-photo { height: clamp(440px, 36vw, 720px); }
.hv-band blockquote { max-width: 20ch; }
.hv-ways .offer__n { margin-bottom: var(--space-4); }
.hv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.hv-chips a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; transition: border-color .15s ease; }
.hv-chips a:hover { border-color: var(--ink); }

/* ---------- The trades ---------- */
.hv-trades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.hv-trade { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-3); min-height: 340px; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.hv-trade__tag { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--surface-sunk); font: 500 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hv-trade__tag--home { background: var(--carmine-soft); color: var(--carmine); }
.hv-trade__tag--home::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hv-trade .display-m { margin-top: var(--space-8); }
.hv-trade p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); max-width: 26ch; }
/* one product, many names: the names roll past, the meaning stays */
.hv-names { display: grid; gap: 6px; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.hv-names__roll { position: relative; height: 20px; overflow: hidden; font-size: 14px; color: var(--muted); }
.hv-names__roll i { position: absolute; inset: 0; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; animation: hv-name 8s infinite; }
.hv-names__roll i:nth-child(2) { animation-delay: 2s; }
.hv-names__roll i:nth-child(3) { animation-delay: 4s; }
.hv-names__roll i:nth-child(4) { animation-delay: 6s; }
@keyframes hv-name { 0% { opacity: 0; transform: translateY(100%); } 4%, 22% { opacity: 1; transform: none; } 26%, 100% { opacity: 0; transform: translateY(-100%); } }
.hv-names b { font-size: 14.5px; font-weight: 600; color: var(--ink); }

/* ---------- What we know ---------- */
.hv-know { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hv-know__col { display: grid; gap: var(--space-6); align-content: start; padding: var(--space-8) var(--space-8) 0 0; }
.hv-know__col + .hv-know__col { padding-left: var(--space-8); border-left: 1px solid var(--line); }
.hv-pills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hv-pills li { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.js .hv-know .hv-pills li { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(var(--i) * 70ms); }
.js .hv-know.is-in .hv-pills li { opacity: 1; transform: none; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .hv-trades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-trade { min-height: 0; }
}
@media (max-width: 960px) {
  .hv-stage { margin-top: var(--space-12); }
  .hv-photo { aspect-ratio: 4 / 3; }
  .hv-over { margin: -72px var(--space-3) 0; }
  .hv-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 56px auto; padding: var(--space-6) var(--space-4); min-height: 0; }
  .hv-msg { max-width: none; }
  .hv-arrow { justify-self: center; width: 2px; height: 100%; margin: 0; background: linear-gradient(180deg, var(--line-strong) 50%, transparent 0) 0 0 / 2px 8px repeat-y; }
  .hv-path { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 36px; }
  .hv-path::before, .hv-path::after { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .hv-path::after { height: 0; transition-property: height; }
  .hv-path.is-in::after { width: 1px; height: 100%; }
  .hv-step { padding: 0 0 var(--space-8); }
  .hv-step__dot { left: -36px; }
  .hv-know { grid-template-columns: minmax(0, 1fr); }
  .hv-know__col, .hv-know__col + .hv-know__col { padding: var(--space-6) 0; border-left: 0; }
  .hv-know__col + .hv-know__col { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .hv-trades { grid-template-columns: minmax(0, 1fr); }
  .hv-trade .display-m { margin-top: var(--space-4); }
  .hv-rows > div { grid-template-columns: 76px minmax(0, 1fr); }
  .hv-sheet > div { grid-template-columns: 1fr 1fr .8fr .8fr; }
  .hv-sheet span:last-child { display: none; }
  .hv-tab { height: 34px; padding: 0 13px; font-size: 13.5px; }
}

/* Reduce motion: trades still change, by fading; nothing slides */
@media (prefers-reduced-motion: reduce) {
  .hv-scene.is-playing .hv-msg, .hv-scene.is-playing .hv-arrow .mb-ai__mark, .hv-scene.is-playing .hv-card,
  .hv-scene.is-playing .hv-rows > div, .hv-scene.is-playing .hv-next { animation: hv-fade .6s ease both; }
  @keyframes hv-fade { from { opacity: 0; } }
  .hv-live::before { animation: none; }
  .hv-names__roll i { animation-name: hv-name-fade; }
  @keyframes hv-name-fade { 0% { opacity: 0; } 4%, 22% { opacity: 1; } 26%, 100% { opacity: 0; } }
  .hv-path::after, .hv-step__dot { transition-duration: .01s; transition-delay: 0s; }
  .hv-path.is-in .hv-step:last-child .hv-step__dot::after { animation: none; }
  .js .hv-know .hv-pills li { transform: none; transition-duration: .3s; }
}

/* ==========================================================================
   Header B (default): the photo is the stage. Four trades as thin bars along the top, like
   stories; the message lands on the photo and makebetter's card builds beside it.
   ========================================================================== */
.hv2 { padding-bottom: var(--space-16); }
.hv2-stage { position: relative; margin-top: var(--space-16); }
.hv2-photo { aspect-ratio: 16 / 9; border-radius: var(--radius-xl); }
.hv2-photo > img { opacity: 0; transition: opacity 1.1s ease; object-position: 50% 40%; }
.hv2-photo > img.is-on { opacity: 1; }
.hv2-photo > img.is-new { animation: hv2-zoom 12s cubic-bezier(.2,.6,.3,1) both; }
@keyframes hv2-zoom { from { transform: scale(1.07); } }
/* shade at the top for the bars, and a soft one behind the cards */
.hv2-photo::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, rgba(18,18,17,.66), rgba(18,18,17,.24) 20%, rgba(18,18,17,0) 36%), linear-gradient(to top, rgba(18,18,17,.32), rgba(18,18,17,0) 45%); }

/* the four trades */
.hv2-bars { position: absolute; z-index: 3; left: 32px; right: 32px; top: 26px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.hv2-bar { display: grid; gap: 0; align-content: start; padding: 0 0 6px; border: 0; background: none; text-align: left; cursor: pointer; color: rgba(246,245,242,.62); text-shadow: 0 1px 10px rgba(18,18,17,.4); transition: color .25s ease; }
.hv2-bar span { margin-top: 14px; font: 600 clamp(18px, 1.7vw, 24px)/1.1 var(--font-sans); letter-spacing: -0.02em; }
.hv2-bar small { margin-top: 6px; font: 400 14px/1.35 var(--font-sans); opacity: 0; transform: translateY(-4px); transition: opacity .35s ease, transform .35s ease; }
.hv2-bar.is-on small { opacity: .9; transform: none; transition-delay: .15s; }
.hv2-bar:hover, .hv2-bar.is-on { color: var(--on-photo); }
.hv2-bar i { position: relative; display: block; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(246,245,242,.32); }
.hv2-bar b { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--on-photo); }
.hv2-bar.is-done b, .hv2-bar.is-on:not(.is-timing) b { width: 100%; }
.hv2-bar.is-on.is-timing b { animation: hv-time var(--hv-dwell, 6.5s) linear forwards; }
.hv2-bar:focus-visible { outline: 2px solid var(--on-photo); outline-offset: 4px; border-radius: 4px; }

/* what lands on the photo */
.hv2-scenes { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.hv2-scene { position: absolute; inset: 0; }
.hv2-scene > * { pointer-events: auto; }
/* one card per trade: it arrives as the message, the key words light up, then it opens into the deal */
.hv3 { position: absolute; width: min(440px, 36%); padding: 16px 20px 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-float); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.hv3-msg { transition: color .4s ease; }
.hv3-msg mark { color: inherit; padding: 0 3px; margin: 0 -1px; border-radius: 4px; background: linear-gradient(var(--carmine-soft), var(--carmine-soft)) no-repeat 0 0 / 100% 100%; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hv3-msg .hv-sheet mark { padding: 0 2px; }
.hv3-open { display: grid; grid-template-rows: 1fr; }
.hv3-deal { min-height: 0; overflow: hidden; }
.hv3-deal .hv2-read { margin: 16px 0 12px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.hv3 .hv-card__head { padding-bottom: 0; border-bottom: 0; }
.hv3-spec { margin-top: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.hv3 .hv-rows > div { font-size: 14px; padding: 9px 0; }
/* each trade places its cards where its photo has room (set per card in harvest.html) */
/* --hv-top is set by js/page-harvest.js to just under the trade titles, however tall they are.
   Every card hangs from there (the photos keep their subject clear of each card's side). */
.hv2-scene .at-tl, .hv2-scene .at-bl { left: 40px; top: var(--hv-top, 168px); }
.hv2-scene .at-tr, .hv2-scene .at-br { right: 40px; top: var(--hv-top, 168px); }
.hv2-scene .at-tc { left: 37%; top: var(--hv-top, 168px); }
.hv2-scene .at-bl, .hv2-scene .at-br { top: auto; bottom: 40px; }
.hv2-scene .hv3.is-tall { top: var(--hv-top, 168px); bottom: auto; }   /* too tall to sit at the foot: hang it from the top */
.hv2-read { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font: 500 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--carmine); }
.hv2-read .mb-ai__mark { width: 20px; height: 20px; border-radius: 6px; }
.hv2-read .mb-ai__mark svg { width: 12px; height: 12px; }

/* the story, in order: lands 0s, words light up from 1s, it opens at 3.2s, the result last */
.hv2-scene.is-playing .hv3 { animation: hv2-land .7s cubic-bezier(.2,.7,.2,1) both; }
.hv2-scene.is-playing .hv3-msg mark { animation: hv3-mark .45s calc(1s + var(--m) * .32s) ease-out both; }
.hv2-scene.is-playing .hv3-msg { animation: hv3-dim .5s 3s ease both; }
.hv2-scene.is-playing .hv3-open { animation: hv3-open .7s 3.2s cubic-bezier(.3,.7,.2,1) both; }
.hv2-scene.is-playing .hv3-deal > *:not(.hv-rows), .hv2-scene.is-playing .hv-rows > div { animation: hv-row .4s calc(3.5s + var(--d, 0) * .22s) ease both; }
.hv2-scene.is-playing .hv3-deal .hv2-read { --d: -1; }
.hv2-scene.is-playing .hv3-deal .hv-next { animation: hv3-done .5s 4.6s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes hv3-mark { from { background-size: 0% 100%; } }
@keyframes hv3-dim { to { color: var(--ink-2); } }
@keyframes hv3-open { from { grid-template-rows: 0fr; } }
@keyframes hv-fade { from { opacity: 0; } }
@keyframes hv3-done { from { opacity: 0; transform: scale(.96); } }
@keyframes hv2-land { from { opacity: 0; transform: translateY(18px) scale(.98); } }

@media (max-width: 1280px) { .hv2-photo { aspect-ratio: 3 / 2; } }
@media (max-width: 1200px) { .hv2-bar small { display: none; } }   /* five titles get narrow: names only */   /* room for the tallest card under the titles */
@media (max-width: 1100px) {
  .hv2-photo { aspect-ratio: 4 / 3; }
  .hv3 { width: min(420px, 48%); }
  .hv2-scene .at-tc { left: 30%; }
}
/* Tablets and phones: the photo stays a photo; the card overlaps its foot and continues below */
@media (max-width: 960px) {
  .hv2-stage { margin-top: var(--space-12); }
  .hv2-photo { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
  .hv2-bar small { display: none; }
  .hv2-scenes { max-width: 560px; margin-left: auto; margin-right: auto; }
  .hv2-scenes { position: relative; inset: auto; display: grid; margin-top: -96px; padding: 0 12px; }
  .hv2-scene { position: static; grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; }
  .hv2-scene[hidden] { display: grid; visibility: hidden; }
  .hv3 { position: static; width: auto; }
  /* on phones the deal fades in at full size, so the page never changes height */
  .hv2-scene.is-playing .hv3-open { animation: none; }
  .hv2-scene.is-playing .hv3-deal { animation: hv-fade .6s 3.2s ease both; }
}
@media (max-width: 760px) {
  .hv2-photo { aspect-ratio: 4 / 5; }
  .hv2-bars { left: 16px; right: 16px; top: 16px; gap: 6px; }
  .hv2-bar span { margin-top: 10px; font-size: 14px; }
  .hv2-scenes { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hv2-photo > img.is-new { animation: none; }
  .hv2-scene.is-playing .hv3, .hv2-scene.is-playing .hv3-deal > *, .hv2-scene.is-playing .hv-rows > div,
  .hv2-scene.is-playing .hv3-deal .hv-next { animation: hv-fade .6s ease both; }
  .hv2-scene.is-playing .hv3-open { animation: none; }
  .hv2-scene.is-playing .hv3-deal { animation: hv-fade .6s 1.6s ease both; }
}
.hv3 .hv-sheet > div { grid-template-columns: .9fr .8fr .62fr .62fr 2fr; }
/* a stock report inside the card: one lot per line */
.hv3-lots { margin: 6px 0 0; padding: 0; list-style: none; display: grid; font: 400 12.5px/1.4 var(--font-mono); color: var(--ink-2); }
.hv3-lots li { display: grid; grid-template-columns: minmax(0, 1.8fr) .8fr .8fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.hv3-lots li span:nth-child(3) { text-align: right; }
.hv3-lots__h { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border-top: 0 !important; padding-bottom: 4px !important; }
.hv3-lots li span { white-space: nowrap; }
.hv3-lots li span:nth-child(2) { text-align: right; }

/* ==========================================================================
   Homepage, after the outcome, trade, film and story pages: every section leads into one of them
   ========================================================================== */
.hv3-more { display: inline-flex; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.hv3-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hv2-scene.is-playing .hv3-more { animation: hv-row .4s 4.9s ease both; }

/* What changes: six outcomes with their number */
.hvc-outs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.hvc-outs a { display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 6px; height: 100%; padding: var(--space-8); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.hvc-outs a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.hvc-n { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--carmine); }
.hvc-big { margin-top: var(--space-4); font-size: clamp(40px, 4vw, 60px); line-height: 1; font-weight: 600; letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hvc-unit { font-size: 15px; color: var(--muted); }
.hvc-t { margin-top: var(--space-4); font-size: 20px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.hvc-p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.hvc-outs em { margin-top: var(--space-3); font-style: normal; font-size: 15px; font-weight: 500; }
.hvc-outs .mb-arrow, .hvt-list .mb-arrow, .hvw-link .mb-arrow { display: inline-block; transition: transform .2s ease; }
.hvc-outs a:hover .mb-arrow, .hvt-list a:hover .mb-arrow, .hvw-link:hover .mb-arrow { transform: translateX(3px); }
[dir=rtl] .hvc-outs a:hover .mb-arrow, [dir=rtl] .hvt-list a:hover .mb-arrow, [dir=rtl] .hvw-link:hover .mb-arrow { transform: translateX(-3px); }

/* Your trade: five cards with their photo */
.hvt-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.hvt-list a { display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; height: 100%; color: var(--ink); text-decoration: none; }
.hvt-photo { aspect-ratio: 4 / 5; margin-bottom: var(--space-3); border-radius: var(--radius-lg); }
.hvt-photo img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.hvt-list a:hover .hvt-photo img { transform: scale(1.04); }
.hvt-tag { position: absolute; z-index: 2; left: 12px; top: 12px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--carmine); color: var(--on-carmine); font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.hvt-list b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.hvt-list span:not(.hvt-tag) { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.hvt-list em { margin-top: var(--space-2); font-style: normal; font-size: 15px; font-weight: 500; }

/* How we work: the film in short, with a still of its map */
.hvw { position: relative; }
.hvw-anchor { position: absolute; top: 0; }
.hvw-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-16); align-items: center; }
.hvw-text { display: grid; gap: var(--space-6); justify-items: start; }
.hvw-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px var(--space-6); width: 100%; }
.hvw-steps li { display: flex; gap: 10px; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.hvw-steps span { font: 500 12px/1 var(--font-mono); color: var(--carmine); }
.hvw-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }
.hvw-link { display: inline-flex; gap: 6px; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; }
.hvw-map { position: relative; display: grid; gap: var(--space-3); padding: var(--space-8); border-radius: var(--radius-xl); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  background-color: var(--paper); background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 75%, transparent) 1px, transparent 1.3px); background-size: 22px 22px; transition: border-color .2s ease; }
.hvw-map:hover { border-color: var(--line-strong); }
.hvw-map__k { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hvw-map svg { width: 100%; height: auto; }
.hvw-lane { fill: color-mix(in srgb, var(--surface) 60%, transparent); stroke: var(--line); }
.hvw-lt { font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.hvw-e { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
.hvw-n rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.hvw-n.is-ch rect { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 2; }
.hvw-nl { font: 600 13px var(--font-sans); fill: var(--ink); }
.hvw-nm { font: 500 12px var(--font-mono); fill: var(--muted); }
.hvw-n.is-ch .hvw-nm { fill: var(--ok); font-weight: 600; }
.hvw-pen { justify-self: end; font: 600 26px/1 "Caveat", "Bradley Hand", cursive; color: #2b55c9; transform: rotate(-3deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hvw-pen { color: #93b2f2; } }
:root[data-theme="dark"] .hvw-pen { color: #93b2f2; }

/* Stories: where it started */
.hvs-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); align-items: start; }
.hvs-in .mb-eyebrow { margin-bottom: var(--space-6); }
.hvs-q { margin: var(--space-8) 0 0; max-width: 24ch; font-family: "Iowan Old Style", "Charter", Cambria, Georgia, serif; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; color: var(--ink-2); }
.hvs-list { display: grid; gap: var(--space-6); }
.hvs-list ol { margin: 0; padding: 0; list-style: none; display: grid; border-top: 1px solid var(--line); }
.hvs-list a { display: grid; gap: 4px; padding: var(--space-6) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hvs-list small { font: 500 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hvs-list b { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.hvs-list a:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (max-width: 1100px) {
  .hvt-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hvc-outs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hvw-in, .hvs-in { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .hvw-map { padding: var(--space-4); }
}
@media (max-width: 640px) {
  .hvc-outs, .hvw-steps { grid-template-columns: minmax(0, 1fr); }
  .hvt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hvt-photo { aspect-ratio: 1; }
}
