/* Avanza AI Studio v80 — premium guided demo experience
   Scope: the demo invitation, full-screen Agent workspace, and guided conversation only. */

/* --------------------------------------------------------------------------
   Demo invitation — clearer product preview, quieter luxury
   -------------------------------------------------------------------------- */
.agent-demo {
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.065), transparent 30%),
    radial-gradient(circle at 8% 86%, rgba(255,255,255,.032), transparent 27%),
    linear-gradient(142deg, #141518 0%, #090a0c 56%, #050506 100%);
}

.demo-launch-layout {
  grid-template-columns: minmax(360px, .8fr) minmax(600px, 1.2fr);
  gap: clamp(64px, 7.6vw, 124px);
}

.demo-launch-copy h2 {
  max-width: 620px;
  font-size: clamp(3.45rem, min(5vw, 7.3svh), 5.9rem);
  line-height: .94;
  letter-spacing: -.072em;
}

.demo-launch-lede {
  max-width: 540px;
  color: rgba(255,255,255,.58);
  line-height: 1.72;
}

.demo-launch-actions {
  gap: 11px;
}

.demo-launch-primary,
.demo-launch-secondary {
  min-height: 54px;
  border-radius: 999px;
}

.demo-launch-primary {
  min-width: 184px;
  box-shadow: 0 18px 44px rgba(0,0,0,.3), inset 0 1px 0 #fff;
}

.demo-launch-primary:hover,
.demo-launch-primary:focus-visible {
  box-shadow: 0 24px 58px rgba(0,0,0,.38), inset 0 1px 0 #fff;
  transform: translateY(-1px);
}

.demo-launch-meta {
  gap: 12px 22px;
  margin-top: clamp(27px, 2.55vw, 38px);
  color: rgba(255,255,255,.44);
}

.demo-launch-meta i {
  position: relative;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}

.demo-launch-meta i::after {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 3px;
  height: 5px;
  border-right: 1px solid rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(255,255,255,.72);
  content: "";
  transform: rotate(42deg);
}

.demo-launch-preview {
  border-color: rgba(255,255,255,.16);
  border-radius: clamp(25px, 1.9vw, 31px);
  background:
    radial-gradient(circle at 78% 4%, rgba(255,255,255,.075), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.064), rgba(255,255,255,.018));
  box-shadow: 0 48px 118px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.105);
  transform: perspective(1500px) rotateY(-1.2deg) rotateX(.45deg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.demo-launch-preview:hover,
.demo-launch-preview:focus-visible {
  border-color: rgba(255,255,255,.27);
  box-shadow: 0 58px 138px rgba(0,0,0,.61), inset 0 1px 0 rgba(255,255,255,.15);
  transform: perspective(1500px) rotateY(0) rotateX(0) translateY(-3px);
}

.demo-preview-bar {
  min-height: clamp(64px, 4.7vw, 74px);
  border-bottom-color: rgba(255,255,255,.095);
  background: rgba(255,255,255,.02);
}

.demo-preview-brand strong {
  color: rgba(255,255,255,.88);
}

.demo-preview-live {
  border-color: rgba(255,255,255,.11);
  color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.028);
}

.demo-preview-live i {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.demo-preview-live i::before {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 4px;
  height: 6px;
  border-right: 1.3px solid #71c38a;
  border-bottom: 1.3px solid #71c38a;
  content: "";
  transform: rotate(42deg);
}

.demo-preview-content {
  min-height: clamp(420px, min(33vw, 53svh), 548px);
  padding-block: clamp(38px, 3.7vw, 60px);
}

.demo-preview-orb {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.075);
  box-shadow: 0 18px 42px rgba(0,0,0,.23), inset 0 1px 0 rgba(255,255,255,.11);
}

.demo-preview-content > small {
  color: rgba(255,255,255,.46);
}

.demo-preview-content > strong {
  color: rgba(255,255,255,.95);
  font-size: clamp(1.72rem, min(2.2vw, 3.45svh), 2.35rem);
}

.demo-preview-query {
  width: min(100%, 570px);
  min-height: 62px;
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.048);
}

.demo-preview-results {
  width: min(100%, 570px);
  gap: 9px;
}

