:is(body.negotiation-page) {
  --ink: #17191f;
  --muted: #7c818b;
  --line: #e8e9ee;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --blue: #1389ed;
  --blue-dark: #0769c6;
  --blue-soft: #eaf5ff;
  --green: #35c759;
  --yellow: #f2b650;
  --shadow: 0 30px 80px rgba(18, 38, 19, 0.13), 0 8px 24px rgba(18, 38, 19, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.negotiation-page {
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 20%, rgba(233, 201, 119, 0.13), transparent 26rem),
    radial-gradient(circle at 88% 78%, rgba(77, 122, 72, 0.11), transparent 30rem),
    var(--bg-alt);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(440px, 1.15fr);
  min-height: calc(100vh - var(--nav-h));
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.2rem) clamp(1.25rem, 5vw, 6.5rem) 3.2rem;
  gap: clamp(2rem, 8vw, 9rem);
}

.intro-panel {
  display: flex;
  flex-direction: column;
  min-height: 740px;
  padding: 0.6rem 0 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: max-content;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  color: white;
  background: var(--green-700);
  border-radius: 50%;
  font-family: "DM Mono", monospace;
  font-size: 0.53rem;
  letter-spacing: -0.06em;
}

.brand-dot { color: var(--gold); }

.intro-copy { margin: auto 0; padding: 4rem 0 3rem; }
.negotiation-page .eyebrow {
  margin: 0 0 1.2rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.negotiation-page .intro-copy h1 {
  max-width: 570px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.85rem, 5vw, 5rem);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.negotiation-page h1 em, .negotiation-page h2 em { color: var(--gold); font-family: var(--font-serif); font-weight: 600; }
.intro-lede {
  max-width: 27rem;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.intro-stats {
  display: flex;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.intro-stats > div { flex: 1; border-right: 1px solid var(--border); padding-left: 1.1rem; }
.intro-stats > div:first-child { padding-left: 0; }
.intro-stats > div:last-child { border-right: 0; }
.intro-stats strong, .intro-stats span { display: block; }
.intro-stats strong { margin-bottom: 0.25rem; color: var(--green-700); font-family: var(--font-serif); font-size: 1.55rem; font-weight: 600; }
.intro-stats span { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.05em; text-transform: uppercase; }

.intro-footer { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; padding-top: 1.8rem; }
.kareem-mini { display: flex; align-items: center; gap: 0.7rem; }
.kareem-mini > div:last-child > * { display: block; }
.kareem-mini strong { font-size: 0.72rem; }
.kareem-mini span { margin-top: 0.22rem; color: #8d919b; font-family: "DM Mono", monospace; font-size: 0.53rem; text-transform: uppercase; }
.intro-footer > p { max-width: 12rem; margin: 0 0 0.1rem; color: #9397a0; font-size: 0.68rem; line-height: 1.4; text-align: right; }

.avatar { display: grid; place-items: center; flex: 0 0 auto; color: white; background: #1d2128; border-radius: 50%; font-family: "DM Mono", monospace; font-size: 0.6rem; font-weight: 500; letter-spacing: -0.07em; }
.avatar-kareem { background: linear-gradient(135deg, #2f3947, #10141c); }
.avatar:not(.avatar-small):not(.avatar-chat) { width: 2rem; height: 2rem; }
.avatar-small { width: 2.05rem; height: 2.05rem; font-size: 0.55rem; }
.avatar-chat { width: 1.65rem; height: 1.65rem; margin-top: auto; font-size: 0.46rem; }

.phone-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.phone-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 510px);
  height: min(900px, calc(100vh - var(--nav-h) - 3.5rem));
  min-height: 680px;
  overflow: hidden;
  background: var(--paper);
  border: 8px solid var(--green-700);
  border-radius: 2.75rem;
  box-shadow: var(--shadow);
}

.messages-bar { position: relative; z-index: 2; flex: 0 0 auto; padding: 0 1rem 0.7rem; color: var(--ink); background: rgba(248, 248, 251, 0.93); border-bottom: 1px solid rgba(207, 209, 216, 0.5); backdrop-filter: blur(18px); }
.status-row { display: flex; align-items: center; justify-content: space-between; height: 1.9rem; padding: 0 0.55rem; font-size: 0.62rem; font-weight: 700; }
.status-icons { display: inline-flex; align-items: center; gap: 0.35rem; }
.signal { width: 0.72rem; height: 0.55rem; background: linear-gradient(90deg, #1b1d22 0 18%, transparent 18% 25%, #1b1d22 25% 43%, transparent 43% 50%, #1b1d22 50% 68%, transparent 68% 75%, #1b1d22 75%); clip-path: polygon(0 100%, 0 70%, 18% 70%, 18% 100%, 27% 100%, 27% 48%, 45% 48%, 45% 100%, 54% 100%, 54% 25%, 72% 25%, 72% 100%, 81% 100%, 81% 0, 100% 0, 100% 100%); }
.wifi { font-size: 1.15rem; line-height: 0.5; transform: rotate(90deg); }
.battery { display: inline-flex; align-items: center; width: 1.35rem; height: 0.7rem; padding: 0.12rem; border: 1px solid #1b1d22; border-radius: 0.18rem; }
.battery::after { content: ""; width: 0.12rem; height: 0.3rem; margin-left: 0.1rem; background: #1b1d22; transform: translateX(0.24rem); }
.battery i { display: block; width: 78%; height: 100%; background: #1b1d22; border-radius: 0.08rem; }
.chat-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav-back, .nav-info { color: var(--blue); background: transparent; border: 0; cursor: pointer; }
.nav-back { justify-self: start; font-size: 1.7rem; line-height: 1; }
.nav-back span { display: inline-block; margin-left: -0.1rem; vertical-align: 0.1rem; font-family: "DM Mono", monospace; font-size: 0.67rem; font-weight: 500; }
.nav-info { display: grid; place-items: center; justify-self: end; width: 1.45rem; height: 1.45rem; border: 1.5px solid var(--blue); border-radius: 50%; font-family: Georgia, serif; font-size: 0.95rem; font-weight: 700; }
.contact-heading { display: flex; align-items: center; gap: 0.55rem; text-align: left; }
.contact-heading strong, .contact-heading span { display: block; }
.contact-heading strong { font-size: 0.73rem; }
.contact-heading span { margin-top: 0.12rem; color: #8d919a; font-family: "DM Mono", monospace; font-size: 0.48rem; text-transform: uppercase; }

.chat-window { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.1rem 1rem 1.5rem; scrollbar-width: thin; scrollbar-color: #d9dbe1 transparent; }
.date-stamp { margin: 0.2rem 0 1.25rem; color: #969aa3; font-family: "DM Mono", monospace; font-size: 0.53rem; text-align: center; text-transform: uppercase; letter-spacing: 0.08em; }
.message-row { display: flex; align-items: flex-end; gap: 0.45rem; margin: 0 0 0.8rem; }
.message-row.me { justify-content: flex-end; }
.message-stack { max-width: 84%; }
.message-stack.align-right { display: flex; flex-direction: column; align-items: flex-end; }
.bubble { padding: 0.78rem 0.95rem; font-size: 0.76rem; line-height: 1.5; }
.bubble p { margin: 0 0 0.55rem; }
.bubble p:last-child { margin-bottom: 0; }
.bubble-them { color: #252932; background: #e6e7eb; border-radius: 1.15rem 1.15rem 1.15rem 0.3rem; }
.bubble-me { color: white; background: var(--blue); border-radius: 1.15rem 1.15rem 0.3rem 1.15rem; }
.intro-bubble { padding: 0.85rem 1rem; }
.message-meta { display: block; margin: 0.3rem 0.15rem 0; color: #9b9fa7; font-family: "DM Mono", monospace; font-size: 0.48rem; }
.chat-list { margin: -0.15rem 0 0.55rem; padding-left: 1.05rem; }
.chat-list li { margin: 0.15rem 0; }

.script-thread { margin: 1rem 0 1.1rem; }
.thread-heading { display: flex; align-items: center; gap: 0.65rem; padding: 0.1rem 0.25rem 0.8rem 0.1rem; color: var(--text); }
.thread-heading > span { display: grid; place-items: center; flex: 0 0 auto; width: 1.7rem; height: 1.7rem; color: white; background: var(--green-700); border-radius: 50%; font-family: var(--font-mono); font-size: 0.52rem; }
.thread-heading strong, .thread-heading small { display: block; }
.thread-heading strong { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.52rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.thread-heading small { margin-top: 0.18rem; color: var(--text); font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; letter-spacing: -0.03em; }
.bubble-script { min-width: min(20rem, 100%); }
.bubble-label { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin-bottom: 0.4rem; color: rgba(255, 255, 255, 0.78); font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; }
.bubble-label .copy-button { color: var(--blue-dark); background: rgba(255, 255, 255, 0.9); }
.bubble-script p { font-size: 0.7rem; line-height: 1.5; }
.script-thread .thread-next { margin-left: 2.1rem; padding: 0.75rem 0.8rem; background: var(--panel); border: 1px solid var(--border-light); border-radius: 1rem; }
.thread-next .continue-button { padding: 0; border-top: 0; }

.step-card, .pushback-card, .mini-scripts { margin: 1rem 0 1.1rem 2.1rem; }
.step-card { padding: 1.1rem; background: var(--panel); border: 1px solid var(--border-light); border-radius: 1.25rem; box-shadow: 0 5px 15px rgba(18, 38, 19, 0.05); }
.step-kicker { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.65rem; color: #8a909a; font-family: "DM Mono", monospace; font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; }
.step-kicker span:first-child { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; color: white; background: var(--green-700); border-radius: 50%; font-size: 0.52rem; }
.step-card h2, .final-cta h2 { margin-bottom: 0.4rem; font-size: 1.43rem; letter-spacing: -0.055em; line-height: 1.05; }
.step-card > p { margin-bottom: 0.85rem; color: #707681; font-size: 0.68rem; line-height: 1.55; }
.tip-box { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.65rem 0.7rem; margin-bottom: 0.75rem; color: #7b6539; background: #fff8e8; border-radius: 0.7rem; font-size: 0.61rem; line-height: 1.4; }
.tip-box span:first-child { color: #b47e20; font-family: "DM Mono", monospace; font-size: 0.52rem; letter-spacing: 0.06em; text-transform: uppercase; }
.script-card { position: relative; padding: 0.75rem 0.8rem; margin-bottom: 0.6rem; background: var(--blue-soft); border: 1px solid #d9edfd; border-radius: 0.9rem; }
.script-card.compact { background: #f5f7fa; border-color: #e7e9ed; }
.script-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.38rem; color: var(--blue-dark); font-family: "DM Mono", monospace; font-size: 0.51rem; letter-spacing: 0.09em; text-transform: uppercase; }
.compact .script-label { color: #838995; }
.script-card p { margin: 0; font-size: 0.68rem; line-height: 1.48; }
.copy-button { padding: 0.13rem 0.35rem; color: var(--blue-dark); background: rgba(255, 255, 255, 0.65); border: 0; border-radius: 0.32rem; cursor: pointer; font-family: "DM Mono", monospace; font-size: 0.48rem; letter-spacing: 0.04em; text-transform: uppercase; transition: background 160ms, color 160ms; }
.copy-button:hover, .copy-button:focus-visible { color: white; background: var(--blue); outline: none; }
.continue-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0.75rem 0.1rem 0.1rem; color: var(--blue-dark); background: transparent; border: 0; border-top: 1px solid #edf0f4; cursor: pointer; font-size: 0.68rem; font-weight: 700; text-align: left; }
.continue-button span { font-size: 1rem; transition: transform 160ms; }
.continue-button:hover span { transform: translateX(0.2rem); }

.pushback-card { overflow: hidden; background: white; border: 1px solid #e6e8ed; border-radius: 1.15rem; }
.pushback-row { position: relative; padding: 0.82rem 0.8rem 0.88rem; border-bottom: 1px solid #eff0f3; }
.pushback-row:last-of-type { border-bottom: 0; }
.pushback-row > span { display: block; margin-bottom: 0.3rem; color: #9499a3; font-family: "DM Mono", monospace; font-size: 0.48rem; letter-spacing: 0.09em; text-transform: uppercase; }
.pushback-row strong, .pushback-row em { display: block; max-width: calc(100% - 2.7rem); font-size: 0.64rem; font-style: normal; line-height: 1.4; }
.pushback-row strong { color: #747984; font-weight: 500; }
.pushback-row em { margin-top: 0.35rem; color: var(--blue-dark); }
.pushback-row .copy-button { position: absolute; top: 0.78rem; right: 0.7rem; }
.outcome-note { padding: 0.85rem 0.8rem; background: #fbf8f1; }
.outcome-note span { color: #b18135; font-family: "DM Mono", monospace; font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; }
.outcome-note p { margin: 0.3rem 0 0; color: #766a55; font-size: 0.64rem; line-height: 1.45; }
.pushback-card .continue-button { width: calc(100% - 1.6rem); margin: 0 0.8rem; padding-bottom: 0.9rem; }

.mini-scripts { display: grid; gap: 0.65rem; }
.mini-script { padding: 0.85rem; background: white; border: 1px solid #e7e8ed; border-radius: 1rem; }
.mini-script-heading { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.mini-icon { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; color: var(--blue-dark); background: var(--blue-soft); border-radius: 50%; font-family: Georgia, serif; font-size: 0.9rem; }
.mini-script-heading strong, .mini-script-heading span { display: block; }
.mini-script-heading strong { font-size: 0.68rem; }
.mini-script-heading span { margin-top: 0.12rem; color: #9b9fa7; font-family: "DM Mono", monospace; font-size: 0.48rem; text-transform: uppercase; }
.mini-script p { margin: 0 0 0.6rem; color: #626873; font-size: 0.64rem; line-height: 1.48; }
.mini-script .copy-button { padding: 0; color: var(--blue-dark); background: transparent; }
.final-cta { margin-top: 0.3rem; padding: 1.35rem 1.1rem 1.25rem; color: white; background: var(--green-700); border-radius: 1.25rem; }
.final-cta .eyebrow { margin-bottom: 0.75rem; color: var(--gold-200); }
.final-cta h2 { margin-bottom: 0.55rem; font-size: 1.72rem; }
.final-cta h2 em { color: var(--gold-200); }
.final-cta > p:not(.eyebrow) { max-width: 18rem; margin-bottom: 1rem; color: #a7abb4; font-size: 0.68rem; line-height: 1.5; }
.cta-button { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0.85rem; color: var(--green-700); background: var(--gold-200); border-radius: 0.65rem; font-size: 0.65rem; font-weight: 700; text-decoration: none; }
.cta-button span { font-size: 1rem; }

.typing-indicator { display: flex; gap: 0.25rem; align-items: center; width: max-content; padding: 0.65rem 0.75rem; margin: 0.4rem 0 0 2.1rem; background: #e6e7eb; border-radius: 1.1rem 1.1rem 1.1rem 0.3rem; }
.typing-indicator span { width: 0.3rem; height: 0.3rem; background: #9499a2; border-radius: 50%; animation: typing 1.1s infinite ease-in-out; }
.typing-indicator span:nth-child(2) { animation-delay: 120ms; }
.typing-indicator span:nth-child(3) { animation-delay: 240ms; }
@keyframes typing { 0%, 55%, 100% { transform: translateY(0); opacity: 0.55; } 28% { transform: translateY(-0.18rem); opacity: 1; } }

.composer { display: flex; align-items: center; gap: 0.55rem; padding: 0.62rem 0.8rem 0.85rem; border-top: 1px solid #e0e2e7; background: rgba(248, 248, 251, 0.94); }
.composer-icon { display: grid; place-items: center; flex: 0 0 auto; width: 1.55rem; height: 1.55rem; color: #7c818a; background: transparent; border: 1px solid #9da1a9; border-radius: 50%; cursor: pointer; font-size: 1.15rem; line-height: 1; }
.composer-icon.mic { color: #70757e; border: 0; font-size: 0.72rem; }
.composer-input { flex: 1; padding: 0.48rem 0.7rem; color: #a5a8b0; border: 1px solid #d4d6dc; border-radius: 1rem; font-size: 0.68rem; }
.home-indicator { position: absolute; bottom: 0.42rem; left: 50%; width: 6rem; height: 0.2rem; background: #1b1d22; border-radius: 1rem; transform: translateX(-50%); }
.stage-caption { display: flex; align-items: center; gap: 0.42rem; margin: 1rem 0 0; color: #8e939d; font-family: "DM Mono", monospace; font-size: 0.54rem; letter-spacing: 0.02em; }
.caption-dot { width: 0.36rem; height: 0.36rem; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(53, 199, 89, 0.14); }

.hidden { display: none !important; }
.reveal { animation: rise 500ms both cubic-bezier(0.2, 0.8, 0.2, 1); }
.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 180ms; }
.delay-3 { animation-delay: 260ms; }
@keyframes rise { from { opacity: 0; transform: translateY(0.7rem); } to { opacity: 1; transform: translateY(0); } }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 10; padding: 0.65rem 0.9rem; color: white; background: #22252c; border-radius: 2rem; box-shadow: 0 10px 25px rgba(0,0,0,0.2); font-family: "DM Mono", monospace; font-size: 0.58rem; opacity: 0; pointer-events: none; transform: translate(-50%, 1rem); transition: opacity 180ms, transform 180ms; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .page-shell { grid-template-columns: minmax(250px, 0.8fr) minmax(400px, 1.2fr); gap: 2.5rem; padding-inline: 2rem; }
  .negotiation-page .intro-copy h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
}

@media (max-width: 760px) {
  .negotiation-page { background: var(--paper); }
  .page-shell { display: block; min-height: 0; padding: calc(var(--nav-h) + 1.25rem) 0 2rem; }
  .intro-panel { display: none; }
  .phone-stage { display: block; padding: 0 1rem; }
  .phone-frame { width: 100%; height: calc(100svh - var(--nav-h) - 3rem); min-height: 620px; border: 6px solid var(--green-700); border-radius: 2rem; box-shadow: var(--shadow); }
  .messages-bar { padding-inline: 1rem; }
  .chat-window { padding-inline: 0.95rem; }
  .stage-caption { display: none; }
  .home-indicator { display: none; }
}

@media (min-width: 761px) and (max-height: 800px) {
  .phone-frame { height: calc(100vh - var(--nav-h) - 2rem); min-height: 610px; }
}
