/* The Sell page (farm-operations.html): "From the grow room to the receipt".
   Colours, radii, shadows and widths come from marketing-tokens.css (public-light); this file is
   layout and the page's own components only. Motion is owned by js/gr-sell.js (GSAP): no CSS transition
   or animation here touches transform or opacity on an element the script animates. */
.sell { --sell-gap: clamp(3rem, 6vw, 5.5rem); overflow-x: clip; }
.sell .sell-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sell section[id], .sell [id="operation-types"] { scroll-margin-top: 6rem; }

/* Opening */
.sell .sell-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; align-items: center; padding-block: 3rem 4rem; }
.gr-public.sell .sell-hero h1 { font-size: clamp(2.5rem, 4.6vw + .5rem, 4.75rem); line-height: 1.03; max-width: 12ch; margin-bottom: 1.5rem; }
.sell .sell-hero-link { margin-top: 1.75rem; }
.sell .sell-hero-link a { font-size: 1.125rem; }
.sell .sell-hero-photo img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 40%; border-radius: var(--gr-operator-radius-xl); }

/* Story */
.sell .sell-story { background: var(--gr-cloud-surface); border-block: 1px solid var(--gr-cloud-border); padding-block: var(--sell-gap); }
.sell .sell-story .gr-section-heading { margin-bottom: 1rem; }
.sell .sell-story-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 3rem; }
.sell .sell-rail { display: none; }
.sell .sell-steps { list-style: none; margin: 0; padding: 0; }
.sell .sell-step { display: grid; gap: 1.5rem; padding-block: 2.5rem 3rem; border-top: 1px solid var(--gr-cloud-border); scroll-margin-top: 6rem; }
.sell .sell-step:first-child { border-top: 0; }
.sell .sell-step-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem 2.5rem; align-content: start; }
.sell .sell-step-head { display: flex; align-items: center; gap: 1rem; }
.sell .sell-step-n { flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--gr-operator-radius-pill); display: grid; place-items: center; font-weight: 700; font-size: 1.125rem; background: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); font-variant-numeric: tabular-nums; }
.gr-public.sell .sell-step h3 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); line-height: 1.15; letter-spacing: -.03em; max-width: 24ch; }
.sell .sell-do, .sell .sell-next { font-size: 1.0625rem; line-height: 1.6; margin: 0; max-width: 44ch; }
.sell .sell-do strong, .sell .sell-next strong { display: block; margin-bottom: .2rem; font-size: .9375rem; letter-spacing: .02em; color: var(--gr-cloud-primary); font-weight: 650; }
.sell .sell-step em { font-style: normal; font-weight: 650; }
.sell .sell-lot { display: inline-block; padding: .05em .45em; border-radius: var(--gr-operator-radius-md); border: 1px solid var(--gr-cloud-control-border); background: var(--gr-cloud-bg); font: 600 .9375rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; white-space: nowrap; }
.sell .sell-shots { display: grid; gap: 1rem; min-width: 0; }
.sell .sell-shot { margin: 0; min-width: 0; }
.sell .sell-shots--pair .sell-shot:last-child { max-width: 31rem; }
.sell .sell-shot img { width: 100%; height: auto; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-border); border-radius: var(--gr-operator-radius-lg); box-shadow: var(--gr-cloud-elevation-2); }
.sell .sell-shot figcaption { margin-top: .6rem; }
.sell .sell-shot figcaption a { display: inline-block; min-height: 44px; padding-block: .6rem; font-size: 1rem; font-weight: 600; }
.sell .sell-invoice { padding: 1.25rem; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-border); border-radius: var(--gr-operator-radius-lg); box-shadow: var(--gr-cloud-elevation-2); overflow-x: auto; }
.sell .sell-invoice .gr-inv-farm { margin-bottom: 0; }