.demo-preview-results > span {
  position: relative;
  min-height: 76px;
  padding: 15px 14px 14px 16px;
  overflow: hidden;
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.028);
}

.demo-preview-results > span::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  content: "";
  opacity: .9;
}

.demo-preview-results > span:nth-child(1)::before,
.demo-preview-results > span:nth-child(2)::before { background: #d6a64a; }
.demo-preview-results > span:nth-child(3)::before { background: #ef7772; }

.demo-preview-results small {
  color: rgba(255,255,255,.4);
}

.demo-preview-results strong {
  color: rgba(255,255,255,.79);
}

.demo-preview-enter {
  min-height: 54px;
  border-top-color: rgba(255,255,255,.095);
  color: rgba(255,255,255,.68);
  background: rgba(0,0,0,.12);
}

.demo-preview-enter span::after {
  display: inline-block;
  margin-left: 10px;
  color: rgba(255,255,255,.42);
  content: "↗";
  transition: transform .3s cubic-bezier(.16,1,.3,1), color .2s ease;
}

.demo-launch-preview:hover .demo-preview-enter span::after,
.demo-launch-preview:focus-visible .demo-preview-enter span::after {
  color: rgba(255,255,255,.92);
  transform: translate(2px,-2px);
}

/* --------------------------------------------------------------------------
   Full-screen shell — quieter chrome, stronger hierarchy
   -------------------------------------------------------------------------- */
.demo-experience {
  --demo-sidebar: clamp(208px, 15.4vw, 228px);
  --demo-topbar: 66px;
  --v80-canvas: #151617;
  --v80-rail: #0e0f10;
  --v80-panel: rgba(255,255,255,.038);
  --v80-panel-raised: rgba(255,255,255,.062);
  --v80-shadow: 0 24px 70px rgba(0,0,0,.24);
}


.demo-experience:not(.is-light-theme) .agent-sidebar-mark img,
.demo-experience:not(.is-light-theme) .agent-sidebar-avatar img,
.demo-experience:not(.is-light-theme) .agent-console-mark img,
.demo-experience:not(.is-light-theme) .agent-empty-orb img,
.demo-experience:not(.is-light-theme) .agent-avatar img {
  filter: invert(1) brightness(1.35);
}

.demo-experience.is-light-theme {
  --v80-canvas: #f6f6f2;
  --v80-rail: #ecece7;
  --v80-panel: rgba(255,255,255,.76);
  --v80-panel-raised: #fff;
  --v80-shadow: 0 24px 66px rgba(28,32,38,.075);
}

.demo-experience .agent-console,
.demo-experience .agent-console-main {
  background: var(--v80-canvas) !important;
}

.demo-experience .agent-console-main {
  background:
    radial-gradient(circle at 56% -14%, rgba(255,255,255,.025), transparent 31%),
    var(--v80-canvas) !important;
}

.demo-experience.is-light-theme .agent-console-main {
  background:
    radial-gradient(circle at 54% -17%, rgba(22,25,31,.025), transparent 32%),
    var(--v80-canvas) !important;
}

.demo-experience .agent-app-sidebar {
  padding: 13px 10px 11px;
  border-right-color: rgba(255,255,255,.07);
  background: var(--v80-rail);
}

.demo-experience.is-light-theme .agent-app-sidebar {
  border-right-color: rgba(18,20,24,.07);
  background: var(--v80-rail);
}

.agent-sidebar-brand {
  min-height: 47px;
  gap: 10px;
  padding: 3px 9px 12px;
}

.agent-sidebar-mark {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.agent-sidebar-brand strong {
  font-size: .76rem;
  letter-spacing: -.018em;
}

.agent-sidebar-brand small {
  margin-top: 2px;
  font-size: .51rem;
}

.agent-sidebar-new {
  min-height: 40px;
  padding-inline: 11px;
  border-radius: 10px;
  font-size: .64rem;
  background: transparent;
}

.demo-experience.is-light-theme .agent-sidebar-new {
  border-color: rgba(18,20,24,.075);
  color: rgba(23,25,29,.65);
  background: rgba(255,255,255,.38);
}

.agent-sidebar-section {
  gap: 3px;
  margin-top: 21px;
}

.agent-sidebar-section > small {
  padding: 0 11px 8px;
  font-size: .45rem;
  letter-spacing: .145em;
}

.agent-sidebar-thread {
  position: relative;
  min-height: 39px;
  gap: 0;
  padding: 0 11px 0 16px;
  border-radius: 9px;
  font-size: .62rem;
}

.agent-sidebar-thread span {
  display: none;
}

.agent-sidebar-thread::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 7px;
  width: 1.5px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  opacity: .18;
}

.agent-sidebar-thread.is-active::before {
  opacity: .78;
}

.demo-experience.is-light-theme .agent-sidebar-thread.is-active {
  color: #17191d;
  background: rgba(255,255,255,.76);
  box-shadow: 0 9px 24px rgba(24,28,34,.04), inset 0 1px 0 rgba(255,255,255,.9);
}

.agent-sidebar-bottom {
  gap: 9px;
}

.agent-sidebar-systems {
  gap: 5px;
  padding: 12px 10px;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.demo-experience.is-light-theme .agent-sidebar-systems {
  border-color: rgba(18,20,24,.075);
  background: transparent;
  box-shadow: none;
}

.agent-sidebar-systems span {
  font-size: .55rem;
}

.agent-sidebar-systems small {
  font-size: .47rem;
}

.agent-sidebar-profile {
  gap: 9px;
  padding: 8px 7px 2px;
}

.agent-sidebar-avatar {
  width: 29px;
  height: 29px;
  border-radius: 9px;
}

.agent-sidebar-profile strong { font-size: .57rem; }
.agent-sidebar-profile small { font-size: .45rem; }

.demo-experience .agent-console-topbar {
  padding-inline: clamp(16px, 1.55vw, 25px) !important;
  border-bottom-color: rgba(255,255,255,.065);
  background: rgba(21,22,23,.88);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.demo-experience.is-light-theme .agent-console-topbar {
  border-bottom-color: rgba(18,20,24,.065);
  background: rgba(246,246,242,.89);
}

.demo-experience .agent-console-mark {
  width: 35px;
  height: 35px;
  border-radius: 10px;
}

.demo-experience .agent-console-brand strong {
  font-size: .77rem;
  letter-spacing: -.02em;
}

.demo-experience .agent-console-brand small {
  margin-top: 3px;
  font-size: .51rem;
}

.agent-console-actions { gap: 7px; }

.demo-experience .agent-console-state {
  min-height: 34px;
  gap: 7px;
  padding-inline: 9px;
  font-size: .55rem;
}

.agent-theme-switch,
.agent-topbar-reset,
.demo-experience-back {
  min-height: 36px;
  border-radius: 999px;
}

.agent-theme-switch,
.demo-experience-back {
  border-color: rgba(255,255,255,.095);
  background: rgba(255,255,255,.025);
}

.demo-experience.is-light-theme .agent-theme-switch,
.demo-experience.is-light-theme .demo-experience-back {
  border-color: rgba(18,20,24,.085);
  background: rgba(255,255,255,.7);
  box-shadow: 0 4px 14px rgba(24,28,34,.025);
}

.demo-experience .agent-conversation-head {
  min-height: 52px;
  padding-inline: clamp(22px, 2.35vw, 38px) !important;
}

.demo-experience .agent-conversation-head small {
  font-size: .45rem;
  letter-spacing: .12em;
}

.demo-experience .agent-conversation-head strong {
  margin-top: 3px;
  font-size: .63rem;
}

.agent-conversation-context {
  font-size: .49rem;
  letter-spacing: .015em;
}

.demo-experience .agent-chat-thread {
  padding: clamp(22px, 3.2dvh, 42px) clamp(26px, 4.6vw, 84px) !important;
}

/* --------------------------------------------------------------------------
   Starting state — editorial prompt cards and clear semantic language
   -------------------------------------------------------------------------- */
.demo-experience .agent-empty-state {
  width: min(100%, 940px);
  padding-bottom: clamp(38px, 5dvh, 64px) !important;
}

.demo-experience .agent-empty-orb {
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
}

.demo-experience .agent-empty-orb span {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  box-shadow: 0 16px 42px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.1);
}

.demo-experience.is-light-theme .agent-empty-orb span {
  border-color: rgba(18,20,24,.085);
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 44px rgba(24,28,34,.065), inset 0 1px 0 #fff;
}

.demo-experience .agent-empty-orb img { width: 28px; }

.demo-experience .agent-empty-state > small {
  font-size: .48rem;
  letter-spacing: .17em;
}

.demo-experience .agent-empty-state h3 {
  max-width: 780px;
  margin-top: 10px;
  font-size: clamp(2.35rem, min(3.85vw, 5.5dvh), 3.7rem);
  line-height: .97;
  letter-spacing: -.065em;
}

.demo-experience .agent-empty-state > p {
  max-width: 620px;
  margin-top: 16px;
  font-size: clamp(.79rem, .8vw, .88rem);
  line-height: 1.68;
}

.agent-signal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 17px;
  color: var(--conversation-faint);
  font-size: .52rem;
  font-weight: 650;
}

.agent-signal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.agent-signal-legend i {
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--agent-signal);
}

.demo-experience .agent-starter-grid {
  width: min(100%, 820px) !important;
  gap: 10px !important;
  margin-top: clamp(24px, 3.2dvh, 34px) !important;
}

.demo-experience .agent-starter-grid button {
  position: relative;
  min-height: 90px !important;
  padding: 18px 46px 17px 19px !important;
  border-radius: 15px;
  text-align: left !important;
  background: var(--v80-panel);
  box-shadow: none;
}

.demo-experience.is-light-theme .agent-starter-grid button {
  border-color: rgba(18,20,24,.08);
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 34px rgba(24,28,34,.035), inset 0 1px 0 rgba(255,255,255,.95);
}

.demo-experience .agent-starter-grid button::before {
  position: absolute;
  top: 17px;
  right: 18px;
  color: var(--conversation-faint);
  font-size: .48rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .8;
}

.demo-experience .agent-starter-grid button:nth-child(1)::before { content: "01"; }
.demo-experience .agent-starter-grid button:nth-child(2)::before { content: "02"; }
.demo-experience .agent-starter-grid button:nth-child(3)::before { content: "03"; }
.demo-experience .agent-starter-grid button:nth-child(4)::before { content: "04"; }

.demo-experience .agent-starter-grid button::after {
  position: absolute;
  right: 17px;
  bottom: 15px;
  inset: auto 17px 15px auto;
  color: var(--conversation-faint);
  font-size: .7rem;
  content: "↗";
  opacity: .55;
  transform: none;
  transition: color .2s ease, opacity .2s ease, transform .3s cubic-bezier(.16,1,.3,1);
}

.demo-experience .agent-starter-grid button:hover,
.demo-experience .agent-starter-grid button:focus-visible {
  border-color: var(--conversation-line-strong);
  background: var(--v80-panel-raised);
  box-shadow: none;
  transform: translateY(-1px);
}

.demo-experience.is-light-theme .agent-starter-grid button:hover,
.demo-experience.is-light-theme .agent-starter-grid button:focus-visible {
  border-color: rgba(18,20,24,.14);
  background: #fff;
  box-shadow: 0 20px 44px rgba(24,28,34,.065), inset 0 1px 0 #fff;
}

.demo-experience .agent-starter-grid button:hover::after,
.demo-experience .agent-starter-grid button:focus-visible::after {
  color: var(--conversation-muted);
  opacity: 1;
  transform: translate(2px,-2px);
}

.demo-experience .agent-starter-grid small {
  font-size: .47rem;
  letter-spacing: .13em;
}

.demo-experience .agent-starter-grid strong {
  max-width: 92%;
  margin-top: 10px;
  font-size: .77rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Conversation — clearer reading order and semantic summaries
   -------------------------------------------------------------------------- */
.demo-experience .agent-messages {
  width: min(100%, 1040px);
  gap: 27px;
}

.demo-experience .owner-message {
  width: min(72%, 560px);
  padding: 14px 17px 15px;
  border-radius: 16px 16px 5px 16px;
}

.demo-experience.is-light-theme .owner-message {
  border-color: #1a1c20;
  color: #fff;
  background: #1a1c20;
  box-shadow: 0 14px 34px rgba(24,28,34,.1);
}

.demo-experience.is-light-theme .owner-message small {
  color: rgba(255,255,255,.48) !important;
}

.demo-experience.is-light-theme .owner-message p {
  color: rgba(255,255,255,.96) !important;
}

.demo-experience .agent-avatar {
  width: 37px;
  height: 37px;
  border-radius: 10px;
}

.demo-experience .agent-thinking-bubble {
  min-width: 330px;
  border-radius: 14px 14px 14px 5px;
}

.demo-experience .agent-response-kicker {
  margin-bottom: 14px;
  font-size: .49rem;
  letter-spacing: .115em;
}

.demo-experience .agent-response-intro {
  max-width: 860px;
  margin-top: 9px;
  font-size: clamp(1.03rem, 1.08vw, 1.18rem);
  line-height: 1.55;
}

.agent-response-signalbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 19px;
  margin-top: 16px;
  padding: 12px 0 1px;
  border-top: 1px solid var(--conversation-line);
}

.agent-response-signalbar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--conversation-faint);
  font-size: .54rem;
  font-weight: 650;
}

