/* ==========================================================
   REDEN AI · DEMO PAGE STYLES
========================================================== */

.demo-body { background: var(--cream); }

.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); background: var(--accent); }

/* ----- HEAD ----- */
.demo-head {
  padding: 130px var(--gut) 50px;
  max-width: var(--max);
  margin: 0 auto;
}
.demo-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 30px;
}
.dm-tag { color: var(--accent); }
.dm-back { transition: color 0.3s; }
.dm-back:hover { color: var(--ink); }

.demo-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 30px;
}
.demo-title em { font-style: italic; color: var(--accent); }

.demo-sub {
  max-width: 60ch;
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 50px;
}

/* ----- TABS ----- */
.demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
@media (max-width: 800px) { .demo-tabs { grid-template-columns: 1fr; } }

.dt-btn {
  background: var(--cream);
  border: 0;
  padding: 22px 24px;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 4px;
  cursor: pointer;
  font-family: var(--sans);
  position: relative;
  transition: background 0.3s, color 0.3s;
}
.dt-btn:hover { background: var(--cream-2); }
.dt-btn.active {
  background: var(--ink);
  color: var(--cream);
}
.dt-num {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  font-weight: 300;
  color: var(--accent);
}
.dt-btn.active .dt-num { color: var(--accent); }
.dt-label {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.dt-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.dt-btn.active .dt-meta { color: var(--ink-faint); }

/* ----- PANEL HOST ----- */
.demo-panel {
  display: none;
  padding: 60px var(--gut) 100px;
  max-width: var(--max);
  margin: 0 auto;
  animation: panel-in 0.6s cubic-bezier(0.2,0.8,0.2,1);
}
.demo-panel.active { display: block; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   PANEL 1 — COMMERCE
========================================================== */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 1000px) { .panel-grid { grid-template-columns: 1fr; gap: 40px; } }

.panel-info {
  position: sticky;
  top: 120px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.panel-info h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  line-height: 1;
}
.panel-info h3 em { font-style: italic; color: var(--accent); }
.info-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.info-row span { color: var(--ink-mute); text-transform: uppercase; }
.info-row em { font-style: normal; color: var(--ink); }

.info-block {
  margin-top: 24px;
  padding: 24px;
  background: var(--cream-2);
  border: 1px solid var(--line);
}
.info-block h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
  font-weight: 500;
}
.info-block ol {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid; gap: 8px;
}
.info-block li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px 1fr;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.info-block li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  align-self: baseline;
  padding-top: 2px;
}

.info-callout {
  margin-top: 20px;
  display: flex; align-items: baseline; gap: 14px;
  padding: 20px 24px;
  background: var(--ink);
  color: var(--cream);
}
.info-callout strong {
  font-family: var(--serif);
  font-style: italic;
  font-size: 56px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}
.info-callout span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* phone */
.phone-wrap {
  display: grid;
  place-items: center;
  position: relative;
  padding: 30px 0 80px;
}
.phone-large {
  width: 360px;
  background: #0c0a07;
  border-radius: 44px;
  padding: 14px;
  box-shadow:
    0 50px 100px -30px rgba(22, 20, 16, 0.45),
    0 0 0 1px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 24px;
  background: #0c0a07;
  border-radius: 0 0 16px 16px;
  z-index: 5;
}
.phone-bar {
  display: flex; justify-content: space-between;
  padding: 12px 24px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: #c9c2b3;
}
.bar-icons em { font-style: normal; }

.phone-app-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px 12px;
  background: #ece5d4;
  border-bottom: 1px solid var(--line);
  border-radius: 30px 30px 0 0;
  margin: 0 -2px;
}
.phone-app-bar .back, .phone-app-bar .call {
  font-size: 18px; color: var(--accent); cursor: pointer;
}
.appbar-id { display: flex; gap: 10px; align-items: center; }
.appbar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #b04a1f, #6e2810);
  color: var(--cream);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}
.appbar-name { font-weight: 500; font-size: 13px; color: var(--ink); }
.appbar-state { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); }

