:root {
  --lemon: #ffe14a;
  --ink: #141414;
  --paper: #ffffff;
  --grey: #5c5a52;
  --rule: #e6e0c8;
  --red: #e0342a;
  --green: #127a45;
  --sans: "Archivo", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--lemon); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.top { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 23px; font-weight: 800; font-stretch: 115%; letter-spacing: -0.02em; color: inherit; text-decoration: none; }
.brand svg { width: 28px; height: 28px; fill: var(--ink); }
.built { font-size: 13px; font-weight: 700; color: inherit; text-decoration: none; border-bottom: 2px solid; padding-bottom: 1px; }

.stage {
  max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px 56px; align-items: start;
  grid-template-areas: "pitch bill" "talk bill";
}
.pitch { grid-area: pitch; }
.bill { grid-area: bill; }
.transcript { grid-area: talk; }

h1 { font-size: clamp(46px, 6.6vw, 88px); line-height: .9; font-weight: 800; font-stretch: 120%; letter-spacing: -0.04em; text-wrap: balance; }
.pitch p { font-size: 19px; line-height: 1.5; max-width: 44ch; margin-top: 22px; }
.play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  background: var(--ink); color: var(--lemon); border: 0; border-radius: 999px;
  padding: 16px 28px 16px 22px; font-size: 17px; font-weight: 700; transition: transform .15s;
}
.play:active { transform: scale(.97); }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.icon-stop, body:not([data-state="idle"]):not([data-state="won"]) .icon-play { display: none; }
body:not([data-state="idle"]):not([data-state="won"]) .icon-stop { display: block; }
.pitch .note { font-size: 14px; color: var(--grey); margin-top: 12px; }

/* The bill: a receipt that keeps getting cheaper */

.bill { position: sticky; top: 24px; background: var(--paper); padding: 26px 28px 34px; box-shadow: 0 36px 60px -34px rgba(90, 70, 0, .55); }
.bill::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 20px 20px repeat-x,
    linear-gradient(-135deg, var(--paper) 50%, transparent 50%) 0 0 / 20px 20px repeat-x;
}
.bill-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; padding-bottom: 16px; border-bottom: 2px dashed var(--rule); }
.company { font-weight: 800; }
.account { color: var(--grey); }
.bill-label { margin-top: 22px; font-size: 14px; color: var(--grey); }
.price { font-size: clamp(64px, 8vw, 104px); font-weight: 800; font-stretch: 125%; letter-spacing: -0.045em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; transition: color .4s; }
.price small { font-size: .3em; font-stretch: 100%; letter-spacing: 0; color: var(--grey); font-weight: 600; margin-left: 4px; }
[data-state="won"] .price { color: var(--green); }

.offers { list-style: none; padding: 0; margin-top: 18px; font-size: 15px; }
.offers li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--rule); animation: arrive .35s ease-out; }
.offers b { font-weight: 700; font-variant-numeric: tabular-nums; }
.offers .gone b { color: var(--grey); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.offers .ask { color: var(--grey); }
.offers .agreed { font-weight: 700; }
.offers .agreed b { color: var(--green); }

.phase { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.phase::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grey); flex: none; }
[data-state="holding"] .phase::before, [data-state="live"] .phase::before { background: var(--red); animation: pulse 1s ease-in-out infinite; }
[data-state="won"] .phase::before { background: var(--green); }

.saved { margin-top: 18px; background: var(--green); color: #fff; padding: 16px 18px; border-radius: 12px; animation: arrive .4s ease-out; }
.saved strong { display: block; font-size: 24px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; }
.saved span { font-size: 14px; opacity: .9; }

/* Both sides of the call */

.transcript { list-style: none; padding: 0; display: grid; gap: 10px; align-content: start; scroll-behavior: smooth; }
.transcript:empty { display: none; }
.turn { max-width: 86%; padding: 12px 16px 13px; border-radius: 18px; font-size: 16px; line-height: 1.45; animation: arrive .3s ease-out; }
.turn .who { display: block; font-size: 12px; font-weight: 700; margin-bottom: 3px; opacity: .65; }
.turn.rep { justify-self: start; background: var(--paper); border-bottom-left-radius: 6px; }
.turn.haggle { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.word { opacity: .3; transition: opacity .12s; }
.word.said { opacity: 1; }

.foot { max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--grey); border-top: 2px solid var(--ink); }
.foot a { color: var(--ink); font-weight: 700; }

@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; grid-template-areas: "pitch" "bill" "talk"; gap: 30px; }
  .bill { position: relative; top: 0; scroll-margin-top: 12px; }
  .transcript { max-height: 44vh; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .transcript { scroll-behavior: auto; }
}