.agent-response-signalbar span::before {
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--agent-signal);
  content: "";
}

.agent-response-signalbar b {
  color: var(--conversation-ink);
  font-size: .59rem;
  font-weight: 720;
}

.demo-experience .agent-answer-grid {
  gap: 10px;
  margin-top: 17px;
}

.demo-experience .agent-answer-grid > .agent-answer-card {
  position: relative;
  min-height: 148px;
  padding: 19px 20px 17px 22px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: none;
}

.demo-experience .agent-answer-grid > .agent-answer-card::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--agent-signal);
  content: "";
  opacity: .92;
}

.demo-experience.is-light-theme .agent-answer-grid > .agent-answer-card[data-agent-tone] {
  background:
    linear-gradient(128deg, var(--agent-signal-wash) 0%, transparent 42%),
    rgba(255,255,255,.74);
  box-shadow: 0 12px 30px rgba(24,28,34,.025), inset 0 1px 0 rgba(255,255,255,.9);
}

.demo-experience .agent-answer-grid > button.agent-answer-card:hover,
.demo-experience .agent-answer-grid > button.agent-answer-card:focus-visible,
.demo-experience .agent-answer-grid > .agent-answer-card.is-selected {
  transform: translateY(-1px);
}

.demo-experience.is-light-theme .agent-answer-grid > button.agent-answer-card:hover,
.demo-experience.is-light-theme .agent-answer-grid > button.agent-answer-card:focus-visible,
.demo-experience.is-light-theme .agent-answer-grid > .agent-answer-card.is-selected {
  background:
    linear-gradient(128deg, var(--agent-signal-wash) 0%, transparent 42%),
    #fff;
  box-shadow: 0 18px 42px rgba(24,28,34,.055), inset 0 1px 0 #fff;
}

