/* /discount-engine only. Builds on css/price-testing.css (same tokens and components); see README. */

/* Hero */
.de-hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: .97; letter-spacing: -.065em; }
.de-h1-line { display: block; }
.de-hero-grid { align-items: start; }
.de-hero .pt-hero-ring { display: none; }
.de-hero .pt-hero-sub { margin-bottom: 20px !important; }
.de-hero-points { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 10px; color: var(--body); font-size: .97rem; }
.de-hero-points li { display: flex; align-items: center; gap: 12px; }
.de-hero-note { margin-top: 18px !important; }
.de-demo { padding-bottom: 0; }
.de-panel { position: relative; z-index: 2; margin: 0; }
/* The receipt hangs under the walkthrough in normal flow, so it never covers the caption. */
.de-panel .pt-receipt-float { position: relative; left: auto; bottom: auto; width: 320px; max-width: 90%; margin: -8px 24px 0 auto; transform: rotate(2deg); }
.de-demo-note { position: relative; z-index: 2; width: fit-content; margin: 10px 0 0 auto !important; background: #fff; border-radius: 100px; padding: 3px 11px; font-size: .75rem; color: var(--muted); }

/* The cash on your shelves */
.de-cash { padding: clamp(72px,10vw,120px) 0; }
.de-cash-grid { align-items: start; }
.de-cash .pt-display { margin-bottom: 20px; }
.de-groups { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; }
.de-groups li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 14px; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.de-groups strong { display: block; color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; margin-bottom: 2px; }
.de-groups .de-swatch { margin-top: 5px; }
.de-swatch { display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 4px; }
.de-swatch-discount, .de-seg-discount { background: var(--ink); }
.de-swatch-hold, .de-seg-hold { background: #8a8a8a; }
.de-swatch-stop, .de-seg-stop { background: #e3e3e3; box-shadow: inset 0 0 0 1px #303030; }
.de-swatch-full, .de-seg-full { background: #fff; box-shadow: inset 0 0 0 1px #303030; }
.de-ledger { background: #fff; border-radius: 16px 16px 0 0; padding: 26px 28px 20px; box-shadow: 0 24px 60px #2022221f; font-variant-numeric: tabular-nums; }
.de-ledger-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1.5px dashed #d6d6d4; padding-bottom: 12px; font-size: .7rem; }
.de-ledger-head span:first-child { font-weight: 800; letter-spacing: .16em; color: var(--brand); }
.de-ledger-head span:last-child { color: #7c7474; }
.de-ledger-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 18px 0 16px !important; }
.de-count { font-size: clamp(3.4rem, 7vw, 5.4rem); font-weight: 900; letter-spacing: -.065em; line-height: .95; }
.de-ledger-total > span:last-child { color: var(--muted); font-weight: 600; }
.de-split { display: flex; gap: 3px; height: 16px; margin-bottom: 18px; }
.de-seg { display: block; height: 100%; border-radius: 3px; transition: flex-basis 1.2s var(--ease-cam); }
.de-seg-discount { flex: 0 0 65.07%; }
.de-seg-hold { flex: 0 0 20.04%; }
.de-seg-stop { flex: 0 0 13.78%; }
.de-seg-full { flex: 1 1 auto; min-width: 4px; }
.de-ledger-rows { margin: 0; display: grid; }
.de-ledger-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid #efecea; }
.de-ledger-rows dt { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.de-ledger-rows dd { margin: 0; display: contents; }
.de-ledger-rows dd span { grid-column: 1; padding-left: 24px; color: var(--muted); font-size: .85rem; }
.de-ledger-rows dd strong { grid-column: 2; grid-row: 1; font-size: 1.05rem; text-align: right; }
.de-ledger-sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-weight: 700; }
.de-ledger-sum strong { font-size: 1.3rem; font-weight: 850; letter-spacing: -.03em; }
.de-fine { margin-top: 10px !important; font-size: .76rem; color: var(--muted); }

/* A discount for every slow seller */
.de-section { padding: clamp(72px,10vw,120px) 0; background: var(--grey); }
.de-sort-copy { flex: 1 1 320px; max-width: 440px; min-width: 0; }
.de-suggest { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; font-variant-numeric: tabular-nums; }
.de-suggest li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid #efecea; }
.de-suggest li:first-child { border-top: 0; }
.de-suggest-name { min-width: 0; color: var(--muted); font-size: .8rem; }
.de-suggest-name strong { display: block; color: var(--ink); font-size: .95rem; letter-spacing: -.01em; }
.de-suggest-off { font-weight: 700; font-size: .88rem; white-space: nowrap; }
.de-suggest-cash { min-width: 58px; text-align: right; font-weight: 850; font-size: 1.05rem; color: var(--good); }
.de-suggest-zero { color: var(--muted); }
.de-suggest-key { margin: 10px 0 22px !important; font-size: .76rem; color: var(--muted); text-align: right; }

/* Margin guard */
.de-guard { background: #fff; }
.de-slider { padding-top: 26px; }
.de-floor-tag { position: absolute; top: 0; left: 83.4%; transform: translateX(-50%); font-size: .7rem; font-weight: 800; white-space: nowrap; color: var(--bad); }
.de-floor-tag::after { content: ""; position: absolute; left: 50%; top: 18px; width: 2px; height: 32px; background: var(--bad); }
.de-slider input { position: relative; }
.de-calc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px !important; line-height: 1; }
.de-calc-was { font-size: 1.4rem; font-weight: 700; color: #8a8a8a; text-decoration: line-through; text-decoration-thickness: 2px; }
.de-calc-now { font-size: clamp(2.8rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.06em; }
.de-calc-off { align-self: center; background: var(--grey); color: var(--ink); border-radius: 100px; padding: 4px 11px; font-size: .8rem; font-weight: 800; }
.de-calc.is-blocked .de-calc-now { color: var(--bad); }
.de-track { position: relative; height: 14px; border-radius: 7px; background: #e3e3e3; margin: 0 0 34px; }
.de-track-cost { position: absolute; left: 0; top: 0; bottom: 0; width: 52.22%; border-radius: 7px 0 0 7px; background: repeating-linear-gradient(135deg, #8a8a8a 0 4px, #b5b5b5 4px 8px); }
.de-track-sale { position: absolute; top: -5px; left: 85%; width: 4px; height: 24px; margin-left: -2px; border-radius: 2px; background: var(--good); transition: left .3s ease, background-color .3s; }
.de-calc.is-blocked .de-track-sale { background: var(--bad); }
.de-track-floor { position: absolute; top: -5px; left: 57.44%; width: 2px; height: 24px; background: var(--bad); }
.de-track-label { position: absolute; top: 22px; font-size: .7rem; font-weight: 700; white-space: nowrap; color: var(--muted); }
.de-track-label-cost { left: 0; }
.de-track-label-floor { left: 57.44%; color: var(--bad); }
.de-calc-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 20px; }
.de-mock-cancel, .de-mock-start { border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: .86rem; }
.de-mock-cancel { border: 1.5px solid #d6d6d4; }
.de-mock-start { background: var(--ink); color: #fff; transition: background-color .3s, color .3s; }
.de-calc.is-blocked .de-mock-start { background: #ebebeb; color: #8a8a8a; }
.de-guard-row { margin-top: clamp(64px,9vw,104px); }

/* You decide when it ends */
.de-ends .pt-lead { margin-bottom: 24px; }
.de-lengths { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.de-lengths span { border: 1.5px solid #d6d6d4; background: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 650; font-size: .92rem; }
.de-lengths .is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 800; }
.de-mock-end .pt-bob { left: auto; right: 6px; top: 46px; }
.de-rules { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.de-rules li { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 12px; color: var(--muted); font-size: .93rem; }
.de-rules strong { display: block; color: var(--ink); font-size: 1rem; }
.de-ends-demo { flex: none; }

/* Three jobs */
.de-jobs { background: #fff; border-top: 1px solid #efecea; }
.de-jobs .pt-loop-steps li { display: flex; flex-direction: column; gap: 6px; }
.de-jobs .pt-loop-steps strong { margin: 0; }
.de-jobs .pt-tile-link, .de-here { margin-top: auto; padding-top: 12px; }
.de-jobs .pt-loop-light { border: 1px solid var(--line); background: var(--soft); }
.de-jobs .pt-loop-dark .pt-tile-link { color: #fff; }
.de-here { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; }

/* Pricing ({{pricingDiscounts}}: the plans with Discount Engine, from site.json) */
.de-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; align-items: stretch; }
.de-plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px,3.5vw,34px); display: flex; flex-direction: column; gap: 10px; }
.de-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.de-plan-head h3 { font-size: 1.6rem; letter-spacing: -.03em; }
.de-plan .pt-tier-price { font-size: clamp(2.6rem, 5vw, 3.4rem); }
.de-plan-caption { color: var(--muted); font-size: .95rem; }
.de-plan ul { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; gap: 9px; font-size: .92rem; }
.de-plan li { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 8px; }
.de-plan li > span { font-weight: 800; color: var(--brand); }
.de-plan .de-plan-key { font-weight: 800; }
.de-plan .pt-btn { margin-top: auto; justify-content: center; box-shadow: none; padding: .85rem 1rem; }
.de-plan-trial { font-size: .82rem; color: var(--muted); text-align: center; }
.de-plan-featured { background: var(--brand); border-color: var(--brand); color: #fff; }
.de-plan-featured .pt-tier-eyebrow, .de-plan-featured .de-plan-caption, .de-plan-featured .de-plan-trial, .de-plan-featured li > span { color: #ececeb; }
.de-plans-without { margin-top: 18px !important; font-size: .9rem; color: var(--muted); }

/* Motion: only when the visitor allows it and JavaScript runs */
@media (prefers-reduced-motion: no-preference) {
  .is-enhanced .de-ledger:not(.is-in) .de-seg { flex-basis: 0%; }
}

@media (max-width: 1100px) {
  .de-sort-copy { flex-basis: 100%; max-width: none; }
}
@media (max-width: 960px) {
  .de-panel .pt-receipt-float { margin: -8px auto 0; transform: rotate(-2deg); }
  .de-demo-note { margin-left: 0 !important; }
}
@media (max-width: 560px) {
  .de-ledger { padding: 22px 18px 16px; }
  .de-suggest li { grid-template-columns: minmax(0, 1fr) auto; }
  .de-suggest-off { grid-column: 1; grid-row: 2; font-size: .8rem; color: var(--muted); }
  .de-suggest-cash { grid-row: 1 / span 2; grid-column: 2; }
  .de-floor-tag { font-size: .64rem; }
}