@media (min-width: 760px) {
  .sell .sell-step-text { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sell .sell-step-head { grid-column: 1 / -1; }
  .sell .sell-step--side { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: start; gap: 3rem; }
  .sell .sell-step--side .sell-step-text { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .sell .sell-story-grid { grid-template-columns: 11.5rem minmax(0, 1fr); }
  .sell .sell-step-n { display: none; }
  .sell .sell-rail { display: block; position: sticky; top: 7rem; align-self: start; margin-top: 2.5rem; }
  .sell .sell-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; position: relative; z-index: 1; }
  .sell .sell-rail a { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-size: 1rem; line-height: 1.3; text-decoration: none; color: var(--gr-cloud-muted); }
  .sell .sell-rail a:hover { text-decoration: underline; }
  .sell .sell-rail-n { flex: none; width: 1.6rem; height: 1.6rem; border-radius: var(--gr-operator-radius-pill); display: grid; place-items: center; font-size: .875rem; font-weight: 650; border: 2px solid var(--gr-cloud-control-border); background: var(--gr-cloud-surface); color: var(--gr-cloud-text); font-variant-numeric: tabular-nums; }
  .sell .sell-rail .is-active a { color: var(--gr-cloud-text); font-weight: 650; }
  .sell .sell-rail .is-active .sell-rail-n { background: var(--gr-cloud-primary); border-color: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }
  /* The line the dots sit on. Complete in the linear version; the script fills it as the story is read. */
  .sell .sell-rail-line { position: absolute; left: calc(.8rem - 1px); top: 1.375rem; bottom: 1.375rem; width: 2px; background: var(--gr-cloud-border); pointer-events: none; }
  .sell .sell-rail-fill { display: block; width: 100%; height: 100%; background: var(--gr-cloud-primary); transform-origin: top center; }
}

/* Coming later */
.sell .sell-later { padding-block: var(--sell-gap); }
.sell .sell-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem; padding: .2rem .9rem; margin: 0 0 1.25rem; border: 2px solid var(--gr-cloud-primary); border-radius: var(--gr-operator-radius-pill); font-weight: 650; font-size: .9375rem; color: var(--gr-cloud-primary); }
.sell .sell-pill::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; border: 2px solid var(--gr-cloud-primary); }
.sell .sell-later h2 { margin-bottom: 1.25rem; }
.sell .sell-later-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2rem 3rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sell .sell-later-list li { padding-top: 1.25rem; border-top: 2px solid var(--gr-cloud-primary); }
.sell .sell-later-list p { margin-top: .6rem; font-size: 1.0625rem; color: var(--gr-cloud-muted); }

/* What you grow */
.sell .sell-grow { background: var(--gr-cloud-surface-alt); padding-block: var(--sell-gap); }
.sell .sell-types-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.sell .sell-types { display: none; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; gap: .65rem; }
.sell-js .sell-types { display: flex; }
.sell .sell-types li { position: relative; }
/* The radio is visually hidden and its label is the chip, so a click or tap on the visible label selects it
   (an invisible radio laid over the label intercepted the label's own clicks). Keyboard focus still lands on the radio. */
.sell .sell-types input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; opacity: 0; }
.sell .sell-types label { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.1rem; border: 2px solid var(--gr-cloud-control-border); border-radius: var(--gr-operator-radius-pill); background: var(--gr-cloud-surface); color: var(--gr-cloud-text); font-size: 1.0625rem; font-weight: 550; line-height: 1.25; cursor: pointer; }
.sell .sell-types label:hover { border-color: var(--gr-cloud-primary); }
.sell .sell-types input:checked + label { background: var(--gr-cloud-primary); border-color: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }
.sell .sell-types input:checked + label::before { content: "\2713"; font-weight: 700; }
.sell .sell-types input:focus-visible + label { outline: 3px solid var(--gr-cloud-primary); outline-offset: 3px; }
.sell .sell-type-panels { margin-top: 1.75rem; display: grid; gap: 1rem; }
.sell .sell-type, .sell .sell-types-hint { padding: 1.4rem 1.6rem; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-border); border-left: 4px solid var(--gr-cloud-primary); border-radius: var(--gr-operator-radius-md); max-width: 46rem; }
.sell .sell-types-hint { display: none; color: var(--gr-cloud-muted); }
.sell-js .sell-types-hint { display: block; }
.sell-js .sell-types-hint[hidden] { display: none; }
.sell .sell-trace { font-weight: 650; color: var(--gr-cloud-primary); margin-bottom: .5rem; }
.sell .sell-type p + p { margin-top: .5rem; }
.sell-js .sell-nojs { display: none; }
.sell .sell-type[hidden] { display: none; }

/* Start */
.sell .sell-start { padding-block: var(--sell-gap); }
.sell .sell-start h2 { margin-bottom: 1.25rem; }
.sell .sell-start .lead { max-width: 40rem; }
.sell .sell-start .gr-fine, .sell .sell-start .gr-fine a { font-size: 1rem; }
.sell .sell-chosen { margin-top: 1.25rem; font-weight: 600; color: var(--gr-cloud-primary); }
.sell .sell-start .gr-button { margin-top: 1.5rem; padding-inline: 1.75rem; border-radius: var(--gr-operator-radius-pill); font-size: 1.125rem; }

@media (max-width: 900px) {
  .sell .sell-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2rem 3rem; }
  .sell .sell-hero-photo img { aspect-ratio: 4 / 3; }
  .sell .sell-later-list { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 760px) {
  /* Phones get their own crops of the same captures (the app's own narrow layout, taken at 360 px wide and 2x), so text keeps its size and nothing scrolls sideways. */
  .sell .sell-shot picture, .sell .sell-shot img { display: block; }
  .sell .sell-shot img { width: 100%; max-width: 26rem; }
}
@media (max-width: 600px) {
  .sell .sell-step { padding-block: 2rem; }
  .sell .sell-invoice { padding: .75rem; }
  .sell .sell-types label { font-size: 1rem; padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sell *, .sell *::before, .sell *::after { scroll-behavior: auto !important; }
}