.demo-experience .agent-answer-card > em {
  top: 18px;
  right: 18px;
  font-size: .49rem;
}

.demo-experience .agent-answer-card > small {
  font-size: .49rem;
  letter-spacing: .12em;
}

.demo-experience .agent-answer-card > strong {
  margin-top: 10px;
  font-size: .92rem;
  line-height: 1.36;
}

.demo-experience .agent-answer-card > p {
  max-width: 94%;
  margin-top: 7px;
  font-size: .75rem;
  line-height: 1.56;
}

.demo-experience .agent-answer-card > [data-agent-card-tag] {
  margin-top: 13px;
  font-size: .56rem;
}

.demo-experience .agent-card-open {
  right: 18px;
  bottom: 16px;
  font-size: .54rem;
  opacity: .68;
}

.demo-experience .agent-answer-footer {
  margin-top: 13px;
}

/* Focus mode: once an owner opens a decision, remove visual competition. */
.demo-experience .agent-response-stage.is-reviewing .agent-answer-grid {
  grid-template-columns: 1fr;
}

.demo-experience .agent-response-stage.is-reviewing .agent-answer-card:not(.is-selected) {
  display: none;
}

.demo-experience .agent-response-stage.is-reviewing .agent-answer-card.is-selected {
  width: 100%;
  min-height: 112px;
  grid-column: 1 / -1;
  padding-right: 130px;
  box-shadow: inset 0 2px 0 var(--agent-signal) !important;
}

