/* Delegation demo: the visitor picks a task, watches Sekorti run it,
   and lands on the single decision it holds back for a human. */
.delegate-demo{
  padding:var(--section-pad-y-sm) 0;
}

/* ---- Header ---- */
.dd-head{
  max-width:760px;
  margin-bottom:44px;
}
.dd-head h2{
  font-size:clamp(1.9rem, 3.2vw, 2.7rem);
  line-height:1.12;
  letter-spacing:-0.025em;
  margin-bottom:16px;
}
.dd-accent{color:var(--brand-primary);}
.dd-head p{
  font-size:1.02rem;
  line-height:1.6;
  max-width:600px;
}

/* ---- Stage ---- */
.dd-stage{
  display:grid;
  grid-template-columns:0.85fr 1.15fr;
  gap:44px;
  align-items:start;
}

/* Left: the things you can say */
.dd-asks{
  display:flex;
  flex-direction:column;
  gap:10px;
  position:sticky;
  top:96px;
}
.dd-label{
  font-size:0.72rem;
  font-weight:700;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--text-tertiary);
  margin-bottom:4px;
}
.dd-ask{
  position:relative;
  text-align:left;
  padding:16px 18px 16px 34px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:#fff;
  color:var(--text-secondary);
  font-family:inherit;
  font-size:0.98rem;
  line-height:1.45;
  cursor:pointer;
  transition:border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
/* Opening quote mark, so these read as something you'd say out loud. */
.dd-ask::before{
  content:"“";
  position:absolute;
  left:14px;
  top:12px;
  font-size:1.5rem;
  line-height:1;
  color:var(--border-strong);
  transition:color .15s ease;
}
.dd-ask:hover{
  border-color:var(--border-strong);
  color:var(--text-primary);
}
.dd-ask.is-active{
  border-color:var(--brand-primary);
  color:var(--text-primary);
  font-weight:600;
  box-shadow:0 10px 26px -16px rgba(47,62,158,.55);
}
.dd-ask.is-active::before{color:var(--brand-primary);}
.dd-hint{
  margin-top:4px;
  font-size:0.78rem;
  color:var(--text-tertiary);
}

/* Right: the run */
.dd-run{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:#fff;
  box-shadow:var(--shadow-md);
  overflow:hidden;
}
.dd-run-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:16px 20px;
  border-bottom:1px solid var(--border);
  background:var(--surface);
}
.dd-run-title{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:0.8rem;
  font-weight:600;
  letter-spacing:0.02em;
  color:var(--text-secondary);
}
.dd-pulse{
  width:7px;height:7px;
  border-radius:50%;
  background:var(--border-strong);
  flex-shrink:0;
}
.is-running .dd-pulse{
  background:var(--brand-primary);
  animation:ddPulse 1.4s ease-in-out infinite;
}
@keyframes ddPulse{
  0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(47,62,158,.4);}
  50%{opacity:.65;box-shadow:0 0 0 5px rgba(47,62,158,0);}
}
/* The whole pitch in one line of numbers. */
.dd-counter{
  font-size:0.8rem;
  color:var(--text-tertiary);
}
.dd-counter strong{
  color:var(--text-primary);
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.dd-counter em{
  font-style:normal;
  margin:0 8px;
  color:var(--border-strong);
}

.dd-steps{
  padding:8px 20px 4px;
  min-height:236px;
}
/* Animated in on insertion rather than via a JS class toggle, so a step can
   never get stuck invisible if the frame callback doesn't run. */
.dd-step{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:11px 0;
  font-size:0.94rem;
  line-height:1.5;
  color:var(--text-secondary);
  border-bottom:1px solid var(--border);
  animation:ddIn .34s ease both;
}
.dd-step:last-child{border-bottom:0;}
@keyframes ddIn{
  from{opacity:0;transform:translateY(6px);}
  to{opacity:1;transform:none;}
}
.dd-step-tick{
  display:flex;
  align-items:center;
  justify-content:center;
  width:18px;height:18px;
  margin-top:2px;
  flex-shrink:0;
  border-radius:50%;
  background:var(--success-bg);
  color:var(--success-text);
}
.dd-step-tick svg{width:11px;height:11px;}

/* The one thing it won't decide for you. */
.dd-decision{
  margin:4px 20px 20px;
  padding:18px;
  border-radius:var(--radius-md);
  border:1px solid rgba(47,62,158,.28);
  border-left:3px solid var(--brand-primary);
  background:var(--brand-primary-soft);
  animation:ddIn .34s ease both;
}
.dd-decision-tag{
  display:inline-block;
  font-size:0.68rem;
  font-weight:700;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--brand-primary);
  margin-bottom:8px;
}
.dd-decision p{
  font-size:0.96rem;
  line-height:1.55;
  color:var(--text-primary);
  margin-bottom:14px;
}
.dd-decision-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.dd-btn{
  padding:9px 16px;
  border-radius:8px;
  background:var(--brand-primary);
  color:#fff;
  font-size:0.85rem;
  font-weight:600;
}
.dd-btn.ghost{
  background:transparent;
  border:1px solid var(--border-strong);
  color:var(--text-secondary);
}

@media (max-width: 980px){
  .dd-stage{grid-template-columns:1fr;gap:28px;}
  .dd-asks{position:static;}
  .dd-steps{min-height:0;}
}

@media (prefers-reduced-motion: reduce){
  .dd-step,.dd-decision{animation:none;}
  .is-running .dd-pulse{animation:none;}
}