.chat-thread {
  background: #ece5d4;
  padding: 18px 14px 8px;
  display: grid; gap: 8px;
  max-height: 540px;
  overflow-y: auto;
  scrollbar-width: thin;
  margin: 0 -2px;
}
.chat-day {
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
  color: var(--ink-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 4px 0 8px;
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.msg.in {
  background: #fff;
  border-bottom-left-radius: 4px;
  justify-self: start;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.msg.out {
  background: var(--accent);
  color: var(--cream);
  border-bottom-right-radius: 4px;
  justify-self: end;
}
.msg.out.card {
  padding: 8px;
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  width: 80%;
  align-items: center;
}
.card-photo {
  grid-row: 1 / span 2;
  width: 70px; height: 80px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #c9a96b 0%, #6e5a3a 60%, #3d2f1d 100%);
  position: relative;
}
.card-photo::after {
  content: ""; position: absolute; inset: 12% 25% auto 25%; height: 12%;
  background: rgba(255,255,255,0.18);
}
.card-info { display: grid; gap: 1px; }
.card-info strong { font-size: 12px; }
.card-info span { font-size: 10px; opacity: 0.85; }
.card-info em { font-style: normal; font-weight: 500; font-size: 12px; margin-top: 4px; }
.card-tags {
  grid-column: 1 / -1;
  display: flex; gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.card-tags span {
  padding: 3px 7px;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  opacity: 0.7;
}
.card-tags .hot {
  background: rgba(255,255,255,0.85);
  color: var(--accent);
  opacity: 1;
  font-weight: 500;
}

.fit-bar {
  margin-top: 10px;
  display: grid; gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
}
.fb-row {
  display: grid;
  grid-template-columns: 16px 1fr 30px;
  gap: 8px;
  align-items: center;
  opacity: 0.7;
}
.fb-row.best { opacity: 1; font-weight: 500; }
.fb-track {
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.fb-track i {
  display: block; height: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: width 1s ease;
}
.fb-row em { font-style: normal; text-align: right; }

.msg.out.checkout {
  width: 80%;
  padding: 14px;
  display: grid; gap: 6px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.co-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}
.co-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.co-row em { font-style: normal; font-weight: 500; }
.co-row.total {
  border-top: 1px dashed rgba(255,255,255,0.3);
  padding-top: 6px;
  margin-top: 4px;
  font-weight: 500;
}
.co-pay {
  display: grid; gap: 6px; margin-top: 8px;
}
.co-pay .pay {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  border: 0;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s;
}
.co-pay .pay:hover { transform: translateY(-1px); }
.co-pay .pay.alt { background: rgba(255,255,255,0.18); color: var(--cream); }

.msg.out.tick {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  background: var(--ink);
}
.tick-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #4ec47a;
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.msg.out.tick strong { display: block; font-size: 13px; }
.msg.out.tick span { font-size: 11px; opacity: 0.7; display: block; }

.typing {
  background: #fff;
  padding: 10px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  justify-self: start;
  display: flex; gap: 4px;
}
.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: type-bounce 1.4s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes type-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 14px;
  background: #ece5d4;
  border-radius: 0 0 30px 30px;
  margin: 0 -2px -2px;
}
.ci-plus { font-size: 22px; color: var(--ink-mute); }
.ci-field {
  background: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-mute);
}
.ci-send {
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--cream);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
}

.phone-floor {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 30px;
  background: radial-gradient(closest-side, rgba(22,20,16,0.18), transparent);
}

/* ==========================================================
   PANEL 2 — STYLE AI (clean redesign · sizer + outfit quiz)
========================================================== */
.sty-app {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  filter: drop-shadow(0 30px 70px rgba(22,20,16,0.16));
}

.sty-view { animation: sty-in 0.45s cubic-bezier(0.2,0.8,0.2,1); }
.sty-view[hidden] { display: none; }
@keyframes sty-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sty-back {
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 18px;
  transition: color 0.2s;
}
.sty-back:hover { color: var(--ink); }

.sty-head { margin-bottom: 32px; }
.sty-head h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.sty-head h3 em { font-style: italic; color: var(--accent); }
.sty-head p {
  max-width: 50ch;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}

/* ----- mode picker ----- */
.sty-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 720px;
}
.sty-mode {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 4px;
  text-align: left;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 26px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.sty-mode:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.sty-mode:active { transform: scale(0.98); }
.sm-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  font-weight: 300;
  color: var(--accent);
}
.sm-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.sm-meta {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sty-mode:hover .sm-meta { color: var(--ink-faint); }
.sm-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 22px;
  color: var(--ink-mute);
  transition: transform 0.2s, color 0.2s;
}
.sty-mode:hover .sm-arrow { color: var(--accent); transform: translateX(4px); }

/* ----- form (sizer) ----- */
.sty-form {
  display: grid;
  gap: 18px;
  max-width: 520px;
}
.sf-row {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  gap: 14px;
  align-items: center;
}
.sf-row label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sf-row label em { font-style: normal; color: var(--ink-faint); margin-left: 4px; }
.sf-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
}
.sf-select {
  grid-column: 2 / -1;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.sf-select:focus { border-color: var(--accent); }
.sf-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--cream-2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.sf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}
.sf-range::-webkit-slider-thumb:active {
  transform: scale(1.15);
  background: var(--accent);
}
.sf-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cream);
  cursor: pointer;
}
.sf-pill {
  grid-column: 2 / -1;
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.sf-pill span {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 10px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sf-pill span:hover:not(.active) { background: var(--cream-2); color: var(--ink); }
.sf-pill .active { background: var(--ink); color: var(--cream); }

.sty-cta {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 16px;
  background: var(--ink);
  color: var(--cream);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}
.sty-cta:hover { background: var(--accent); }
.sty-cta:active { transform: scale(0.98); }
.sty-cta:disabled { background: var(--ink-mute); cursor: wait; }
.sty-cta-alt { background: var(--accent); }
.sty-cta-alt:hover { background: var(--ink); }
.sty-cta-link {
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sty-cta-link:hover { color: var(--ink); }

/* ----- result card (size + outfit share this shell) ----- */
.sty-result {
  margin-top: 36px;
  padding: 24px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 720px;
  display: grid; gap: 18px;
  animation: sty-in 0.4s cubic-bezier(0.2,0.8,0.2,1);
}
.sty-result[hidden] { display: none; }
.sr-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sr-head em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  font-weight: 300;
}
.sr-body {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: center;
}
.sr-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 80px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  text-align: center;
}
.sr-meta { display: grid; gap: 6px; }
.sr-meta strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.sr-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.sr-meta em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-top: 4px;
}