.demo-experience .agent-response-stage.is-reviewing .agent-answer-card.is-selected .agent-card-open {
  display: none;
}


.demo-experience .agent-answer-action[data-agent-completed="true"] {
  cursor: default;
  opacity: 1;
}

.demo-experience .agent-answer-action[data-agent-completed="true"] .agent-card-open {
  color: var(--signal-clear) !important;
  opacity: .86;
}

/* --------------------------------------------------------------------------
   Decision panel — focused, legible, owner-controlled
   -------------------------------------------------------------------------- */
.demo-experience .agent-action-panel {
  position: relative;
  margin-top: 12px;
  border-radius: 15px;
  box-shadow: var(--v80-shadow);
}

.demo-experience .agent-action-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--agent-signal);
  content: "";
  opacity: .9;
}

.demo-experience.is-light-theme .agent-action-panel {
  border-color: rgba(18,20,24,.105);
  background: rgba(255,255,255,.95);
  box-shadow: 0 26px 72px rgba(24,28,34,.09), inset 0 1px 0 #fff;
}

.demo-experience .agent-action-head {
  padding: 20px 22px 17px;
}

.demo-experience .agent-action-head small {
  font-size: .49rem;
  letter-spacing: .115em;
}

.demo-experience .agent-action-head h4 {
  max-width: 800px;
  margin-top: 8px;
  font-size: clamp(1rem, 1.25vw, 1.22rem);
  line-height: 1.3;
}

.demo-experience .agent-action-summary {
  padding: 16px 22px 0;
  font-size: .78rem !important;
}

.demo-experience .agent-action-context {
  padding: 17px 22px 18px;
}

.demo-experience .agent-action-context dl > div {
  padding-block: 10px 11px;
}

.demo-experience .agent-action-recommendation {
  margin-inline: 22px;
  border-radius: 11px;
}

.demo-experience.is-light-theme .agent-action-panel[data-agent-tone] .agent-action-recommendation {
  background:
    linear-gradient(110deg, var(--agent-signal-wash) 0%, transparent 58%),
    #f6f6f2;
}

.demo-experience .agent-action-controls {
  padding: 17px 22px 20px;
}

.demo-experience .agent-action-controls button {
  min-height: 44px;
  border-radius: 10px;
}

.demo-experience .agent-action-primary span {
  display: inline-block;
  margin-left: 8px;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}

.demo-experience .agent-action-primary:hover span,
.demo-experience .agent-action-primary:focus-visible span {
  transform: translate(2px,-2px);
}

.demo-experience .agent-action-working {
  margin-bottom: 20px;
}

.demo-experience .agent-action-complete {
  padding: 22px;
}


.demo-experience .agent-console.is-reviewing-action .agent-composer {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Bottom guided prompt dock — readable without competing with the answer
   -------------------------------------------------------------------------- */
.demo-experience .agent-composer {
  padding-inline: clamp(22px, 4.6vw, 84px) !important;
  padding-bottom: clamp(13px, 1.8dvh, 18px) !important;
  background: linear-gradient(to top, var(--v80-canvas) 70%, rgba(21,22,23,0));
}

.demo-experience.is-light-theme .agent-composer {
  background: linear-gradient(to top, rgba(246,246,242,.99) 70%, rgba(246,246,242,0));
}

.agent-composer-inner {
  width: min(100%, 1040px);
  padding: 11px 12px 10px;
  border-radius: 16px;
  background: rgba(34,35,36,.96);
  box-shadow: 0 18px 48px rgba(0,0,0,.17), inset 0 1px 0 rgba(255,255,255,.04);
}

.demo-experience.is-light-theme .agent-composer-inner {
  border-color: rgba(18,20,24,.085);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 50px rgba(24,28,34,.065), inset 0 1px 0 #fff;
}

.demo-experience .agent-composer-head {
  margin: 0 2px 8px;
  font-size: .51rem;
  letter-spacing: .065em;
}

.demo-experience .agent-composer-head span {
  font-weight: 720;
}

.demo-experience .agent-composer-head small {
  font-size: .47rem;
}

.demo-experience .agent-prompt-rail { gap: 7px; }

.demo-experience .agent-prompt-compact {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: .54rem;
  line-height: 1.35;
}

.agent-composer-disclaimer {
  margin-top: 8px;
  font-size: .44rem;
  line-height: 1.45;
}

/* Clear keyboard focus without changing the visual hierarchy. */
.demo-experience button:focus-visible,
.demo-launch-preview:focus-visible,
.demo-launch-primary:focus-visible,
.demo-launch-secondary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Responsive refinements
   -------------------------------------------------------------------------- */
@media (min-width: 901px) and (max-height: 760px) {
  .demo-experience {
    --demo-sidebar: 204px;
    --demo-topbar: 58px;
  }

  .demo-experience .agent-empty-state h3 {
    font-size: clamp(1.95rem, 4.8dvh, 2.45rem);
  }

  .agent-signal-legend {
    margin-top: 12px;
  }

  .demo-experience .agent-starter-grid {
    margin-top: 17px !important;
  }

  .demo-experience .agent-starter-grid button {
    min-height: 68px !important;
    padding-block: 12px !important;
  }

  .demo-experience .agent-starter-grid button::before {
    top: 12px;
  }

  .demo-experience .agent-starter-grid button::after {
    bottom: 11px;
  }
}

@media (max-width: 1040px) {
  .demo-launch-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .demo-launch-copy {
    max-width: 720px;
  }

  .demo-launch-preview {
    max-width: 920px;
  }
}

@media (max-width: 900px) {
  .demo-experience .agent-chat-thread,
  .demo-experience .agent-composer {
    padding-inline: clamp(16px, 4.5vw, 40px) !important;
  }
}

@media (max-width: 760px) {
  .agent-response-signalbar {
    gap: 8px 15px;
  }

  .demo-experience .agent-response-stage.is-reviewing .agent-answer-card.is-selected {
    padding-right: 22px;
  }
}

@media (max-width: 640px) {
  .demo-experience {
    --demo-topbar: 60px;
  }

  .demo-experience .agent-conversation-head {
    min-height: 46px;
    padding-inline: 16px !important;
  }

  .demo-experience .agent-chat-thread {
    padding: 18px 15px 24px !important;
  }

  .demo-experience .agent-empty-state {
    align-content: start;
    padding-top: 6dvh !important;
  }

  .demo-experience .agent-empty-state h3 {
    max-width: 460px;
    font-size: clamp(2rem, 9.5vw, 2.7rem);
  }

  .agent-signal-legend {
    gap: 8px 14px;
    margin-top: 14px;
    font-size: .49rem;
  }

  .demo-experience .agent-starter-grid {
    grid-template-columns: 1fr;
    width: min(100%, 500px) !important;
  }

  .demo-experience .agent-starter-grid button {
    min-height: 76px !important;
  }

  .demo-experience .owner-message {
    width: 91%;
  }

  .demo-experience .agent-message-main {
    gap: 9px;
  }

  .demo-experience .agent-avatar {
    width: 34px;
    height: 34px;
  }

  .demo-experience .agent-thinking-bubble {
    min-width: 0;
  }

  .agent-response-signalbar {
    margin-top: 13px;
    padding-top: 11px;
  }

  .demo-experience .agent-answer-grid > .agent-answer-card {
    min-height: 0;
  }

  .demo-experience .agent-composer {
    padding: 0 10px 10px !important;
  }

  .agent-composer-inner {
    border-radius: 14px;
  }

  .demo-experience .agent-composer-head small {
    display: none;
  }

  .demo-experience .agent-console-brand strong {
    font-size: 0;
  }

  .demo-experience .agent-console-brand strong::after {
    content: "Avanza Agent";
    font-size: .72rem;
    letter-spacing: -.02em;
  }

  .demo-experience .agent-prompt-rail {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 1px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .demo-experience .agent-prompt-rail::-webkit-scrollbar {
    display: none;
  }

  .demo-experience .agent-prompt-compact {
    min-width: 172px;
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  .agent-composer-disclaimer {
    display: none;
  }

  .demo-launch-meta {
    display: grid;
    gap: 10px;
  }

  .demo-preview-results {
    grid-template-columns: 1fr;
  }

  .demo-preview-results > span:nth-child(n+2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-launch-preview,
  .demo-launch-preview *,
  .demo-experience .agent-starter-grid button,
  .demo-experience .agent-starter-grid button::after,
  .demo-experience .agent-action-primary span {
    transition: none !important;
  }
}