/* ----- WhatsApp-style Style AI chat ----- */
.sty-chat-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ece5d4;
  border: 1px solid var(--line);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px 8px 0 0;
}
.sm-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b04a1f, #6e2810);
  color: var(--cream);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
}
.sty-chat-id strong {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  display: block;
  letter-spacing: 0;
}
.sty-chat-id em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
#sty-reset {
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  font-size: 18px;
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}
#sty-reset:hover { transform: rotate(-30deg); }

.sty-chat {
  max-width: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px 14px;
  min-height: 440px;
  max-height: 60vh;
  overflow-y: auto;
  background: #ece5d4;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* Persistent input bar (WhatsApp-style) */
.sty-input {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 12px;
  background: #ece5d4;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.sty-input-plus {
  font-size: 22px;
  color: var(--ink-mute);
  padding: 0 4px;
  user-select: none;
}
#sty-msg {
  background: #fff;
  border: 0;
  border-radius: 22px;
  padding: 11px 16px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  min-width: 0;
  transition: opacity 0.2s;
}
#sty-msg::placeholder { color: var(--ink-mute); }
#sty-msg:disabled { opacity: 0.6; background: rgba(255,255,255,0.7); }
.sty-input-send {
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.15s, background 0.2s;
  flex-shrink: 0;
}
.sty-input-send:hover:not(:disabled) { background: #1da851; }
.sty-input-send:active { transform: scale(0.92); }
.sty-input-send:disabled { background: #b8c1c5; cursor: not-allowed; }

@keyframes sm-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sm-msg {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  animation: sm-in 0.3s cubic-bezier(0.2,0.8,0.2,1);
  box-sizing: border-box;
  box-shadow: 0 1px 0.5px rgba(11,20,26,0.13);
}
.sm-in {
  background: #fff;
  color: var(--ink);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.sm-out {
  background: var(--accent);
  color: var(--cream);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-family: var(--sans);
}
.sm-rich {
  max-width: 92%;
  padding: 12px;
  align-self: stretch;
  background: var(--cream-2);
}
.sm-typing {
  display: flex; gap: 4px;
  padding: 11px 16px;
  width: fit-content;
  background: #fff;
}
.sm-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: sm-dot 1.3s infinite;
}
.sm-typing span:nth-child(2) { animation-delay: 0.2s; }
.sm-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sm-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Inline action buttons (under an agent message) */
.sm-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-left: 6px;
  animation: sm-in 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.sm-btn {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.sm-btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.sm-btn:active { transform: scale(0.97); }
.sm-btn:disabled { opacity: 0.4; cursor: default; }
.sm-btn.picked {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
  opacity: 1;
}
.sm-btn-primary {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
}
.sm-btn-primary:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.sm-btn-ghost {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 10px 12px;
}
.sm-btn-ghost:hover:not(:disabled) { background: transparent; color: var(--ink); }

/* Colors form (inline) — kept for backwards compat */
.sm-colorform {
  display: flex; flex-direction: column; gap: 10px;
  margin-left: 6px;
  animation: sm-in 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.sm-palette {
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* Inline palette strip in WhatsApp-style chat thread */
.sm-palette-strip {
  display: flex; flex-wrap: wrap; gap: 5px;
  align-self: flex-start;
  max-width: 92%;
  background: rgba(255,255,255,0.6);
  padding: 8px 10px;
  border-radius: 10px;
  animation: sm-in 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.sm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 6px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sm-chip:hover:not(:disabled) { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.sm-chip.picked { background: var(--accent); color: var(--cream); border-color: var(--accent); }
.sm-chip:disabled { opacity: 0.5; cursor: default; }
.sm-chip .sq-swatch { width: 14px; height: 14px; }
.sm-inputrow {
  display: flex; gap: 8px;
  align-items: center;
}
.sm-input {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 11px 16px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.sm-input:focus { border-color: var(--accent); }
.sm-input:disabled { opacity: 0.5; }
.sm-send {
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cream);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.sm-send:hover:not(:disabled) { background: var(--ink); }
.sm-send:active { transform: scale(0.92); }
.sm-send:disabled { opacity: 0.4; cursor: default; }

/* Size result card (sizer flow) */
.sm-sizecard {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  align-items: center;
}
.sm-sizeletter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 64px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  text-align: center;
}
.sm-sizemeta { display: grid; gap: 4px; }
.sm-sizemeta strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.sm-sizemeta span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sm-sizemeta em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-top: 4px;
}

/* Outfit (rich) bubble */
.sm-outfit { display: grid; gap: 12px; }
.sm-outfit-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.sm-outfit-head em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--accent);
}
.sm-cards {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* ----- outfit cards ----- */
.sty-outfit { max-width: 720px; }
.sty-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.so-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  display: grid; gap: 10px;
}
.so-img {
  height: 130px;
  width: 100%;
  border-radius: 4px;
  background: #f7f4ee;
  object-fit: contain;
  display: block;
}
img.so-img { padding: 6px; box-sizing: border-box; }
/* Swatch palette (used by .sw-{color} on product images and quiz chips) */
.sw-black,    .sq-sw-black    { background: linear-gradient(135deg, #3a342a, #14110d); }
.sw-white,    .sq-sw-white    { background: linear-gradient(135deg, #f7f1e6, #d8cdb6); }
.sw-navy,     .sq-sw-navy     { background: linear-gradient(135deg, #2c3a55, #0f1830); }
.sw-grey,     .sq-sw-grey     { background: linear-gradient(135deg, #9c9c9c, #535353); }
.sw-charcoal, .sq-sw-charcoal { background: linear-gradient(135deg, #4a4a4a, #1f1f1f); }
.sw-cream,    .sq-sw-cream,
.sw-off-white, .sq-sw-off-white { background: linear-gradient(135deg, #f4ebd9, #c8b994); }
.sw-beige,    .sq-sw-beige    { background: linear-gradient(135deg, #d8c8a8, #a98a4a); }
.sw-olive,    .sq-sw-olive    { background: linear-gradient(135deg, #8a8c4a, #4a4a22); }
.sw-tan,      .sq-sw-tan      { background: linear-gradient(135deg, #c4a679, #7e5d34); }
.sw-brown,    .sq-sw-brown,
.sw-cognac,   .sq-sw-cognac   { background: linear-gradient(135deg, #b88758, #5e3919); }
.sw-sand,     .sq-sw-sand     { background: linear-gradient(135deg, #ece1c8, #c8b994); }
.sw-rust,     .sq-sw-rust     { background: linear-gradient(135deg, #c46a3a, #6d3819); }
.sw-khaki,    .sq-sw-khaki    { background: linear-gradient(135deg, #b8a070, #6d5934); }
.sw-pink,     .sq-sw-pink     { background: linear-gradient(135deg, #f0c8c8, #c47888); }
.sw-blue,     .sq-sw-blue     { background: linear-gradient(135deg, #5d7fa0, #2e4a6c); }
.sw-red,      .sq-sw-red      { background: linear-gradient(135deg, #d04545, #7a1d1d); }
.sw-neutral,  .sq-sw-neutral  { background: linear-gradient(135deg, #d8c4a3, #8a6e44); }

/* Colors quiz step */
.sq-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.sq-text {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sq-text:focus { border-color: var(--accent); }
.sq-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 22px;
}
.sq-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sq-chip:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.sq-chip.picked { background: var(--accent); color: var(--cream); border-color: var(--accent); }
.sq-swatch {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.sq-next { width: 100%; }
.so-role {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.so-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.so-meta {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
}
.so-meta em { font-style: normal; color: var(--ink); font-weight: 500; }

.sty-rationale {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(176, 74, 31, 0.04);
  border-radius: 0 4px 4px 0;
}

.sty-actions {
  display: grid;
  gap: 4px;
  align-items: center;
  justify-items: stretch;
}

/* ==========================================================
   PANEL 3 — OPS
========================================================== */
.ops-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--ink);
  border-radius: 6px;
  overflow: hidden;
  min-height: 720px;
  color: var(--cream);
  box-shadow: 0 40px 80px -30px rgba(22,20,16,0.5);
}
@media (max-width: 1000px) {
  .ops-app { grid-template-columns: 1fr; }
}

.ops-rail {
  background: #100e0a;
  padding: 28px 22px;
  border-right: 1px solid rgba(243,237,226,0.06);
  display: grid; align-content: start; gap: 24px;
}
.ops-rail-stamp {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}
.ops-rail h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.01em;
}
.ops-rail p {
  font-size: 12px;
  color: var(--ink-faint);
  margin: 4px 0 0;
}
.ops-rail-block { display: grid; gap: 8px; }
.ops-rail-block h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 4px;
  font-weight: 500;
}
.ops-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 9px 12px;
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.06);
  border-radius: 999px;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.ops-chip:hover {
  background: rgba(176, 74, 31, 0.15);
  border-color: var(--accent);
}

.ops-stack {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px;
}
.ops-stack li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 0;
}
.ops-stack li span {
  width: 18px; height: 18px;
  background: rgba(243,237,226,0.06);
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 9px;
  color: var(--accent);
  font-weight: 500;
}

.ops-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #161410;
  min-width: 0;
}

.ops-stage-head {
  padding: 18px 28px;
  border-bottom: 1px solid rgba(243,237,226,0.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.osh-id { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.osh-dot {
  width: 8px; height: 8px;
  background: #4ec47a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(78, 196, 122, 0.18);
}
.osh-id em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-left: 8px;
}
.osh-stats { display: flex; gap: 20px; }
.osh-stats span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.osh-stats em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--cream);
  display: block;
  margin-bottom: 2px;
}

.ops-stage-thread {
  padding: 28px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  max-height: 540px;
}

.om {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}
.om.out {
  background: var(--accent);
  color: var(--cream);
  border-bottom-right-radius: 4px;
  justify-self: end;
  font-family: var(--sans);
}
.om.in {
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.06);
  border-bottom-left-radius: 4px;
  justify-self: start;
  width: 90%;
  display: grid; gap: 10px;
}
.om.in.tight { display: block; padding: 10px 14px; font-size: 12.5px; width: auto; }
.om.in.tight strong { color: var(--accent); font-weight: 500; }

.om-head {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.om-head strong { color: var(--accent); font-weight: 500; }
.om-head span { color: var(--ink-faint); }

.om-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(243,237,226,0.08);
  border: 1px solid rgba(243,237,226,0.08);
}
@media (max-width: 800px) { .om-grid { grid-template-columns: repeat(2, 1fr); } }

.ot {
  background: #100e0a;
  padding: 12px;
  display: grid; gap: 2px;
}
.ot span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.ot em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: -0.01em;
}
.ot i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  color: #4ec47a;
}

.om-spark {
  margin-top: 4px;
  padding: 12px;
  background: rgba(243,237,226,0.03);
  border-radius: 6px;
}
.om-spark svg { width: 100%; height: 50px; display: block; }
.om-spark-cap {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.om-diff {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 4px 12px;
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(243,237,226,0.03);
  padding: 8px 10px;
  border-radius: 4px;
}
.om-diff span { color: var(--ink-faint); letter-spacing: 0.1em; text-transform: uppercase; }
.om-diff em { color: var(--cream); font-style: normal; }

.om-list { display: grid; gap: 6px; }
.ol-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(243,237,226,0.03);
  border-radius: 4px;
  font-size: 12px;
  align-items: center;
}
.ol-row em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
}
.ol-row i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
}
.ol-row i.bad { background: rgba(176, 74, 31, 0.25); color: var(--accent); }
.ol-row i.warn { background: rgba(169, 138, 58, 0.2); color: #d4b766; }
.om-foot {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

.ops-stage-input {
  padding: 16px 28px;
  border-top: 1px solid rgba(243,237,226,0.06);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.ops-stage-input > span:first-child,
.osi-prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
}
.osi-field {
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.06);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.osi-mic { font-size: 16px; opacity: 0.7; }

/* Live ops input */
.ops-stage-input.live .osi-input {
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.08);
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--cream);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.ops-stage-input.live .osi-input:focus { border-color: var(--accent); }
.ops-stage-input.live .osi-input::placeholder { color: var(--ink-faint); }
.ops-stage-input.live .osi-send {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cream);
  font-size: 14px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.1s;
}
.ops-stage-input.live .osi-send:hover { background: #c45727; }
.ops-stage-input.live .osi-send:active { transform: scale(0.92); }
.ops-stage-input.live .osi-send:disabled { background: rgba(243,237,226,0.1); cursor: not-allowed; }

.ops-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 9px 12px;
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.06);
  border-radius: 999px;
  color: var(--cream);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
  display: block;
}
.ops-chip:hover {
  background: rgba(176, 74, 31, 0.18);
  border-color: var(--accent);
}

.om-day {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin: 6px 0;
  opacity: 0.7;
}

.om-typing {
  align-self: start;
  background: rgba(243,237,226,0.04);
  border: 1px solid rgba(243,237,226,0.06);
  padding: 12px 16px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: flex; gap: 4px;
  width: fit-content;
}
.om-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  animation: typing-pulse 1.4s infinite;
}
.om-typing span:nth-child(2) { animation-delay: 0.2s; }
.om-typing span:nth-child(3) { animation-delay: 0.4s; }

.om.error { background: rgba(176, 74, 31, 0.15) !important; color: var(--accent) !important; border-color: var(--accent) !important; }

/* Style AI: SKU select + native range slider */
.sa-sku-select {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--accent);
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  padding: 0 4px 1px;
  outline: none;
}
.sa-sku-select:focus { border-bottom-style: solid; }

.sc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--cream-2);
  border-radius: 3px;
  outline: none;
  margin: 0;
  cursor: pointer;
}
.sc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
  transition: transform 0.1s;
}
.sc-range::-webkit-slider-thumb:active { transform: scale(1.15); background: var(--accent); }
.sc-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cream);
  cursor: pointer;
}

/* Fit pill — make spans look like buttons (cursor + hover) */
.sc-pill span { transition: background 0.15s, color 0.15s; }
.sc-pill span:hover:not(.active) { background: var(--cream-2); color: var(--ink); }

/* ==========================================================
   CTA STRIP
========================================================== */
.demo-cta-strip {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(50px, 8vw, 80px) var(--gut);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.demo-cta-strip::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 500px; height: 500px;
  background: radial-gradient(closest-side, rgba(176, 74, 31, 0.18), transparent);
}
.dcs-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  position: relative;
  max-width: 18ch;
}
.dcs-text em { font-style: italic; color: var(--accent); }
.demo-cta-strip .btn {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.demo-cta-strip .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
}


/* ==========================================================
   LIVE CHATBOT — interactive commerce panel
========================================================== */
.chat-input.live {
  background: #f0f2f5;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-input.live #chat-field {
  flex: 1;
  background: #fff;
  border: 0;
  border-radius: 22px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.chat-input.live #chat-field::placeholder { color: var(--ink-mute); }
.chat-input.live .ci-send-btn {
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.15s, background 0.2s;
}
.chat-input.live .ci-send-btn:hover { background: #1da851; }
.chat-input.live .ci-send-btn:active { transform: scale(0.92); }
.chat-input.live .ci-send-btn:disabled { background: #b8c1c5; cursor: not-allowed; }

.suggest-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.suggest {
  text-align: left;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
}
.suggest:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.info-callout.dev {
  background: #1a1a1a;
  color: #e8e0d0;
  padding: 14px 16px;
}
.info-callout.dev strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 6px;
  font-weight: 500;
}
.info-callout.dev span {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: #c8bfae;
}
.info-callout.dev code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 2px;
  color: #e8e0d0;
}

.reset-btn {
  margin-top: 4px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s;
}
.reset-btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

#bot-status { color: #1a8e4a; }
#bot-latency, #bot-msgs, #bot-endpoint { font-family: var(--mono); font-size: 11px; }

/* typing indicator */
.typing-bubble {
  align-self: flex-start;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 4px 0;
  box-shadow: 0 1px 0.5px rgba(11,20,26,0.13);
}
.typing-bubble span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: typing-pulse 1.4s infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.msg.error {
  background: #fef0eb !important;
  color: #b04a1f !important;
  border: 1px solid #e8b09a;
}


/* ==========================================================
   MOBILE — Demo page usability pass
========================================================== */
@media (max-width: 720px) {
  /* ----- HERO + SECTION PADDING ----- */
  .demo-head { padding: 90px 18px 24px; }
  .demo-title { font-size: clamp(48px, 13vw, 72px); margin-bottom: 18px; }
  .demo-sub { font-size: 14px; line-height: 1.5; margin-bottom: 28px; }
  .demo-meta { font-size: 10px; margin-bottom: 18px; }
  .demo-panel { padding: 24px 14px 60px; }

  /* ----- TABS — horizontal scroll strip ----- */
  .demo-tabs {
    grid-template-columns: none !important;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-radius: 8px;
    background: transparent;
    gap: 8px;
    padding: 0;
  }
  .demo-tabs::-webkit-scrollbar { display: none; }
  .dt-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: 70vw;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
  }
  .dt-num { font-size: 22px; }
  .dt-label { font-size: 18px; }
  .dt-meta { font-size: 9px; }

  /* ----- PANEL GRID — phone first, then info ----- */
  .panel-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .panel-info {
    position: static !important;
    top: auto !important;
    gap: 12px;
    order: 2; /* push under phone */
  }
  .phone-wrap { order: 1; padding: 8px 0 0 !important; }

  /* ----- INFO / SUGGEST LIST ----- */
  .info-block { padding: 16px; margin-top: 0; }
  .info-block h5 { margin-bottom: 10px; }
  .suggest-list { gap: 6px; }
  .suggest {
    font-size: 13px !important;
    padding: 11px 13px !important;
    line-height: 1.35;
    border-radius: 6px;
  }
  .info-callout.dev { display: none; }   /* hide developer note on phone */
  .reset-btn { width: 100%; padding: 12px 14px; font-size: 11px; }

  /* ----- PHONE FRAME ----- */
  .phone-large {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 22px !important;
    padding: 6px !important;
    box-shadow: 0 18px 40px -18px rgba(22,20,16,0.35) !important;
  }
  .phone-notch { display: none !important; }
  .phone-floor { display: none !important; }
  .phone-bar { padding: 8px 18px 6px; font-size: 10px; }
  .phone-app-bar {
    padding: 8px 12px 10px;
    border-radius: 18px 18px 0 0;
  }
  .appbar-avatar { width: 30px; height: 30px; font-size: 14px; }
  .appbar-name { font-size: 13px; }
  .appbar-state { font-size: 9px; }

  .chat-thread {
    max-height: 58vh !important;
    padding: 12px 10px 4px !important;
  }
  .msg { max-width: 86% !important; font-size: 14px !important; padding: 9px 13px; }

  /* ----- CHAT INPUT — thumb-friendly ----- */
  .chat-input.live {
    padding: 8px 10px 10px !important;
    border-radius: 0 0 18px 18px !important;
  }
  .chat-input.live #chat-field {
    font-size: 16px !important;   /* prevents iOS zoom-on-focus */
    padding: 11px 14px !important;
  }
  .chat-input.live .ci-send-btn {
    width: 40px !important; height: 40px !important;
    font-size: 18px;
  }

  /* ----- STYLE AI PANEL (chat-only) ----- */
  .sty-app { max-width: 100%; }
  .sty-chat-head { padding: 12px 14px; }
  .sty-chat-head strong { font-size: 16px; }
  .sm-avatar { width: 34px; height: 34px; font-size: 18px; }
  #sty-reset { width: 32px; height: 32px; font-size: 14px; }
  .sty-chat { padding: 14px 12px 16px; min-height: 360px; }

  /* chat thread */
  .sty-chat { max-width: 100%; padding: 4px 0 12px; }
  .sm-msg { font-size: 14px; padding: 10px 14px; max-width: 92%; }
  .sm-rich { padding: 12px; }
  .sm-btn { font-size: 13px; padding: 9px 14px; }
  .sm-input { font-size: 16px; padding: 10px 14px; }
  .sm-palette { gap: 5px; }
  .sm-chip { font-size: 10px; padding: 5px 9px 5px 5px; }
  .sm-chip .sq-swatch { width: 12px; height: 12px; }

  .sty-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sm-cards { grid-template-columns: 1fr 1fr; }
  .so-img { height: 100px; }
  .so-name { font-size: 14px; }
  .sty-rationale { font-size: 13px; padding: 10px 12px; }

  /* ----- OPS PANEL ----- */
  .ops-app { min-height: 0 !important; border-radius: 8px; }
  .ops-rail {
    border-right: 0 !important;
    border-bottom: 1px solid rgba(243,237,226,0.08);
    padding: 18px 16px !important;
    gap: 16px !important;
  }
  .ops-rail-head h4 { font-size: 22px; }
  .ops-rail-block h5 { font-size: 9px; }
  .ops-chip { font-size: 11px !important; padding: 8px 10px !important; }

  .ops-stage-head {
    padding: 14px 16px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .osh-id { font-size: 12px; flex-wrap: wrap; }
  .osh-id em { margin-left: 0; font-size: 9px; width: 100%; }
  .osh-stats { gap: 14px; flex-wrap: wrap; }
  .osh-stats em { font-size: 16px; }

  .ops-stage-thread { padding: 16px !important; max-height: 480px; }
  .om { font-size: 13px; padding: 10px 13px; }
  .om.in { width: auto; max-width: 92%; padding: 12px 14px; }
  .om.out { max-width: 86%; }
  .om-grid { grid-template-columns: 1fr 1fr !important; gap: 1px !important; }
  .ot { padding: 10px !important; }
  .ot em { font-size: 16px; }
  .ol-row { grid-template-columns: 1fr auto; gap: 6px; font-size: 11px; }
  .ol-row em { grid-column: 1 / -1; font-size: 9px; }

  .ops-stage-input { padding: 12px 14px !important; }
  .ops-stage-input > span:first-child,
  .osi-prompt { font-size: 18px; }
  .osi-field { font-size: 11px; padding: 9px 14px; }
  .ops-stage-input.live .osi-input { font-size: 16px !important; padding: 11px 16px !important; }
  .ops-stage-input.live .osi-send { width: 40px !important; height: 40px !important; }

  /* ----- CTA STRIP ----- */
  .demo-cta-strip {
    padding: 50px 18px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .dcs-text { font-size: 28px; max-width: none; }
  .demo-cta-strip .btn { justify-content: center; }

  /* ----- TOUCH HYGIENE ----- */
  .ops-chip, .suggest, .seg, .dt-btn { touch-action: manipulation; }
}

/* Very small phones — even tighter */
@media (max-width: 380px) {
  .demo-head { padding: 84px 14px 18px; }
  .demo-title { font-size: 42px; }
  .dt-btn { min-width: 80vw; }
  .sa-rail ul { grid-template-columns: 1fr; }
  .sc-pair { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pp-img { height: 56px; }
}

/* Mid range (tablet-ish) — keep phone centered, drop sticky info */
@media (max-width: 1000px) and (min-width: 721px) {
  .panel-info { position: static; top: auto; }
  .phone-large { max-width: 360px; }
}
